Managing Status using nagios
Integration with Nagios is supported through a number of scripts that output information in a format compatible with the
Nagios NRPE plugin. Using the plugin the
check commands, such as check_tungsten_latency can be executed and the output parsed for status information.
The available commands are:
To configure the scripts to be executed through NRPE:
Install the Nagios NRPE server.
Start the NRPE daemon:
shell> sudo /etc/init.d/nagios-nrpe-server startAdd the IP of your Nagios server to the
/etc/nagios/nrpe.cfgconfiguration file. For example:allowed_hosts=127.0.0.1,192.168.2.20Add the Tungsten check commands that you want to execute to the
/etc/nagios/nrpe.cfgconfiguration file. For example:command[check_tungsten_online]=/opt/continuent/tungsten/cluster-home/bin/check_tungsten_onlineRestart the NRPE service:
shell> sudo /etc/init.d/nagios-nrpe-server startIf the commands need to be executed with superuser privileges, the
/etc/sudoor/etc/sudoersfile must be updated to enable the commands to be executed as root throughsudoas thenagiosuser. This can be achieved by updating the configuration file, usually performed by using thevisudocommand:nagios ALL=(tungsten) NOPASSWD: /opt/continuent/tungsten/cluster-home/bin/check*In addition, the
sudocommand should be added to the Tungsten check commands within the Nagiosnrpe.cfg, for example:command[check_tungsten_online]=/usr/bin/sudo -u tungsten /opt/continuent/tungsten/cluster-home/bin/check_tungsten_onlineRestart the NRPE service for these changes to take effect.
Add an entry to your Nagios
services.cfgfile for each service you want to monitor:define service {host_name databaseservice_description check_tungsten_onlinecheck_command check_nrpe! -H $HOSTADDRESS$ -t 30 -c check_tungsten_onlineretry_check_interval 1check_period 24x7max_check_attempts 3flap_detection_enabled 1notifications_enabled 1notification_period 24x7notification_interval 60notification_options c,f,r,u,wnormal_check_interval 5}
The same process can be repeated for all the hosts within your environment where there is a Tungsten service installed.