aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-11-19 06:00:53 +0000
committerGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-11-19 06:00:53 +0000
commit3a359d9d90ff680c3bc9308752e14f71b02b31fd (patch)
tree398b175176f792701a44da5c49c348b1968e70dd
parent8a449690f3c2c38bb552e3f905c62bfacb631280 (diff)
downloadmonitoring-plugins-3a359d9d90ff680c3bc9308752e14f71b02b31fd.tar.gz
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
-rw-r--r--plugins/check_smtp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 8440aab1..8c4f26e3 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -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;
}