From herbszt at gmx.de Sun Nov 1 13:12:03 2015 From: herbszt at gmx.de (Sebastian Herbszt) Date: Sun, 1 Nov 2015 13:12:03 +0100 Subject: [RESEND][PATCH] check_dns: remove dead code Message-ID: <20151101131203.00005ee4@localhost> Remove code dead since commit 4efa917. Signed-off-by: Sebastian Herbszt --- plugins/check_dns.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 2212122..0316e40 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -81,7 +81,6 @@ main (int argc, char **argv) double elapsed_time; long microsec; struct timeval tv; - int multi_address; int parse_address = FALSE; /* This flag scans for Address: but only after Name: */ output chld_out, chld_err; size_t i; @@ -249,11 +248,6 @@ main (int argc, char **argv) elapsed_time = (double)microsec / 1.0e6; if (result == STATE_OK) { - if (strchr (address, ',') == NULL) - multi_address = FALSE; - else - multi_address = TRUE; - result = get_status(elapsed_time, time_thresholds); if (result == STATE_OK) { printf ("DNS %s: ", _("OK")); -- 2.1.0 From herbszt at gmx.de Sun Nov 1 13:13:21 2015 From: herbszt at gmx.de (Sebastian Herbszt) Date: Sun, 1 Nov 2015 13:13:21 +0100 Subject: [RESEND][PATCH] check_load: remove superfluous argument to printf Message-ID: <20151101131321.00001615@localhost> The format string expects only one argument. Signed-off-by: Sebastian Herbszt --- plugins/check_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/check_load.c b/plugins/check_load.c index cde63e5..31b781c 100644 --- a/plugins/check_load.c +++ b/plugins/check_load.c @@ -160,7 +160,7 @@ main (int argc, char **argv) sscanf (input_buffer, "%*[^l]load averages: %lf, %lf, %lf", &la1, &la5, &la15); } else { - printf (_("could not parse load from uptime: %s\n"), result, PATH_TO_UPTIME); + printf (_("could not parse load from uptime: %s\n"), PATH_TO_UPTIME); return STATE_UNKNOWN; } -- 2.1.0 From herbszt at gmx.de Sun Nov 1 13:14:39 2015 From: herbszt at gmx.de (Sebastian Herbszt) Date: Sun, 1 Nov 2015 13:14:39 +0100 Subject: [RESEND][PATCH] check_ntp_time: remove unused variables Message-ID: <20151101131439.00000ca5@localhost> Remove unused variables. Signed-off-by: Sebastian Herbszt --- plugins/check_ntp_time.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c index e344f8b..f2762ef 100644 --- a/plugins/check_ntp_time.c +++ b/plugins/check_ntp_time.c @@ -244,7 +244,7 @@ void setup_request(ntp_message *p){ * this is done by filtering servers based on stratum, dispersion, and * finally round-trip delay. */ int best_offset_server(const ntp_server_results *slist, int nservers){ - int i=0, cserver=0, best_server=-1; + int cserver=0, best_server=-1; /* for each server */ for(cserver=0; cserver Remove unused variables. Signed-off-by: Sebastian Herbszt --- plugins/check_ntp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c index a7d278d..7450171 100644 --- a/plugins/check_ntp.c +++ b/plugins/check_ntp.c @@ -297,7 +297,7 @@ void setup_request(ntp_message *p){ * this is done by filtering servers based on stratum, dispersion, and * finally round-trip delay. */ int best_offset_server(const ntp_server_results *slist, int nservers){ - int i=0, cserver=0, best_server=-1; + int cserver=0, best_server=-1; /* for each server */ for(cserver=0; cserver Remove unused variables. Signed-off-by: Sebastian Herbszt --- plugins/negate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/negate.c b/plugins/negate.c index beaed1e..b320e35 100644 --- a/plugins/negate.c +++ b/plugins/negate.c @@ -59,8 +59,8 @@ static int state[4] = { int main (int argc, char **argv) { - int found = 0, result = STATE_UNKNOWN; - char *buf, *sub; + int result = STATE_UNKNOWN; + char *sub; char **command_line; output chld_out, chld_err; int i; -- 2.1.0 From herbszt at gmx.de Sun Nov 1 13:10:12 2015 From: herbszt at gmx.de (Sebastian Herbszt) Date: Sun, 1 Nov 2015 13:10:12 +0100 Subject: [RESEND][PATCH] check_disk: remove unused variables Message-ID: <20151101131012.000052e3@localhost> Remove unused variables. Signed-off-by: Sebastian Herbszt --- plugins/check_disk.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 874a0ee..e73a008 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c @@ -58,9 +58,6 @@ const char *email = "devel at monitoring-plugins.org"; # define ERROR -1 #endif -/* If nonzero, show inode information. */ -static int inode_format = 1; - /* If nonzero, show even filesystems with zero size or uninteresting types. */ static int show_all_fs = 1; @@ -178,7 +175,7 @@ main (int argc, char **argv) int temp_result; struct mount_entry *me; - struct fs_usage fsp, tmpfsp; + struct fs_usage fsp; struct parameter_list *temp_list, *path; #ifdef __CYGWIN__ @@ -423,9 +420,7 @@ process_arguments (int argc, char **argv) int c, err; struct parameter_list *se; struct parameter_list *temp_list = NULL, *previous = NULL; - struct parameter_list *temp_path_select_list = NULL; - struct mount_entry *me, *temp_me; - int result = OK; + struct mount_entry *me; regex_t re; int cflags = REG_NOSUB | REG_EXTENDED; int default_cflags = cflags; -- 2.2.0 From notifications at github.com Mon Nov 2 18:16:50 2015 From: notifications at github.com (Gerhard Lausser) Date: Mon, 02 Nov 2015 09:16:50 -0800 Subject: Typo in check_ldap.c usage (#1390) In-Reply-To: References: Message-ID: Reopened #1390. -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1390#event-452223575 -------------- next part -------------- An HTML attachment was scrubbed... URL: From waja at cyconet.org Tue Nov 3 10:53:41 2015 From: waja at cyconet.org (Jan Wagner) Date: Tue, 3 Nov 2015 10:53:41 +0100 Subject: [RESEND][PATCH] check_dns: remove dead code In-Reply-To: <20151101131203.00005ee4@localhost> References: <20151101131203.00005ee4@localhost> Message-ID: <56388425.50602@cyconet.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi Sebastian, Am 01.11.15 um 13:12 schrieb Sebastian Herbszt: > Remove code dead since commit 4efa917. This is in our issue tracker at: https://github.com/monitoring-plugins/monitoring-plugins/pull/1307 -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) iQIcBAEBCgAGBQJWOIQlAAoJEAxwVXtaBlE+7CwP/3yl1oC6pDiTXsRFVjB5qy9Z wa1LggfFlZu1Ltu8DsfP7g/aESRFC3WplCpuDVfvVQPxGsSeIzF/a8g0J+1BRRij 936hzF/MJ/WHKalkcC2rmltmIvl5YWkE/qOshudiFwLzxHNHwRZiLZcdHh2Pl7ms uk35ihxfQRBaE1TMUx2W182IgR6AtADWgbGYmdMX4BRwgqLEKzJhxEelMgSHwQ/m sKiuqnQ/BkvOQs4EjDMIYva5bUgJ9BCUoGlYdArWikf9GUQXufthIAGVnbjO+DqU OKtAvQhisXkXWS1y4roxJAU0yHXkgPqkcGZ+/IRhrZuOfLFWkeYssgnIUwEGQSJ5 I9B7k5OQ1SJsOuIfCKMQ1RpYWVADTzPoQW7gDEqiz2gs8JmUqWI7QZp7tTZO7ZAg hrp3v2ZqZ+lrHdIQp3Y2ixOJ7XXdeC0x12DKXgJn1r8pRhDrQMgGKPt5SbU2L3vn UMUkqUcxHJOopa6lQioaEWtqLhEOMbrJdSUwUQdXzJvgcMJ2GXtWNZNmpHzpzriP xBhagjnHT7+LzVW7UJthb0Kr5VyfEmLOLcNMCF7JcncCCOdz/miRsC9da3t8jEDG vzwJgE7tYEDoPl6VrmUh0bQj/ZPUd/CAFH2+YWuyL05+7HfG6Ok4Guj2FrAP0PSK p3hZOqjuRoMFUgfdflRO =mpqG -----END PGP SIGNATURE----- From waja at cyconet.org Tue Nov 3 10:54:49 2015 From: waja at cyconet.org (Jan Wagner) Date: Tue, 3 Nov 2015 10:54:49 +0100 Subject: [RESEND][PATCH] check_disk: remove unused variables In-Reply-To: <20151101131012.000052e3@localhost> References: <20151101131012.000052e3@localhost> Message-ID: <56388469.70109@cyconet.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi Sebastian, Am 01.11.15 um 13:10 schrieb Sebastian Herbszt: > Remove unused variables. This is in our issue tracker at: https://github.com/monitoring-plugins/monitoring-plugins/pull/1312 -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) iQIcBAEBCgAGBQJWOIRpAAoJEAxwVXtaBlE+5XkP/2VfoFEolLYYDkUubsVB2ZaV fKP6RSjFClmHwRJQJKHr6iGJNFo5vhvGifHPTcUuM7SUEb9M2JQXIuC6/AtWmmFy 1nf3AWk/we9ycaddh/jKC8rn1juCQX0ykt8qPYNFSkBQ8PkoIo5OGwgM7JIDPeNT JQwo7BNTmsOwKAooUiKjCuv+iSPoccvtFPGAgJTtGT7xwhwYV8uIslS/t7zDTqv+ +cW0aUFy9PVeCp2tVayYhA2tEOyMCFY3dq3NoohebYBNCqP3fafhJX2tdh1Jruh4 mQJAsNedWAYRUXD08rQdSPZBWAuuAYT5+izOzhiqcgbDGaqEBc+WDjzop3r4scWn LAlHCZOQ4fLCxpMYMtRROiFYVLlQ7Z3nMHBXEJUK4Ov4D1KecKmhSEUIhE8ofrmx lpYzDDTyx4/GiWyDCJlB/qUOYjyVaWmCxJC3t57dFbA4VuSSDKArXkipM2rezfs2 9Cq77ILs5H+ixuLtBiGI5k0hmBqLloNLEt4z/iwQ+fUwg5EW9xKXVB/LBXQlJ/gC ghbMyQnendUv6BG4OfxqUOuYTUocUnfdPMDrPnMIV4DJ4NWTzKxDCTOX7YUknhN3 D83QiqtaR7XtIlKPAEmiosARa0NoVnVO9+bQfBaulSVIG+VncKJg/jykEyFr2H4r Fo+tg+EhIbuUQ+uDqW66 =DMfo -----END PGP SIGNATURE----- From waja at cyconet.org Tue Nov 3 10:55:36 2015 From: waja at cyconet.org (Jan Wagner) Date: Tue, 3 Nov 2015 10:55:36 +0100 Subject: [RESEND][PATCH] check_load: remove superfluous argument to printf In-Reply-To: <20151101131321.00001615@localhost> References: <20151101131321.00001615@localhost> Message-ID: <56388498.3090309@cyconet.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi Sebastian, Am 01.11.15 um 13:13 schrieb Sebastian Herbszt: > The format string expects only one argument. This is in our issue tracker at: https://github.com/monitoring-plugins/monitoring-plugins/pull/1308 -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) iQIcBAEBCgAGBQJWOISYAAoJEAxwVXtaBlE+e94P/1I8crC/U314e/fM4phBcqQ5 byToKcYvpxU5cN4ViL4PAcH3Prz0uOsh2GYrrB2vH49HBOZvsPs5bHOJRHp16gCw SKfw48jsoYicu8hktiGUdTDv7NlvXC6gNOkBXakimzI75DfsTQwcy6FD0RFmTMwV hxoPp2zz1csbHFCzCj/RcrISZEd/FywcjWZBV5DT2V1ZqZ8k4r5qX8dKJn8U/Fhg hgqGR3C4pBXlODcXPIHG5e5dXunjjdDi4Q33dkibHs6VRzlP4wFqy7ec5zNd0iY+ xjeXrk4gfn9SFpr5tXBofHfAyFt1tcDVoLTsBiRoRDMI3GgoAbCbN9vklxRxDiBM 0pTvk8pvQr3BeQ24hO98rhqpyrtU1B80YSDndtGLcSt1/TOfE8sjQL2MV6qQvVNu sQym2xQFgKGyrnK1TEolZmO8sl1waoaKoJsYGP445gd2MyrysKxx8uQlXCbMOk96 XdpWvPdI92tnuccx9y+T9XB2xoBF75wmohCq/mZr9ZYlkuLm6JxHpPUQ+F64riej S33XZJLjRvOlNsfYeW0D/3//EoBJut0WutUqUO+stT0rNQNJd00/eV/QpQiAWIOt RoZwD/smySUtiikBiA3/GIbj+WD8k9ot7i7r0z3Yu6fYjuumRrqbQpW2nV6o95Bf RD+s7vUL+Vd81RpGgXXG =eSEE -----END PGP SIGNATURE----- From waja at cyconet.org Tue Nov 3 10:56:23 2015 From: waja at cyconet.org (Jan Wagner) Date: Tue, 3 Nov 2015 10:56:23 +0100 Subject: [RESEND][PATCH] check_ntp_time: remove unused variables In-Reply-To: <20151101131439.00000ca5@localhost> References: <20151101131439.00000ca5@localhost> Message-ID: <563884C7.3030700@cyconet.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi Sebastian, Am 01.11.15 um 13:14 schrieb Sebastian Herbszt: > Remove unused variables. This is in our issue tracker at: https://github.com/monitoring-plugins/monitoring-plugins/pull/1313 -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) iQIcBAEBCgAGBQJWOITHAAoJEAxwVXtaBlE+jl0P+wcpkTHHFVt9jQqRyMJXWMet 5wNlTmyjT+RN/plQ93NwHbc9HfhuqkW2JUfhgNVn7a+/cejrqCYsX2G2cOIuzH2m a6gHoWZwUXmFDsN4MSOzIr4wEPv/lA4LwKGT5DDYp5UbZqbBj/qYgCp0q6LF0JjN fHw/z7mZHXlA5Rz5217oX7pdryRMsz0HBXVx0n58nE/SjpmpXFV3ihDx3PIkYxep dubR2E6VXVuZ/UijQ6RRsKxjcpLtgliNblqjiqjuEdgcW9rk9P9ylsACwpGIL6A9 vzOXnoU+bDif+ZEJ3rCRcAWa2NHJ/1ZNZk5sZBbyk0DPd5tDwlSWJfAEGb1kGAz2 ypuyzRST1Zbc/DHHh7Oo/W9zvwGDPx9ZZkAOmHqhtNTAjCj2oT6vtpXeEHKytvyS HtIpOCvlTBryNGWiERHWAob2FXQl3YnuWHW7eIQQ1kzp6TV3KNehN2hELYiuc2S2 +SDxoXsfGNhQhSJm7KZulBfa6DVJPu2y9dIcGInZwOCYectXG0JFm0AsjsMmcVto qAy0GbHRe58Dcl47e3wJgvVL3nxdFdZp3NzvDf/0+9KmdITZm9KqrhAEgxV6SfQp W2eqiPZ/l1PYZxHRQKzesR/a6thnAcssIamc8ueQxjI2Pv4UOsKYg2qX+iNVCnES Noo1OyCdgVFHDTH1emN6 =LBsA -----END PGP SIGNATURE----- From waja at cyconet.org Tue Nov 3 10:57:35 2015 From: waja at cyconet.org (Jan Wagner) Date: Tue, 3 Nov 2015 10:57:35 +0100 Subject: [RESEND][PATCH] check_ntp: remove unused variables In-Reply-To: <20151101131623.000038ce@localhost> References: <20151101131623.000038ce@localhost> Message-ID: <5638850E.2060104@cyconet.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi Sebastian, Am 01.11.15 um 13:16 schrieb Sebastian Herbszt: > Remove unused variables. This is in our issue tracker at: https://github.com/monitoring-plugins/monitoring-plugins/pull/1311 -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) iQIcBAEBCgAGBQJWOIUOAAoJEAxwVXtaBlE+PPkQALTAxXSlx4i3MviwVPgnq25x gTFDqz85eOFKskTyNZ/V5Uip03hNcVt2mMU9MsPZNVhFfQT4QjAHhQxuRroFNhoz 2VRl4IUFFI9CxWsnLBUTgv8sq8XyxXh1rYMn0NEq4TGULlHdowyw70FvaN61HQPY ScTPnrzWTwxkZTtOuLyriWTXFDg93omgjhiTJCn9eoe7ahzv83+50cWMlF+RXoXp b4Z1qKqyTn3T7h8L24vpHx9VpPr/9oTA5PcX4pnRgLdKK5We16ki9bqDM1ut5Cp6 ryQOcXWV1UtPswZIvTVGxmsVGeDBQ7PrrK6NLyPBTxMAJo7CH2Ec+NvhLk4KR591 NPR+bgH127evg42p2sHii1kRbGQM6X9QgtrUAkMF2aBugfYN9UMjfHIAhj1r2cud GKa/FZXgEWsfgOZ2aXswzvPkdOgNaM6sZY0NGAxdignzabNNrxgvhNTc9eDjvXKl JOIMAa9HXsSfRA0/ZQkjBiYiTqD7r3Uo+qhWiWjw+uapVLJDaj4aLDNsHXq1iXD2 1mJTSZR930vMj6OBrIS3ljANtgKYz/oTwg1dCYidoEkDwDSCsbJhWe1wtcsebT3+ okT1snAJNDwHLA/7tSYn7E5PINKMVcBcJ8uOuweGAUf6IAnbc7npvOfVJQ91+/Lp 3x1zpG/SIHCmQe1ahdXn =Abaw -----END PGP SIGNATURE----- From waja at cyconet.org Tue Nov 3 10:58:25 2015 From: waja at cyconet.org (Jan Wagner) Date: Tue, 3 Nov 2015 10:58:25 +0100 Subject: [RESEND][PATCH] negate: remove unused variables In-Reply-To: <20151101131731.00000c2b@localhost> References: <20151101131731.00000c2b@localhost> Message-ID: <56388541.5040305@cyconet.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi Sebastian, Am 01.11.15 um 13:17 schrieb Sebastian Herbszt: > Remove unused variables. This is in our issue tracker at: https://github.com/monitoring-plugins/monitoring-plugins/pull/1309 -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) iQIcBAEBCgAGBQJWOIVAAAoJEAxwVXtaBlE+oKwP/jXtN5DxKswsZOG0QfSNICo8 qI7pwGXIvXhCRo2dCVeK19GR/g4YTrmFCeBkETDE+9F3f4/tdtphdMZYYdTr/tEw +Y05u8hZkvqUqjEhk71hfrSlwv8dSmt+XdIM7ud0GXM5CJh87fGcicFh8G7Ttlfb cknANjoXoMV8zHZlc3jC+GItVmE7B0Urpp9C92aJHKXycavlbUmx5CeBcV/Forjg MI2FGFeyCskSHBj3SXyJrFu+uZWEvkg9qhky+NtQkTEM4NjGEH35rkx65AzK/32o 40V+qWDGF+uTptCn9yLFyOVUM4iWdg6YSXjVREtccQRoikt7ciAaJGtOmvJpuLOO HQg4AG3iInnRks5Ykc1RIPhtv0jGdGTfyyCDk2EZjwr7tVkp+c74aMLjp6e7bGx/ KwG3Ttznfc7NgL5xIpudGCEVqtJBMuGTqDKJ8jV5NKhHQXTXl3xwGmeg2yNH9tgR Z2NfyMVclJjl0bTJWMIyLKknx8dwGKdEHk/vd0MotXdYuMFNW3+w6VNXl8dKy6QL z/C++sk++NTzSu93FyDC9mqw8nuYZj4uMaDANtJfJMAuuCo5U8Rw0LsCEd1UbmAA +LASQlIe2MEerZ0OHZmbcRvivlpAIkGq54zW42aAe2Rz5bnpcrvh72trsr595Qc/ PCL3oVHSaO7Q5ubmLCkQ =g7Ek -----END PGP SIGNATURE----- From notifications at github.com Thu Nov 12 10:38:54 2015 From: notifications at github.com (waja) Date: Thu, 12 Nov 2015 01:38:54 -0800 Subject: check_nagios should support other platforms (#1223) In-Reply-To: References: Message-ID: https://github.com/nagios-plugins/nagios-plugins/issues/94#issuecomment-156047472 points to another implementation of check_nagios -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/issues/1223#issuecomment-156049119 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Nov 20 06:51:13 2015 From: notifications at github.com (Tomas Mozes) Date: Thu, 19 Nov 2015 21:51:13 -0800 Subject: check_load hardcodes path to 'uptime' (#1394) Message-ID: The path to 'uptime' binary is hardcoded when compiling monitoring-plugins. This can break the plugin: - during compilation, put uptime to /usr/bin/uptime - check_load works fine - an updated 'uptime' binary can be put into /bin/uptime - check_load fails This was reported in Gentoo Linux: https://bugs.gentoo.org/show_bug.cgi?id=565500 -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/issues/1394 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Fri Nov 20 11:49:21 2015 From: notifications at github.com (zen2) Date: Fri, 20 Nov 2015 02:49:21 -0800 Subject: check_load hardcodes path to 'uptime' (#1394) In-Reply-To: References: Message-ID: +1 Detection then use hardcoded path for system binaries at compilation time is a real problem. That forces monitoring-plugins to be recompiled/reinstalled each time a binary path change as procps have done with uptime. So it have been detected on gentoo system but since it's compiled based distribution, monitoring-plugins re-installation will take care of it even if it's an annoying dependence. But that means re-packaging and update for packages based distributions, that is really problematic. And finally the most important: each time a system binary have a new PATH, we got no result or unknown result from monitoring probes creating unneeded alerts on monitoring systems. Even worst, that could lead to an acceptable result (result is ok but with problems displayed on stderr) along bad performances data so you lose data without be aware of it. -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/issues/1394#issuecomment-158356629 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jochen.Bern at LINworks.de Fri Nov 20 14:17:57 2015 From: Jochen.Bern at LINworks.de (Jochen Bern) Date: Fri, 20 Nov 2015 14:17:57 +0100 Subject: check_load hardcodes path to 'uptime' (#1394) In-Reply-To: References: Message-ID: <564F1D85.9040208@LINworks.de> On 11/20/2015 06:51 AM, Tomas Mozes wrote: > The path to 'uptime' binary is hardcoded when compiling monitoring-plugins. > This can break the plugin For what it's worth, if a plugin relies on some system executable to be found in $PATH and system maintenance results in an executable of the same name appearing elsewhere, the plugin is *just as likely* to break, *especially* with executables like "uptime" that aim to have *human readable* output. Heck, I'ld expect that to break when you touch $LANG, much less $PATH or $HOME/bin. Hardcoded pathes for some executable appear all over the place, from /etc/shells to scripts using /bin/true and /bin/ls to prevent falling for users' aliases to checking beforehand whether the executable *is even available* (a la "test -x"). The rationale for using them usually boils down to "it'll break *less often* than the alternatives". Kind regards, Jochen Bern Systemingenieur -- LINworks GmbH Fon: +49 6151 9067-231 Fax: +49 6151 9067-299 E-Mail: Jochen.Bern at LINworks.de Web: http://www.LINworks.de/ NEC IT Infrastrukturprodukte vom Deutschland Distributor Server, Storage, Virtualisierung, Management Software Shop: http://www.NEC-Store.de/ Briefanschrift: Postfach 10 01 21 ? 64201 Darmstadt ? DE Hausanschrift: Robert-Koch-Stra?e 9 ? 64331 Weiterstadt ? DE Gesch?ftsf?hrer: Metin Dogan, Nils Manegold, Oliver Michel Unternehmenssitz: Weiterstadt Register: Amtsgericht Darmstadt, HRB 85202 MAX21-Unternehmensgruppe -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3924 bytes Desc: S/MIME Cryptographic Signature URL: From notifications at github.com Tue Nov 24 04:05:51 2015 From: notifications at github.com (Peter (pir)) Date: Mon, 23 Nov 2015 19:05:51 -0800 Subject: Use GMT timezone in SSL certs (#1395) Message-ID: SSL certs are required to use times in GMT per https://www.ietf.org/rfc/rfc5280.txt but the mktime() here assumes the current timezone. Fix the time_t conversion to be done assuming GMT with timegm() and only do it once rather than twice. Display the expiry date and time with ISO format years and give an offset from GMT and a timezone to be very clear about exactly what time is being displayed. Time given is correct and now in the machine?s timezone. You can view, comment on, or merge this pull request online at: https://github.com/monitoring-plugins/monitoring-plugins/pull/1395 -- Commit Summary -- * Use GMT timezone in SSL certs -- File Changes -- M plugins/sslutils.c (6) -- Patch Links -- https://github.com/monitoring-plugins/monitoring-plugins/pull/1395.patch https://github.com/monitoring-plugins/monitoring-plugins/pull/1395.diff --- Reply to this email directly or view it on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1395 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Nov 24 04:44:42 2015 From: notifications at github.com (Peter (pir)) Date: Mon, 23 Nov 2015 19:44:42 -0800 Subject: Use GMT timezone in SSL certs (#1395) In-Reply-To: References: Message-ID: Need to fix the tests too... -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1395#issuecomment-159142436 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Nov 24 04:44:42 2015 From: notifications at github.com (Peter (pir)) Date: Mon, 23 Nov 2015 19:44:42 -0800 Subject: Use GMT timezone in SSL certs (#1395) In-Reply-To: References: Message-ID: Closed #1395. -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1395#event-472851768 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Nov 24 04:49:36 2015 From: notifications at github.com (Peter (pir)) Date: Mon, 23 Nov 2015 19:49:36 -0800 Subject: Use GMT timezone in SSL certs (#1396) Message-ID: SSL certs are required to use times in GMT per https://www.ietf.org/rfc/rfc5280.txt but the mktime() here assumes the current timezone. Fix the time_t conversion to be done assuming GMT with timegm() and only do it once rather than twice. Display the expiry date and time with ISO format years and give an offset from GMT and a timezone to be very clear about exactly what time is being displayed. Time given is correct and now in the machine?s timezone. Fix tests to match. You can view, comment on, or merge this pull request online at: https://github.com/monitoring-plugins/monitoring-plugins/pull/1396 -- Commit Summary -- * Use GMT timezone in SSL certs * Fix check_http test time output -- File Changes -- M plugins/sslutils.c (6) M plugins/tests/check_http.t (8) -- Patch Links -- https://github.com/monitoring-plugins/monitoring-plugins/pull/1396.patch https://github.com/monitoring-plugins/monitoring-plugins/pull/1396.diff --- Reply to this email directly or view it on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1396 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Nov 24 11:55:32 2015 From: notifications at github.com (Sven Nierlein) Date: Tue, 24 Nov 2015 02:55:32 -0800 Subject: Use GMT timezone in SSL certs (#1396) In-Reply-To: References: Message-ID: I'd prefer to keep %c time format but force timezone to GMT. Then people can at least can continue to use their local time format and still get the valid GMT date. -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1396#issuecomment-159228938 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Nov 24 13:05:24 2015 From: notifications at github.com (Peter (pir)) Date: Tue, 24 Nov 2015 04:05:24 -0800 Subject: Use GMT timezone in SSL certs (#1396) In-Reply-To: References: Message-ID: We've found having the GMT date confusing for people, especially with the current redhat built version we're using where it lists a date/time with no timezone at all. %c on more recent builds can list the wrong timezone, which is doubly incorrect. The only way I can think of to do what you're saying and not have it be confusing is to force TZ to GMT before the strftime() and put it back to whatever it was before afterwards which feels ugly at best. The local time representation of %c is unclear for international users, we have people all around the world but the servers are in the US meaning we get US format ambiguous dates that no one likes and most people can't correctly interpret without a timezone listed. This has caused several near-outages. -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1396#issuecomment-159248347 -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at github.com Tue Nov 24 15:14:02 2015 From: notifications at github.com (Peter (pir)) Date: Tue, 24 Nov 2015 06:14:02 -0800 Subject: Use GMT timezone in SSL certs (#1396) In-Reply-To: References: Message-ID: For example, on OSX, if you use %c you get: pir at shiny> ./plugins/check_http -H www.mozilla.org --onredirect=follow --ssl --sni -C 200000 -4 WARNING - Certificate 'www.mozilla.org' expires in 400 day(s) (Thu 29 Dec 12:00:00 2016). No timezone listed. You have to know that time is in GMT whereas people generally assume timezone is in the server timezone (which would be PST or other timezones for most of our monitoring servers). With this code: tz = getenv("TZ"); setenv("TZ", "GMT", 1); tzset(); strftime(timestamp, 50, "%c %z", localtime(&tm_t)); if (tz) setenv("TZ", tz, 1); else unsetenv("TZ"); tzset(); I get: WARNING - Certificate 'www.mozilla.org' expires in 400 day(s) (Thu 29 Dec 12:00:00 2016 +0000). Which at least lists a time offset from GMT (0 here, since the date is in GMT) and should make it obvious what timezone is and if a timezone is included in %c already the offset is additional information rather than repeating the timezone name. How does that sound? -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1396#issuecomment-159278706 -------------- next part -------------- An HTML attachment was scrubbed... URL: