[Nagiosplug-devel] check_ping/check_fping improvement

Toby Kraft Toby_Kraft at ksainc.com
Tue Nov 2 07:22:22 CET 2004


The check_ping plugins output a message of the form:

"PING OK - Packet Loss = 0%, RTA = 12.34 ms"

Problem is - when inserted into the printf statement of the 
Notify-by-email command, the '%' gets interpreted and the rest gets 
stripped off so the email does not report the RTA.

I changed the '%' to 'Percent' and now the notification emails include the 
RTA.

Toby

More info:

Old messages looked like;
***** Nagios *****

Notification Type: RECOVERY

Service: PING
Host: xxx
Address: xxx.yyy.com
State: OK

Date/Time: Fri Oct 29 13:58:25 CDT 2004

Additional Info:

PING OK - Packet loss = 0

New messages look like:

***** Nagios *****

Notification Type: PROBLEM

Service: PING
Host: xxx
Address: xxx.yy.com
State: WARNING

Date/Time: Tue Nov 2 07:28:40 CST 2004

Additional Info:

PING WARNING - Packet loss = 0 Percent, RTA = 250.06 ms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20041102/92b9f97d/attachment.html>


More information about the Devel mailing list