Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_zmcontrol

Rating
0 votes
Favoured:
0
Current Version
1.0
Last Release Date
2013-11-14
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI
  • Nagios Fusion
  • Nagios Reactor
Owner
License
GPL
Hits
28474
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This plugin is a bash script which checks if there are any stopped services in the Zimbra mail system. Rather it reports a warning or critical state, depends on the argument you feed it:
./check_zmcontrol -w ## for warning
./check_zmcontrol -c ## for critical

Note that the user running Nagios daemon or, most commonly in this case, the NRPE daemon, is "nagios". But to execute Zimbra's zmcontrol command you need to run it as "zimbra" user. In this script I run execute:

su -l zimbra -c "/opt/zimbra/bin/zmcontrol status"

This means that the nagios user executing this script will need to have the ability to switch users. I recommend executing this script with sudo and in the sudoers file you would have to append the permission:

nagios ALL=(ALL) NOPASSWD:/usr/local/nagios/libexec/

which gives the nagios user to execute any nagios plugins with root privileges, which will allow for the correct execution of the su command.

Feel free to contact me for any more details.
This plugin is a bash script which checks if there are any stopped services in the Zimbra mail system. Rather it reports a warning or critical state, depends on the argument you feed it:
./check_zmcontrol -w ## for warning
./check_zmcontrol -c ## for critical

Note that the user running Nagios daemon or, most commonly in this case, the NRPE daemon, is "nagios". But to execute Zimbra's zmcontrol command you need to run it as "zimbra" user. In this script I run execute:

su -l zimbra -c "/opt/zimbra/bin/zmcontrol status"

This means that the nagios user executing this script will need to have the ability to switch users. I recommend executing this script with sudo and in the sudoers file you would have to append the permission:

nagios ALL=(ALL) NOPASSWD:/usr/local/nagios/libexec/

which gives the nagios user to execute any nagios plugins with root privileges, which will allow for the correct execution of the su command.

Feel free to contact me for any more details.