summaryrefslogtreecommitdiffstats
path: root/plugins/check_smtp.c
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-11-19 06:00:53 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-11-19 06:00:53 (GMT)
commit3a359d9d90ff680c3bc9308752e14f71b02b31fd (patch)
tree398b175176f792701a44da5c49c348b1968e70dd /plugins/check_smtp.c
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
Diffstat (limited to 'plugins/check_smtp.c')
-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 8440aab..8c4f26e 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -168,12 +168,13 @@ main (int argc, char **argv)
168 else if (check_warning_time && elapsed_time > (double) warning_time) 168 else if (check_warning_time && elapsed_time > (double) warning_time)
169 result = STATE_WARNING; 169 result = STATE_WARNING;
170 170
171 if (verbose) 171 printf (_("SMTP %s - %.3f sec. response time%s%s|%s\n"),
172 printf (_("SMTP %s - %.3f sec. response time, %s|time=%ldus\n"), 172 state_text (result), elapsed_time,
173 state_text (result), elapsed_time, buffer, microsec); 173 verbose?", ":"", verbose?buffer:"",
174 else 174 perfdata ("time", microsec, "us",
175 printf (_("SMTP %s - %.3f second response time|time=%ldus\n"), 175 check_warning_time, (long)(1000000*warning_time),
176 state_text (result), elapsed_time, microsec); 176 check_critical_time, (long)(1000000*critical_time),
177 TRUE, 0, FALSE, 0));
177 178
178 return result; 179 return result;
179} 180}