diff --git a/README.md b/README.md index e6f09ba8a2eee4953bd03fb76790fd063a90b026..a4a04724fe94eeed43cc93970180a2ee70aede27 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,20 @@ Script and templates for Zabbix 2.2.x. and 2.4.x - In Templates there are XML files ready to import using Zabbix GUI - In zabbix_agentd.conf.d there are custom User Parameters (need to be installed on agent) -Templates was tested on Red Hat 5.x, 6.x and CentOS 5.x, 6.x. Please let us know if you have any questions or concerns. +Templates was tested on Red Hat 5.x, 6.x and CentOS 5.x, 6.x. Common UserParameter were added to ```zabbix_agentd.conf.d/linux.conf``` file. Please add it to your own Zabbix Agent installation. + +Please let us know if you have any questions or concerns. The Camels Team http://thecamels.org Template App APC ====== -Monitoring memory usage of APC (http://pecl.php.net/package/APC) module. File apc-stats.php need to be accessed via HTTP for example http://127.0.0.1/apc-stats.php +Monitoring memory usage of APC (http://pecl.php.net/package/APC) module. File ```bin/apc-stats.php``` need to be accessed via HTTP for example http://127.0.0.1/apc-stats.php Template App Brocade HBA ====== -Monitoring for Network Adapters - Brocade. +Monitoring for Network Adapters - Brocade. Template is usind Discovery to create Items and Triggers. Template App Nscd ====== @@ -27,7 +29,7 @@ You need also add SUDO for zabbix user: ```zabbix ALL=(ALL) NOPASSWD: /usr/sbin Template App OPcache ====== -Monitoring memory usage of OPcache (http://php.net/manual/en/book.opcache.php). File opcache.php need to be accessed via HTTP for example http://127.0.0.1/opcache.php. Curl need to be installed on server. +Monitoring memory usage of OPcache (http://php.net/manual/en/book.opcache.php). File ```bin/opcache.php``` need to be accessed via HTTP for example http://127.0.0.1/opcache.php. Curl need to be installed on server. Template App RabbitMQ ====== diff --git a/zabbix_agentd.conf.d/linux.conf b/zabbix_agentd.conf.d/linux.conf new file mode 100644 index 0000000000000000000000000000000000000000..ecbc060681850d1ba40e2849b088313ca99fe2dc --- /dev/null +++ b/zabbix_agentd.conf.d/linux.conf @@ -0,0 +1,15 @@ +UserParameter=nfs[*], df | grep -cw $1 +UserParameter=netstat[*], ss -nat | grep -c $1 +UserParameter=mysqlnetstat[*], ss -nat | grep 3306 | grep -c $1 +UserParameter=mailqueue,mailq | grep -v 'Mail queue is empty' | grep -c '^[0-9A-Z]' +UserParameter=chkconfig[*], chkconfig --list | grep "$1" | cut -d ":" -f 4 | grep -c on +UserParameter=sockstat.sockets,cat /proc/net/sockstat|grep sockets|cut -d' ' -f 3 +UserParameter=sockstat.tcp.inuse,cat /proc/net/sockstat|grep TCP|cut -d' ' -f 3 +UserParameter=sockstat.tcp.orphan,cat /proc/net/sockstat|grep TCP|cut -d' ' -f 5 +UserParameter=sockstat.tcp.timewait,cat /proc/net/sockstat|grep TCP|cut -d' ' -f 7 +UserParameter=sockstat.tcp.allocated,cat /proc/net/sockstat|grep TCP|cut -d' ' -f 9 +UserParameter=sockstat.tcp.mem,cat /proc/net/sockstat|grep TCP|cut -d' ' -f 11 +UserParameter=sockstat.udp.inuse,cat /proc/net/sockstat|grep UDP:|cut -d' ' -f 3 +UserParameter=sockstat.udp.mem,cat /proc/net/sockstat|grep UDP:|cut -d' ' -f 5 +UserParameter=check_chmod[*], stat --format '%a' $1 +UserParameter=os-full, cat /etc/issue | head -1