summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dac9d73)
raw | patch | inline | side by side (parent: dac9d73)
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Fri, 7 Nov 2008 01:41:17 +0000 (01:41 +0000) | ||
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Fri, 7 Nov 2008 01:41:17 +0000 (01:41 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2073 f882894a-f735-0410-b71e-b25c423dba1c
NEWS | patch | blob | history | |
THANKS.in | patch | blob | history | |
plugins-root/check_icmp.c | patch | blob | history |
index 2686cd8557383092fbd02a53440500cd6b9a56d4..f4e662aa66923991c654fd7848a29f315c3a7fa6 100644 (file)
--- a/NEWS
+++ b/NEWS
Fixed dependency issue on libtap when ./configure --enable-libtap used. Warning: will install libtap
Fixed segfault in extra-opts under some circumstance when reading multiple sections
Fix long options parsing in check_tcp
+ check_icmp now reports min and max round trip time perfdata (Steve Rader)
1.4.13 25th Sept 2008
Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)
diff --git a/THANKS.in b/THANKS.in
index 80fa47a3d46c3853a254796b7c1d626c6a67614b..b042f9e77b803b7ac4dbfacd908a0b85813233df 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
Erik Wasser
Tilman Koschnick
Olivier 'Babar' Raginel
+Steve Rader
index dff3abb2474359ca24459ef679f3d1270a07db06..ff6c73b3e3ebbfef2b2238ba59c3e076607ea03d 100644 (file)
# define ICMP_UNREACH_PRECEDENCE_CUTOFF 15
#endif
+#ifndef DBL_MAX
+# define DBL_MAX 9.9999999999e999
+#endif
typedef unsigned short range_t; /* type for get_range() -- unimplemented */
unsigned char icmp_type, icmp_code; /* type and code from errors */
unsigned short flags; /* control/status flags */
double rta; /* measured RTA */
+ double rtmax; /* max rtt */
+ double rtmin; /* min rtt */
unsigned char pl; /* measured packet loss */
struct rta_host *next; /* linked list */
} rta_host;
host->time_waited += tdiff;
host->icmp_recv++;
icmp_recv++;
+ if (tdiff > host->rtmax)
+ host->rtmax = tdiff;
+ if (tdiff < host->rtmin)
+ host->rtmin = tdiff;
if(debug) {
- printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u\n",
+ printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u, max: %0.3f, min: %0.3f\n",
(float)tdiff / 1000, inet_ntoa(resp_addr.sin_addr),
- ttl, ip->ip_ttl);
+ ttl, ip->ip_ttl, (float)host->rtmax / 1000, (float)host->rtmin / 1000);
}
/* if we're in hostcheck mode, exit with limited printouts */
host = list;
while(host) {
if(debug) puts("");
- printf("%srta=%0.3fms;%0.3f;%0.3f;0; %spl=%u%%;%u;%u;; ",
+ printf("%srta=%0.3fms;%0.3f;%0.3f;0; %spl=%u%%;%u;%u;; %srtmax=%0.3fms;;;; %srtmin=%0.3fms;;;; ",
(targets > 1) ? host->name : "",
host->rta / 1000, (float)warn.rta / 1000, (float)crit.rta / 1000,
- (targets > 1) ? host->name : "",
- host->pl, warn.pl, crit.pl);
+ (targets > 1) ? host->name : "", host->pl, warn.pl, crit.pl,
+ (targets > 1) ? host->name : "", (float)host->rtmax / 1000,
+ (targets > 1) ? host->name : "", (host->rtmin < DBL_MAX) ? (float)host->rtmin / 1000 : (float)0);
host = host->next;
}
host->saddr_in.sin_family = AF_INET;
host->saddr_in.sin_addr.s_addr = in->s_addr;
+ host->rtmin = DBL_MAX;
+
if(!list) list = cursor = host;
else cursor->next = host;