summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2012-06-27 15:29:11 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2012-06-27 15:29:11 (GMT)
commitcbc8a7f313c3e093165e544b4507539932c7f3e1 (patch)
tree278182f6beca7c0005e28234e062dd911ce7b088 /plugins
parent10cf77ca5cf473d09037a2fea3ef21824806da2d (diff)
downloadmonitoring-plugins-cbc8a7f313c3e093165e544b4507539932c7f3e1.tar.gz
check_tcp: Print performance data even with -D
When using the 1.4.15 release of the Nagios Plugins, a command such as check_tcp -H pop.example.com -p 995 -D 14 usually produced two lines of output, e.g.: OK - Certificate will expire on 12/13/2014 23:59. TCP OK - 0.009 second response time on port 995|time=0.008849s;;;0.000000;10.000000 The second line was removed by 4d06603060fc1233861b164870f0d3a2e0d8d2eb. However, as the old two-line output is a valid (though in this case unintended) way to spit out performance data, removing the second line might break current setups. Therefore, we revert to the old behaviour, at least for the moment. The issue was reported by Jochen Bern on the "nagiosplug-devel" mailing list (Message-ID: <4FEAE812.8030309@LINworks.de>).
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 7b0f7f8..1bbb05a 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -238,7 +238,7 @@ main (int argc, char **argv)
238 result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit); 238 result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
239 } 239 }
240 } 240 }
241 if(result != STATE_OK || check_cert == TRUE){ 241 if(result != STATE_OK){
242 np_net_ssl_cleanup(); 242 np_net_ssl_cleanup();
243 if(sd) close(sd); 243 if(sd) close(sd);
244 return result; 244 return result;