mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-22 14:46:57 -04:00
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
This commit is contained in:
parent
7d7ca121bc
commit
2563edba02
3 changed files with 5 additions and 5 deletions
|
|
@ -151,11 +151,11 @@ main (int argc, char **argv)
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ main (int argc, char **argv)
|
|||
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"),
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ main (int argc, char **argv)
|
|||
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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue