summaryrefslogtreecommitdiffstats
path: root/plugins/check_smtp.c
diff options
context:
space:
mode:
authorMatthew Kent <mattkent@users.sourceforge.net>2004-11-18 05:36:29 (GMT)
committerMatthew Kent <mattkent@users.sourceforge.net>2004-11-18 05:36:29 (GMT)
commit20cb4595faa621d6736d7fc341dc3350c5f4c5e0 (patch)
tree26c3bd8cf804c79377afc370cf290454cdf877e7 /plugins/check_smtp.c
parent855fac729d15bcb8010b0ea39b1c98a2c99cd420 (diff)
downloadmonitoring-plugins-20cb4595faa621d6736d7fc341dc3350c5f4c5e0.tar.gz
Go critical on no route to host instead of warning (934025)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@901 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r--plugins/check_smtp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 314f59b..19e9731 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -219,10 +219,11 @@ main (int argc, char **argv)
219 microsec = deltime (tv); 219 microsec = deltime (tv);
220 elapsed_time = (double)microsec / 1.0e6; 220 elapsed_time = (double)microsec / 1.0e6;
221 221
222 if (check_critical_time && elapsed_time > (double) critical_time) 222 if (result == STATE_OK)
223 result = STATE_CRITICAL; 223 if (check_critical_time && elapsed_time > (double) critical_time)
224 else if (check_warning_time && elapsed_time > (double) warning_time) 224 result = STATE_CRITICAL;
225 result = STATE_WARNING; 225 else if (check_warning_time && elapsed_time > (double) warning_time)
226 result = STATE_WARNING;
226 227
227 printf (_("SMTP %s - %.3f sec. response time%s%s|%s\n"), 228 printf (_("SMTP %s - %.3f sec. response time%s%s|%s\n"),
228 state_text (result), elapsed_time, 229 state_text (result), elapsed_time,