mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
use perfdata() to return perfoamnace data in stanadrd format
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@772 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
8a449690f3
commit
3a359d9d90
1 changed files with 7 additions and 6 deletions
|
|
@ -168,12 +168,13 @@ main (int argc, char **argv)
|
|||
else if (check_warning_time && elapsed_time > (double) warning_time)
|
||||
result = STATE_WARNING;
|
||||
|
||||
if (verbose)
|
||||
printf (_("SMTP %s - %.3f sec. response time, %s|time=%ldus\n"),
|
||||
state_text (result), elapsed_time, buffer, microsec);
|
||||
else
|
||||
printf (_("SMTP %s - %.3f second response time|time=%ldus\n"),
|
||||
state_text (result), elapsed_time, microsec);
|
||||
printf (_("SMTP %s - %.3f sec. response time%s%s|%s\n"),
|
||||
state_text (result), elapsed_time,
|
||||
verbose?", ":"", verbose?buffer:"",
|
||||
perfdata ("time", microsec, "us",
|
||||
check_warning_time, (long)(1000000*warning_time),
|
||||
check_critical_time, (long)(1000000*critical_time),
|
||||
TRUE, 0, FALSE, 0));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue