PDA

View Full Version : Nagios issue


scottro
05-30-2008, 08:32 PM
Well, since nagios is running on a CentOS server and the target machine is running Windows XP, a BSD forum is the best place to post. :)

We wanted to check time on some servers and workstations. There's a check_ntp_time plugin, which works, as near as I can see by looking at the code (but it's in C, so I could be wrong) by using NTP. The usual test for a nagios plugin, is to do something like (in the plugin directory) ./check_ntp_time -H <hostname>.

This is fine, I get a response.

However, when I define it as a nagios service, I get an email that the connection was refused. Googling hasn't given me an answer yet--I've seen one or two other people with a similar issue (different plugin, same pattern) but no solution.

There is a nagios client that can be run on Windows hosts. I put that client on one Windows host and that works.

However, since the ./check_plugin_name -H <host> worked, my hope was that I didn't have to install anything on the Windows machines.

If anyone knows nagios and has experienced this, I'd be grateful for any pointers. I was under the impression that if the ./check_plugin stuff from comand line worked, it would work with nagios.

I tried doing su - nagios and it still works from command line, so it doesn't seem to be a matter of different users.

Thanks for any pointers.

scottro
05-30-2008, 10:35 PM
SOLVED.

Sigh, a typo--I looked at it ten times without seeing it.

TerryP
05-31-2008, 12:06 AM
It's strange how typo(s) cost the MOST time when setting things up :\

scottro
05-31-2008, 12:25 AM
In this case, I'll post it for others who might run into the same thing.

There are various plugins that resemble each other. Among others, there is check_time and check_ntp_time. I wanted check_ntp_time which should work on most machines that look for an ntp server. The check_time, however, only works when run against an ntp server. (At least by default, haven't really investigated further.)

So, I wanted check_ntp_time--however, in commands.cfg, I'd put check_time.
Sigh.

corey_james
05-31-2008, 06:47 AM
life's hard when you're stupid, isn't it scottro ;);)

scottro
05-31-2008, 11:18 AM
I wouldn't know. Is it? <scottro FTW! YES!>