diff --git a/README.md b/README.md index a4a0472..aa35b12 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ 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. Common UserParameter were added to ```zabbix_agentd.conf.d/linux.conf``` file. Please add it to your own Zabbix Agent installation. +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. Sometimes you need to use SUDO for UserParameter. All rules are in file ```sudoers.d/zabbix```. Please let us know if you have any questions or concerns. @@ -19,7 +19,7 @@ Monitoring memory usage of APC (http://pecl.php.net/package/APC) module. File `` Template App Brocade HBA ====== -Monitoring for Network Adapters - Brocade. Template is usind Discovery to create Items and Triggers. +Monitoring for Network Adapters - Brocade. Template is usind Discovery to create Items and Triggers. You need also add SUDO for zabbix user: ```zabbix ALL=(ALL) NOPASSWD: /usr/bin/bcu``` Template App Nscd ====== @@ -33,7 +33,12 @@ Monitoring memory usage of OPcache (http://php.net/manual/en/book.opcache.php). Template App RabbitMQ ====== -Monitoring RabbitMQ (http://www.rabbitmq.com/) basic parameters like queues, exchanges and memory usage. You need install PHP on server for monitoring RabbitMQ. +Monitoring RabbitMQ (http://www.rabbitmq.com/) basic parameters like queues, exchanges and memory usage. You need install PHP on server for monitoring RabbitMQ. You need also add SUDO for zabbix user: + +``` +zabbix ALL=(ALL) NOPASSWD: /usr/sbin/rabbitmqctl +zabbix ALL=(ALL) NOPASSWD: /usr/bin/php /etc/zabbix/bin/rabbit.php +``` Template App cPanel ====== @@ -195,6 +200,10 @@ Dell Open Manage System Status You need also add SUDO for zabbix user: ```zabbix ALL=(ALL) NOPASSWD: /opt/dell/srvadmin/bin/omreport``` +Template App PowerPath +====== + + Template Security ====== Contains items related with basic linux security (iptables status, selinux status) and Fail2ban application. You need also add SUDO for zabbix user: ```zabbix ALL=(ALL) NOPASSWD: /sbin/iptables -L INPUT -n``` diff --git a/sudoers.d/zabbix b/sudoers.d/zabbix new file mode 100644 index 0000000..4a7e637 --- /dev/null +++ b/sudoers.d/zabbix @@ -0,0 +1,8 @@ +zabbix ALL=(ALL) NOPASSWD: /sbin/iptables -L INPUT -n +zabbix ALL=(ALL) NOPASSWD: /usr/sbin/nscd -g +zabbix ALL=(ALL) NOPASSWD: /usr/sbin/rabbitmqctl +zabbix ALL=(ALL) NOPASSWD: /usr/bin/php /etc/zabbix/bin/rabbit.php +zabbix ALL=(ALL) NOPASSWD: /opt/dell/srvadmin/bin/omreport +zabbix ALL=(ALL) NOPASSWD: /usr/bin/bcu +zabbix ALL=(ALL) NOPASSWD: /sbin/powermt +Defaults:zabbix !requiretty diff --git a/templates/Template App PowerPath.xml b/templates/Template App PowerPath.xml new file mode 100644 index 0000000..71db337 --- /dev/null +++ b/templates/Template App PowerPath.xml @@ -0,0 +1,320 @@ + + + 2.0 + 2014-11-22T21:34:26Z + + + Templates + + + + + + + + {Template App PowerPath:powermt-device-state.last()}=0 + PowerPath device problem + + 0 + 4 + + 0 + + + + diff --git a/zabbix_agentd.conf.d/powermt.conf b/zabbix_agentd.conf.d/powermt.conf new file mode 100644 index 0000000..97b0859 --- /dev/null +++ b/zabbix_agentd.conf.d/powermt.conf @@ -0,0 +1,5 @@ +UserParameter=powermt-path-list, echo -e "{\n\"data\":["; sudo /sbin/powermt display dev=all | tail -n+9 | grep -v "^$" | awk '{ print "{\"{#PATH}\":\""$3"\" }," }' | head -c -2; echo -e "]\n}"; +UserParameter=powermt-device-state, sudo /sbin/powermt display dev=all 2>&1 | grep -c state=alive +UserParameter=powermt-path-mode[*], sudo /sbin/powermt display dev=all 2>&1 | grep "$1" | awk '{ print $ 6 }' | grep -c active +UserParameter=powermt-path-state[*], sudo /sbin/powermt display dev=all 2>&1 | grep "$1" | awk '{ print $ 7 }' | grep -c alive +UserParameter=powermt-path-errors[*], sudo /sbin/powermt display dev=all | grep "$1" | awk '{ print $ 9 }'