[Nagiosplug-devel] check_ping and check_icmp confusion

Andreas Ericsson ae at op5.se
Wed Feb 22 11:16:06 CET 2006


Andreas Ericsson wrote:
> Jason Crawford wrote:
> 
>> On 2/22/06, gh <gh at 3gupload.com> wrote:
>>
>>> On Wed, 2006-02-22 at 18:36 +0100, Andreas Ericsson wrote:
>>>
>>>> gh wrote:
>>>>
>>>>> From what I can tell check_ping has been deprecated in favor of
>>>>
>>>>
>>>>> check_icmp. Is this the case or are there certain systems or 
>>>>> conditions
>>>>> that make check_ping favorable or even necessary?
>>>>>
>>>>
>>>> check_icmp had some problems on systems with 32-bit process id's in the
>>>> early days (causing it to mark the packets wrong and then not
>>>> recognizing them when they returned). It also used to calculate timings
>>>> slightly wrong. Both those problems are solved long since, however. Now
>>>> there are no real reasons to use check_ping instead of check_icmp.
>>>>
>>>
>>> What do people think about just dropping check_ping from the next
>>> version of the plugins package to avoid all this unnecessary confusion
>>> that is evident on the mailing lists and replace it with a symlink to
>>> check_icmp for backwards compatibility?
>>>
>>
>>
>> I just don't like the fact that check_icmp must be setuid root or run
>> as root. Personally, I like to have as few setuid binaries as possible
>> on my system, as well as little running as root as possible
> 
> 
> This is both sane and wise.
> 
>> (in order
>> to run check_icmp as root, the parent nagios stuff must be running as
>> root as well).
> 
> 
> 
> This is a downright lie. setuid binaries are executed with the 
> permissions of the owner of the file. Nagios does *not* have to run as 
> root (otherwise check_ping would fail as well).
> 
> 
>> The great thing about check_ping is that it uses the
>> already setuid ping binary.
>>
> 

Oh, and the most compelling reasons not to use check_ping:
* It runs /bin/ping and parses the output. This works nicely so long as 
the developers have access to a ping that produces output in a certain 
format, but that's not as predictable as some like to think.
* It is *much* slower than check_icmp.
* It consumes more resources.
* The code is ugly enough to make a mans eyes pop.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231




More information about the Devel mailing list