[Nagiosplug-help] Problem with check_ping plugin

Andreas Ericsson ae at op5.se
Fri Jul 1 02:25:40 CEST 2005


Ralph.Grothe at itdz-berlin.de wrote:
> 
> As you can see I provided the path and args to fping (which I
> already installed for my working monitoring setup with Mon) with
> the --with-ping-command.
> At the time of the build I wasn't quite aware what its use was
> and what the consequences would be.
> 
> Now I find that the check_ping monitor isn't working (probably
> because of my mistake to specify fping rather than AIX vanilla
> ping).
> 
> 
> $ ~nagios/libexec/check_ping -V
> check_ping (nagios-plugins 1.4) 1.42
>  
> $ ~nagios/libexec/check_ping -H jupiter -w 1000.,70% -c 5000.,90%
> -p 1
> CRITICAL - Plugin timed out after 10 seconds
> 
> 
> Do you think I will have to recompile (maybe at least
> check_ping.c if I fumbled with the Makefile manually)
> to get check_ping working?
> 

If check_icmp built properly you can simply copy it to check_ping and 
all should be well. It's also quite a bit faster than the other two.

> You see, I'm still in my Nagios infancy, but I thought the most
> basic sort of monitors must be those that simply ping an IP
> address before I start with something more fancy.
> 

That's why there are actually 3 ping plugins.

> There's another itch I have with the plugins.
> I think the documentation on how to write Nagios plugins (i.e.
> what arguments they expect, what stdout, stderr and return codes
> they have to produce) is more than sparse (at least in that
> respect I find Mon much more tangible and to the point).
> 

There is a "plugin developers guidelines" which is broken and deprecated 
in many places, but distributed with the plugins none the less. It 
contains all the rules for writing plugins.

> Ok, in the contrib subdir of the plugins' tarball there are
> plenty of 3rd party Perl plugins, and I'm quite comfortable with
> Perl, so that I just could have a glimpse at them as a kind of
> blueprint.
> But I would have liked it very much if there was a part of the
> Nagios documentation


The Nagios documentation is quite riddled with references to the rules 
of writing plugins. Those rules however are so simple that it's quite 
easy to miss them;
1. Each plugin must exit with a return code indicating its status, where 
0 = OK, 1 = WARNING, 2 = CRITICAL, 3 = UNKNOWN. For host-checks 0 = UP 
and everything else means DOWN.
2. Each plugin will have one line of its output read by Nagios.

Those are the rules and they are mentioned several times in both the 
nagios docs and the plugins guidelines.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer




More information about the Help mailing list