Isn't this just checking the Nagios process on the second server? Your service has host_name specified, but the command doesn't actually use it (it only queries local host).
You could run e.g. nrpe on the primary server. Create a command to run check_nagios. Then on the second server run check_nrpe. Or else rather than running check_nagios on the second server, run a script that connects to primary server via ssh and runs check_nrpe. Or if you're running mk_livestatus on your primary you could query it from secondary. Create check_nrpe on primary and then just query the status of it from secondary. Someone else would be able to suggest better, but these are quick and dirty ;) From: Help [mailto:help-bounces+gareth.fletcher=onenet.co...@monitoring-plugins.org] On Behalf Of Ditmar Tavares Sent: Friday, 19 December 2014 5:06 a.m. To: help@monitoring-plugins.org Subject: check_nagios plugin I'm new to Linux and also to Nagios monitoring, so it may be something that I'm missing. I setup a second Nagios server so I can monitor my primary Nagios server, basically if the primary Nagios stop monitoring I would like to know via the secondary Nagios. Issue is that I setup the check_nagios plugin and its giving me the status of the Nagios process of the primary server, but when I shutoff the Nagios process on the primary server (for testing), I am NOT getting any notification from the secondary server that something is wrong with the primary, and its also keeps telling me the process on the primary servers is OK. Could you please assist ? thank you in advance. See my host service definition below. define service { use generic-service host_name ClearMon02 service_description Nagios check_command check_nagios notifications_enabled 1 } My command definition is below define command{ command_name check_nagios command_line $USER1$/check_nagios -F /usr/local/nagios/var/status.dat -e 1 -t 15 -C /usr/local/nagios/bin/nagios } ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service.