[Nagiosplug-devel] check_icmp RTA calculation issue

Zambelli, Patrick Patrick.Zambelli at wuerth-phoenix.com
Thu Jun 11 10:16:26 CEST 2009


Hello,

I would like to report a behavior of check_icmp I discovered on an installation with ping and system time issues. The result of the execution of the Nagios check_icmp was containing strange rta values.
In most cases it is the max integer value minus something, indicating an integer value overflow.

Checking the source code of check_icmp.c of the last plugin version I found the condition in line 1030 where the value early is compared to value early. Since also the comment is indicating if early > later ...  I would suggest to change to condition to this:

/* if early > later we return 0 so as to indicate a timeout */
if(early->tv_sec > later->tv_sec ||
   (early->tv_sec == later->tv_sec && early->tv_usec > later->tv_usec))
{
            return 0;
}

Old code:
if(early->tv_sec > early->tv_sec ||
   (early->tv_sec == later->tv_sec && early->tv_usec > later->tv_usec))
{
            return 0;
}


This is a fragment of some of the strange check results:

[15-05-2009 23:47:20] SERVICE ALERT: comserverhrl;PING;CRITICAL;SOFT;1;CRITICAL - 10.1.6.95: rta 4294902.440ms, lost 50%
[cid:image001.png at 01C9EA7D.AD9A6C40][15-05-2009 23:47:10] SERVICE ALERT: srvisa;PING;CRITICAL;SOFT;1;CRITICAL - 192.168.1.2: rta 4294895.381ms, lost 50%
[cid:image002.png at 01C9EA7D.AD9A6C40][15-05-2009 23:43:42] SERVICE ALERT: sw-10.1.6.237;PING;OK;SOFT;2;OK - 10.1.6.237: rta 0.775ms, lost 0%
[cid:image002.png at 01C9EA7D.AD9A6C40][15-05-2009 23:43:42] SERVICE ALERT: srvex;PING;OK;SOFT;2;OK - 10.1.6.4: rta 0.166ms, lost 0%
[cid:image001.png at 01C9EA7D.AD9A6C40][15-05-2009 23:42:42] SERVICE ALERT: sw-10.1.6.237;PING;CRITICAL;SOFT;1;CRITICAL - 10.1.6.237: rta 2147448.008ms, lost 33%
[cid:image001.png at 01C9EA7D.AD9A6C40][15-05-2009 23:42:42] SERVICE ALERT: srvex;PING;CRITICAL;SOFT;1;CRITICAL - 10.1.6.4: rta 858994.148ms, lost 0%
[cid:image002.png at 01C9EA7D.AD9A6C40][15-05-2009 23:41:43] SERVICE ALERT: xpbd2;PING;OK;SOFT;2;OK - 10.1.6.93: rta 0.139ms, lost 0%
[cid:image002.png at 01C9EA7D.AD9A6C40][15-05-2009 23:41:03] SERVICE ALERT: webappliance;PING;OK;SOFT;2;OK - 10.1.6.10: rta 0.109ms, lost 0%
[cid:image001.png at 01C9EA7D.AD9A6C40][15-05-2009 23:40:43] SERVICE ALERT: xpbd2;PING;CRITICAL;SOFT;1;CRITICAL - 10.1.6.93: rta 4294894.831ms, lost 50%
[cid:image001.png at 01C9EA7D.AD9A6C40][15-05-2009 23:40:03] SERVICE ALERT: webappliance;PING;CRITICAL;SOFT;1;CRITICAL - 10.1.6.10: rta 4294895.864ms, lost 50%
[cid:image002.png at 01C9EA7D.AD9A6C40][15-05-2009 23:22:45] SERVICE ALERT: ds4700;PING;OK;SOFT;2;OK - 10.1.20.240: rta 0.225ms, lost 0%
[cid:image001.png at 01C9EA7D.AD9A6C40][15-05-2009 23:21:45] SERVICE ALERT: ds4700;PING;CRITICAL;SOFT;1;CRITICAL - 10.1.20.240: rta 4294895.387ms, lost 50%
[cid:image002.png at 01C9EA7D.AD9A6C40][15-05-2009 23:18:36] SERVICE ALERT: srvdc2;PING;OK;SOFT;2;OK - 10.1.6.9: rta 14.452ms, lost 0%
[cid:image001.png at 01C9EA7D.AD9A6C40][15-05-2009 23:17:35] SERVICE ALERT: srvdc2;PING;CRITICAL;SOFT;1;CRITICAL - 10.1.6.9: rta 4294895.334ms, lost 50%
[cid:image002.png at 01C9EA7D.AD9A6C40][15-05-2009 23:16:45] SERVICE ALERT: ds4700;PING;OK;SOFT;2;OK - 10.1.20.240: rta 0.327ms, lost 0%
[cid:image001.png at 01C9EA7D.AD9A6C40][15-05-2009 23:15:46] SERVICE ALERT: ds4700;PING;CRITICAL;SOFT;1;CRITICAL - 10.1.20.240: rta 4294895.512ms, lost 50%
[cid:image002.png at 01C9EA7D.AD9A6C40][15-05-2009 23:13:26] SERVICE ALERT: milntssrv1;PING;OK;SOFT;2;OK - 10.1.6.7: rta 0.167ms, lost 0%
[cid:image001.png at 01C9EA7D.AD9A6C40][15-05-2009 23:12:26] SERVICE ALERT: milntssrv1;PING;CRITICAL;SOFT;1;CRITICAL - 10.1.6.7: rta 4294895.420ms, lost 50%
[cid:image002.png at 01C9EA7D.AD9A6C40][15-05-2009 23:05:47] SERVICE ALERT: xpbd2;PING;OK;SOFT;2;OK - 10.1.6.93: rta 0.164ms, lost 0%
[cid:image001.png at 01C9EA7D.AD9A6C40][15-05-2009 23:04:47] SERVICE ALERT: xpbd2;PING;CRITICAL;SOFT;1;CRITICAL - 10.1.6.93: rta 4294895.488ms, lost 50%


Best regards
Patrick

Würth Phoenix S.r.l.
Patrick Zambelli
System Integration
Via Kravogl 4
I-39100 Bolzano

Direct:     +39 0471 564 174
E-Mail:     patrick.zambelli at wuerth-phoenix.com<mailto:max.mustermann at wuerth-phoenix.com>
Website:  www.wuerth-phoenix.com<http://www.wuerth-phoenix.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20090611/699d9b3a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1166 bytes
Desc: image001.png
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20090611/699d9b3a/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1367 bytes
Desc: image002.png
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20090611/699d9b3a/attachment-0001.png>


More information about the Devel mailing list