diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2004-03-04 05:08:43 (GMT) |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2004-03-04 05:08:43 (GMT) |
commit | 2563edba02a6babb9ce0328e33eb4c5b49b437ad (patch) | |
tree | 8786332e9cea558942c22695fbf6af853b0834e7 /plugins | |
parent | 7d7ca121bcabef8ba669c99388b23c1af0ca745e (diff) | |
download | monitoring-plugins-2563edba02a6babb9ce0328e33eb4c5b49b437ad.tar.gz |
use float for time in perf data
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@842 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_dig.c | 6 | ||||
-rw-r--r-- | plugins/check_dns.c | 2 | ||||
-rw-r--r-- | plugins/check_game.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_dig.c b/plugins/check_dig.c index e348a35..9e1d847 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c | |||
@@ -151,11 +151,11 @@ main (int argc, char **argv) | |||
151 | 151 | ||
152 | printf ("DNS %s - %s|%s\n", | 152 | printf ("DNS %s - %s|%s\n", |
153 | state_text (result), output, | 153 | state_text (result), output, |
154 | perfdata("time", microsec, "us", | 154 | fperfdata("time", elapsed_time, "s", |
155 | (warning_interval>UNDEFINED?TRUE:FALSE), | 155 | (warning_interval>UNDEFINED?TRUE:FALSE), |
156 | (int)(1e6*warning_interval), | 156 | warning_interval, |
157 | (critical_interval>UNDEFINED?TRUE:FALSE), | 157 | (critical_interval>UNDEFINED?TRUE:FALSE), |
158 | (int)(1e6*critical_interval), | 158 | critical_interval, |
159 | TRUE, 0, FALSE, 0)); | 159 | TRUE, 0, FALSE, 0)); |
160 | return result; | 160 | return result; |
161 | } | 161 | } |
diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 14d4306..43a38fa 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c | |||
@@ -198,7 +198,7 @@ main (int argc, char **argv) | |||
198 | printf ("%s %s: ", _("DNS"), _("OK")); | 198 | printf ("%s %s: ", _("DNS"), _("OK")); |
199 | printf (ngettext("%.3f second response time, ", "%.3f seconds response time, ", elapsed_time), elapsed_time); | 199 | printf (ngettext("%.3f second response time, ", "%.3f seconds response time, ", elapsed_time), elapsed_time); |
200 | printf (_("%s returns %s"), query_address, address); | 200 | printf (_("%s returns %s"), query_address, address); |
201 | printf ("|%s\n", perfdata ("time", microsec, "us", FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0)); | 201 | printf ("|%s\n", fperfdata ("time", elapsed_time, "s", FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0)); |
202 | } | 202 | } |
203 | else if (result == STATE_WARNING) | 203 | else if (result == STATE_WARNING) |
204 | printf (_("DNS WARNING - %s\n"), | 204 | printf (_("DNS WARNING - %s\n"), |
diff --git a/plugins/check_game.c b/plugins/check_game.c index 3ebf6af..ac72873 100644 --- a/plugins/check_game.c +++ b/plugins/check_game.c | |||
@@ -152,7 +152,7 @@ main (int argc, char **argv) | |||
152 | perfdata ("players", atol(ret[qstat_game_players]), "", | 152 | perfdata ("players", atol(ret[qstat_game_players]), "", |
153 | FALSE, 0, FALSE, 0, | 153 | FALSE, 0, FALSE, 0, |
154 | TRUE, 0, TRUE, atol(ret[qstat_game_players_max])), | 154 | TRUE, 0, TRUE, atol(ret[qstat_game_players_max])), |
155 | perfdata ("ping", atol(ret[qstat_ping_field]), "", | 155 | fperfdata ("ping", strtod(ret[qstat_ping_field], NULL), "", |
156 | FALSE, 0, FALSE, 0, | 156 | FALSE, 0, FALSE, 0, |
157 | TRUE, 0, FALSE, 0)); | 157 | TRUE, 0, FALSE, 0)); |
158 | } | 158 | } |