From 6e246799b939d29fe80da03ee39a24ef68f78cb0 Mon Sep 17 00:00:00 2001 From: "Eric J. Mislivec" Date: Thu, 5 Jun 2014 16:05:46 -0500 Subject: Include common.h before any system headers. This should fix some problems building on AIX. --- plugins/check_tcp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugins/check_tcp.c') diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 2714961f..ebdccd1b 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -32,13 +32,12 @@ char *progname; const char *copyright = "1999-2008"; const char *email = "devel@monitoring-plugins.org"; -#include - #include "common.h" #include "netutils.h" #include "utils.h" #include "utils_tcp.h" +#include #include #ifdef HAVE_SSL -- cgit v1.2.3 From 4231415878daedefd707a39e54f7b438238908d6 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Thu, 20 Feb 2014 13:12:26 +0100 Subject: check_tcp: also display the server addr when host_specified is set. This will help the admins when multiple checks are configured Signed-off-by: Davide Madrisan --- plugins/check_tcp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'plugins/check_tcp.c') diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 2714961f..0b87d687 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -354,8 +354,13 @@ main (int argc, char **argv) printf("Unexpected response from host/socket on "); else printf("%.3f second response time on ", elapsed_time); - if(server_address[0] != '/') - printf("port %d", server_port); + if(server_address[0] != '/') { + if (host_specified) + printf("host %s and port %d", + server_address, server_port); + else + printf("port %d", server_port); + } else printf("socket %s", server_address); } -- cgit v1.2.3 From b5d78f9556f6da877afaa763f281e7495d572367 Mon Sep 17 00:00:00 2001 From: abrist Date: Thu, 20 Feb 2014 16:02:36 -0500 Subject: Cleaned up status output of check_tcp changes --- plugins/check_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/check_tcp.c') diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 0b87d687..b0459f2b 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -356,7 +356,7 @@ main (int argc, char **argv) printf("%.3f second response time on ", elapsed_time); if(server_address[0] != '/') { if (host_specified) - printf("host %s and port %d", + printf("%s port %d", server_address, server_port); else printf("port %d", server_port); -- cgit v1.2.3