aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_tcp.c
diff options
context:
space:
mode:
authorGravatar Matthias Eble <psychotrahe@users.sourceforge.net> 2007-05-29 19:11:42 +0000
committerGravatar Matthias Eble <psychotrahe@users.sourceforge.net> 2007-05-29 19:11:42 +0000
commit1e2982f0723fe7e884d63212530ad9c9d491a2f5 (patch)
tree26e00ad8b951ff82c07fd0d26ab19c6500f3f8fd /plugins/check_tcp.c
parent063d2541ef07e07a49ad7728c2c6b0154af7123f (diff)
downloadmonitoring-plugins-1e2982f0723fe7e884d63212530ad9c9d491a2f5.tar.gz
No more warn/crit values in performance data if -w and -c are not specified.
Thanks to Simon Bellwood (#1181554) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1722 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_tcp.c')
-rw-r--r--plugins/check_tcp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 57e1f0df..a977077c 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -366,16 +366,16 @@ main (int argc, char **argv)
if(match == -2)
printf ("|%s",
fperfdata ("time", elapsed_time, "s",
- TRUE, 0,
- TRUE, 0,
+ (flags & FLAG_TIME_WARN ? TRUE : FALSE), 0,
+ (flags & FLAG_TIME_CRIT ? TRUE : FALSE), 0,
TRUE, 0,
TRUE, socket_timeout)
);
else
printf("|%s",
fperfdata ("time", elapsed_time, "s",
- TRUE, warning_time,
- TRUE, critical_time,
+ (flags & FLAG_TIME_WARN ? TRUE : FALSE), warning_time,
+ (flags & FLAG_TIME_CRIT ? TRUE : FALSE), critical_time,
TRUE, 0,
TRUE, socket_timeout)
);