Page 1 of 2
Nagios not receiving check_results
Posted: Wed May 18, 2011 1:05 pm
by tgfde
Hi,
Has anyone ran into an issue where Nagios is not receiving the results from a Windows client?
For some sreason, when a I run the check command from the locally from the client, it detects that a service has stopped. But if I run the command from the Nagios server (CentOS 5.4) it thinks that all "Automatic" services are running when really they're not, because I stopped one of the service that is set to automatic.
Any help would be appreciated as I have troubleshooting this issue for two weeks now.
Re: Nagios not receiving check_results
Posted: Wed May 18, 2011 4:19 pm
by tonyyarusso
As noted over e-mail, this is not an issue where Nagios is not receiving the results, but one where your custom written check plugin is not sending the results. To work with Nagios, a check plugin / script
MUST fit the following:
- Be purely textual in nature - not graphical alert boxes, popups, etc. Command line operation AND results only.
- Exit with an integer exit code of 0, 1, 2, or 3, as described on http://nagiosplug.sourceforge.net/devel ... PLUGOUTPUT. Nagios does not care one bit about any textual output from the plugin for determining whether something is down or not and whether to send a notification - that is purely for the human operator's benefit. Nagios does not magically "detect" anything from the output text. The exit code is the only thing Nagios will consider, and so MUST correctly reflect the state of the service.
- Be able to correctly execute as the nagios/nrpe user, not only as root, Administrator, or any other user.
Re: Nagios not receiving check_results
Posted: Fri May 20, 2011 3:59 pm
by tgfde
Hi Tony,
This particular check used to work and all of a suddent stopped. And with this said, do you think I still need to check the script even when this script wasn't modified. I'm thinking maybe it's the "Check_NRPE" plugin on the agent not working, currently we have v2.12 running on the Nagios server. Our Network team ran a sniffer today between the Nagios server and the agent but found nothing wrong.
Thanks.
Re: Nagios not receiving check_results
Posted: Mon May 23, 2011 11:44 am
by mguthrie
This particular check used to work and all of a suddent stopped.
Is nagios still receiving data from this check, or is the data not what it should be?
If it is receiving a status message, but one of your windows services is actually down, then it is most likely some sort of a logical error/bug in the check itself, or the config options for the check need to be adjusted.
Re: Nagios not receiving check_results
Posted: Thu May 26, 2011 2:08 pm
by tgfde
Tony,
Do you guys offer any other type of service to help us solve this issue aside from the support we have from you guys?
Thanks.
Re: Nagios not receiving check_results
Posted: Fri May 27, 2011 10:19 am
by admin
Are you using the standard Nagios XI Windows wizard to monitor the Windows host?
Also, are you using NSClient++ as the agent on the Windows machine?
Re: Nagios not receiving check_results
Posted: Tue May 31, 2011 9:55 am
by tgfde
Yes, Im using the Nagios XI Windows wizard to monitor the Windows host.
I am also using nsclient++ as the agent to monitor the Windows machine.
Thansks.
Re: Nagios not receiving check_results
Posted: Tue May 31, 2011 1:58 pm
by mguthrie
Since you're using a custom script with your windows agent, there's not much we can test on our end at the moment. Can you send us the custom plugin and we can maybe take a look at the code? We don't make any promises on this, but there's only so much we can do when it's a custom check that we haven't seen before. From previous email discussions the plugin appears to be communicating with Nagios correctly, but this issue points to a logical error in the code of the check itself.
Re: Nagios not receiving check_results
Posted: Wed Jun 01, 2011 1:30 pm
by tgfde
The file is attached. Thanks.
Re: Nagios not receiving check_results
Posted: Wed Jun 01, 2011 1:34 pm
by tgfde
Sorry, here's the file.
chkwin_service_auto.txt