summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7d7ca12)
raw | patch | inline | side by side (parent: 7d7ca12)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Thu, 4 Mar 2004 05:08:43 +0000 (05:08 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Thu, 4 Mar 2004 05:08:43 +0000 (05:08 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@842 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_dig.c | patch | blob | history | |
plugins/check_dns.c | patch | blob | history | |
plugins/check_game.c | patch | blob | history |
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index e348a352bec09323eeef97c134f70f43e21e1871..9e1d84792de1bcb8ae5360e88af7696be6855d00 100644 (file)
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
printf ("DNS %s - %s|%s\n",
state_text (result), output,
- perfdata("time", microsec, "us",
+ fperfdata("time", elapsed_time, "s",
(warning_interval>UNDEFINED?TRUE:FALSE),
- (int)(1e6*warning_interval),
+ warning_interval,
(critical_interval>UNDEFINED?TRUE:FALSE),
- (int)(1e6*critical_interval),
+ critical_interval,
TRUE, 0, FALSE, 0));
return result;
}
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 14d4306cdaf59ac6ce45652ea82a8caa704b1a98..43a38fa0c71ea39787a3311b02ba6f1ca4d07e66 100644 (file)
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
printf ("%s %s: ", _("DNS"), _("OK"));
printf (ngettext("%.3f second response time, ", "%.3f seconds response time, ", elapsed_time), elapsed_time);
printf (_("%s returns %s"), query_address, address);
- printf ("|%s\n", perfdata ("time", microsec, "us", FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0));
+ printf ("|%s\n", fperfdata ("time", elapsed_time, "s", FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0));
}
else if (result == STATE_WARNING)
printf (_("DNS WARNING - %s\n"),
diff --git a/plugins/check_game.c b/plugins/check_game.c
index 3ebf6afabb2e50bc1aac332ddf30333191f09a81..ac72873deb9f6fe6f8f4f3e375db3ae6f419a780 100644 (file)
--- a/plugins/check_game.c
+++ b/plugins/check_game.c
perfdata ("players", atol(ret[qstat_game_players]), "",
FALSE, 0, FALSE, 0,
TRUE, 0, TRUE, atol(ret[qstat_game_players_max])),
- perfdata ("ping", atol(ret[qstat_ping_field]), "",
+ fperfdata ("ping", strtod(ret[qstat_ping_field], NULL), "",
FALSE, 0, FALSE, 0,
TRUE, 0, FALSE, 0));
}