mirror of
https://github.com/limosek/zaf-plugins.git
synced 2024-12-21 16:37:53 +01:00
Released new zaf plugin version
Added documentation
This commit is contained in:
parent
7e534c255d
commit
8922559443
19
README.md
19
README.md
@ -1,3 +1,22 @@
|
||||
# zaf-plugins
|
||||
Zabbix Agent Framework plugins repository. It contains working set of default plugins. Feel free to contribute. Or write your public and maintain control file on your site.
|
||||
Look into plugin directory to see its possibilities and usage.
|
||||
|
||||
## fail2ban
|
||||
Plugin which can autodiscover fail2ban jails and than reports number of banned IPs per jail.
|
||||
|
||||
## fsx
|
||||
Extended filesystem functions. This plugin can autodiscover files or directories somwhere in filesystem. Next to this, it can report disk usage and number of items in that object.
|
||||
|
||||
## openssh
|
||||
Plugin to discover openssh options and their values. Good for security audits. Each option will be discovered and than you can make triggers to check right settings like cleartext authentication or protocol version.
|
||||
|
||||
## psx
|
||||
Extended process list. Plugin will discover runing procesess and userids. Than it reports usage by process and user.
|
||||
|
||||
## zaf
|
||||
Default plugin for zaf. It can autodiscover installed plugins and get their versions.
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
# Plugin fail2ban
|
||||
Zaf plugin for monitoring fail2ban with LLD
|
||||
Zaf plugin for monitoring fail2ban with LLD. It will discover jails and then reports its usage and banned IPs.
|
||||
|
||||
# Credits
|
||||
2014 dron, jiri.slezka@slu.cz
|
||||
|
27
fsx/README.md
Normal file
27
fsx/README.md
Normal file
@ -0,0 +1,27 @@
|
||||
# Plugin fsx
|
||||
|
||||
This plugin can autodiscover filesystem objects. Please note that this report can be very time consuming. This is only proof of concept.
|
||||
Next to this, zabbix user must have permissions to that directories.
|
||||
General fsx.discovery item has this options:
|
||||
```
|
||||
fsx.discovery[/dir,mask,maxdepth,type]
|
||||
```
|
||||
You must use % instead od * to get globing for mask.
|
||||
|
||||
## Example1
|
||||
This example will discover directories under /var/* (one level) and than it will report their usage.
|
||||
```
|
||||
discovery: fsx.discovery[/var,%,1,d]
|
||||
discovered: fsx.pathinfo_du[/var/mail], fsx.pathinfo_du[/var/spool], fsx.pathinfo_du[/var/log], ...
|
||||
```
|
||||
|
||||
## Example2
|
||||
Find all DEADJOE files in /etc and all subdirs
|
||||
discovery: fsx.discovery[/etc,DEADJOE,,f]
|
||||
discovered: fsx.pathinfo_du[/etc/DEADJOE], fsx.pathinfo_du[/etc/postfix/DEADJOE], ...
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<zabbix_export>
|
||||
<version>3.0</version>
|
||||
<date>2016-04-04T13:01:57Z</date>
|
||||
<date>2016-04-09T10:03:07Z</date>
|
||||
<groups>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
@ -17,7 +17,17 @@
|
||||
<name>Templates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<applications/>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Filesystems</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>fsx</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>ZAF</name>
|
||||
</application>
|
||||
</applications>
|
||||
<items/>
|
||||
<discovery_rules>
|
||||
<discovery_rule>
|
||||
@ -54,7 +64,7 @@
|
||||
<description>Discover directories under /var</description>
|
||||
<item_prototypes>
|
||||
<item_prototype>
|
||||
<name>Path {#PATH} items</name>
|
||||
<name>Path {#PATH} disk usage</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<multiplier>0</multiplier>
|
||||
@ -88,7 +98,67 @@
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications/>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Filesystems</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>fsx</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>ZAF</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<application_prototypes/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>Path {#PATH} items</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<multiplier>0</multiplier>
|
||||
<snmp_oid/>
|
||||
<key>fsx.pathinfo_items[{#PATH}]</key>
|
||||
<delay>600</delay>
|
||||
<history>90</history>
|
||||
<trends>365</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>B</units>
|
||||
<delta>0</delta>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<formula>1</formula>
|
||||
<delay_flex/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<data_type>0</data_type>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Filesystems</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>fsx</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>ZAF</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<application_prototypes/>
|
||||
|
@ -4,5 +4,64 @@ Please note that this plugin is very simple plugin for domonstrating possibiliti
|
||||
|
||||
## Usage
|
||||
|
||||
zaf intall process-list
|
||||
```
|
||||
|
||||
psx.discovery [t|{
|
||||
"data":[
|
||||
{
|
||||
"{#PSNAME}":"daemon" ,
|
||||
"{#PSUSER}":"atd"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"hosting" ,
|
||||
"{#PSUSER}":"php5-fpm"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"krtek" ,
|
||||
"{#PSUSER}":"php5-fpm"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"lipka" ,
|
||||
"{#PSUSER}":"php5-fpm"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"macura" ,
|
||||
"{#PSUSER}":"php5-fpm"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"memcache" ,
|
||||
"{#PSUSER}":"memcached"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"message+" ,
|
||||
"{#PSUSER}":"dbus-daemon"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"mysql" ,
|
||||
"{#PSUSER}":"mysqld"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"odeli" ,
|
||||
"{#PSUSER}":"php5-fpm"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"postfix" ,
|
||||
"{#PSUSER}":"qmgr"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"postfix" ,
|
||||
"{#PSUSER}":"tlsmgr"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"rdnssd" ,
|
||||
"{#PSUSER}":"rdnssd"
|
||||
},
|
||||
{
|
||||
"{#PSNAME}":"root" ,
|
||||
"{#PSUSER}":"acpid"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<zabbix_export>
|
||||
<version>3.0</version>
|
||||
<date>2016-03-23T09:37:42Z</date>
|
||||
<date>2016-04-09T10:08:50Z</date>
|
||||
<groups>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
@ -21,6 +21,12 @@
|
||||
<application>
|
||||
<name>Process Statistics</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>psx</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>ZAF</name>
|
||||
</application>
|
||||
</applications>
|
||||
<items/>
|
||||
<discovery_rules>
|
||||
@ -97,6 +103,12 @@ Returns the {#PSNAME} and {#PSUSER} discovery macros which return the process na
|
||||
<application>
|
||||
<name>Process Statistics</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>psx</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>ZAF</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
@ -141,6 +153,12 @@ Returns the {#PSNAME} and {#PSUSER} discovery macros which return the process na
|
||||
<application>
|
||||
<name>Process Statistics</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>psx</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>ZAF</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
@ -185,6 +203,12 @@ Returns the {#PSNAME} and {#PSUSER} discovery macros which return the process na
|
||||
<application>
|
||||
<name>Process Statistics</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>psx</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>ZAF</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
|
5
zaf/README.md
Normal file
5
zaf/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Zaf default plugin
|
||||
This plugin helps to monitor zaf status on each host. It can report zaf version, discover all plugins and get their versions. This should be linked as essential part of templates for each zaf enabled host.
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ Description::
|
||||
::
|
||||
|
||||
# Version of the plugin.
|
||||
Version: 0.3
|
||||
Version: 0.4
|
||||
|
||||
# Url of plugin location to be able to update plugin
|
||||
Url: https://raw.githubusercontent.com/limosek/zaf-plugins/master/zaf
|
||||
@ -50,10 +50,48 @@ Function: zaf_discovery_plugins
|
||||
Item plugin_version:
|
||||
Parameters: plugin_name
|
||||
Description::
|
||||
Returns maintainer of plugin
|
||||
Returns version of plugin
|
||||
::
|
||||
|
||||
Function: zaf_plugin_version $1
|
||||
|
||||
/Item
|
||||
|
||||
Item plugin_url:
|
||||
Parameters: plugin_name
|
||||
Description::
|
||||
Returns base url of plugin
|
||||
::
|
||||
Function: zaf_plugin_url $1
|
||||
/Item
|
||||
|
||||
Item plugin_web:
|
||||
Parameters: plugin_name
|
||||
Description::
|
||||
Returns home url of plugin
|
||||
::
|
||||
Function: zaf_plugin_web $1
|
||||
/Item
|
||||
|
||||
Item plugin_maintainer:
|
||||
Parameters: plugin_name
|
||||
Description::
|
||||
Returns maintainer of plugin
|
||||
::
|
||||
Function: zaf_plugin_mainatner $1
|
||||
/Item
|
||||
|
||||
Item plugin_items:
|
||||
Parameters: plugin_name
|
||||
Description::
|
||||
Returns items defined in plugin
|
||||
::
|
||||
Function: zaf_list_plugin_items $1
|
||||
/Item
|
||||
|
||||
Item plugin_template_url:
|
||||
Parameters: plugin_name
|
||||
Description::
|
||||
Returns base template url for plugin
|
||||
::
|
||||
Function: zaf_plugin_template_url $1
|
||||
/Item
|
||||
|
||||
|
132
zaf/template.xml
132
zaf/template.xml
@ -145,6 +145,138 @@
|
||||
<logtimefmt/>
|
||||
<application_prototypes/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>ZAF plugin {#PLUGIN} home url</name>
|
||||
<type>0</type>
|
||||
<snmp_community/>
|
||||
<multiplier>0</multiplier>
|
||||
<snmp_oid/>
|
||||
<key>zaf.plugin_url[{#PLUGIN}]</key>
|
||||
<delay>3600</delay>
|
||||
<history>90</history>
|
||||
<trends>0</trends>
|
||||
<status>0</status>
|
||||
<value_type>1</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<delta>0</delta>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<formula>1</formula>
|
||||
<delay_flex/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<data_type>0</data_type>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>ZAF</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<application_prototypes/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>ZAF plugin {#PLUGIN} template url</name>
|
||||
<type>0</type>
|
||||
<snmp_community/>
|
||||
<multiplier>0</multiplier>
|
||||
<snmp_oid/>
|
||||
<key>zaf.plugin_template_url[{#PLUGIN}]</key>
|
||||
<delay>3600</delay>
|
||||
<history>90</history>
|
||||
<trends>0</trends>
|
||||
<status>0</status>
|
||||
<value_type>1</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<delta>0</delta>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<formula>1</formula>
|
||||
<delay_flex/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<data_type>0</data_type>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>ZAF</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<application_prototypes/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>ZAF plugin {#PLUGIN} items</name>
|
||||
<type>0</type>
|
||||
<snmp_community/>
|
||||
<multiplier>0</multiplier>
|
||||
<snmp_oid/>
|
||||
<key>zaf.plugin_items[{#PLUGIN}]</key>
|
||||
<delay>3600</delay>
|
||||
<history>90</history>
|
||||
<trends>0</trends>
|
||||
<status>0</status>
|
||||
<value_type>1</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<delta>0</delta>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<formula>1</formula>
|
||||
<delay_flex/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<data_type>0</data_type>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>ZAF</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<application_prototypes/>
|
||||
</item_prototype>
|
||||
</item_prototypes>
|
||||
<trigger_prototypes/>
|
||||
<graph_prototypes/>
|
||||
|
Loading…
Reference in New Issue
Block a user