From d67a293db2d9894e76b5a523153c17082b165f71 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sun, 22 Jun 2014 23:54:55 +0200 Subject: THANKS.in: Add new authors Add the new Git commit authors to the THANKS.in file. --- THANKS.in | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'THANKS.in') diff --git a/THANKS.in b/THANKS.in index 06000513..a8eb3e5e 100644 --- a/THANKS.in +++ b/THANKS.in @@ -308,3 +308,14 @@ Luca Corti Jethro Carr Evgeni Golov Oskar Liljeblad +Andrew Widdersheim +Anton Lofgren +Damian Myerscough +Davide Madrisan +Gunnar Beutner +Joseph Gooch +Lars Vogdt +Ricardo Maraschini +Spenser Reinhardt +Stephane Lapie +Tilmann Bubeck -- cgit v1.2.3-74-g34f1 From 9cb630692805b3f35e6a81f98e64f55f164506bd Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sun, 6 Jul 2014 12:26:39 +0200 Subject: THANKS.in: Add new authors Update the THANKS.in file with the new Git commit authors. --- THANKS.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'THANKS.in') diff --git a/THANKS.in b/THANKS.in index a8eb3e5e..9b458c37 100644 --- a/THANKS.in +++ b/THANKS.in @@ -319,3 +319,6 @@ Ricardo Maraschini Spenser Reinhardt Stephane Lapie Tilmann Bubeck +Eric J. Mislivec +Jean-Claude Computing +Andy Brist -- cgit v1.2.3-74-g34f1 From 7e0661a0930370248a0cd13174a6488fb1345ea0 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Thu, 10 Jul 2014 21:31:17 +0200 Subject: Update THANKS.in file with latest author --- THANKS.in | 1 + 1 file changed, 1 insertion(+) (limited to 'THANKS.in') diff --git a/THANKS.in b/THANKS.in index 9b458c37..883387e5 100644 --- a/THANKS.in +++ b/THANKS.in @@ -322,3 +322,4 @@ Tilmann Bubeck Eric J. Mislivec Jean-Claude Computing Andy Brist +Mikael Falkvidd -- cgit v1.2.3-74-g34f1 From 69b719aa2e3bd8dfd643d7cbe60e6e165d5279ea Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 30 Sep 2013 17:55:22 +0200 Subject: check_ifstatus: perfdata bug The perfdata output violates the current Nagios Plugin Development Guidelines (http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN202 : "space separated list of label/value pairs"). Thus the Addon PNP did not read the perdata correctly. The patch replaces the commas with spaces in the perfdata output. Many thanks to Patric Wust. --- Closes #1169 and #721. --- THANKS.in | 1 + plugins-scripts/check_ifstatus.pl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'THANKS.in') diff --git a/THANKS.in b/THANKS.in index 883387e5..43ba182f 100644 --- a/THANKS.in +++ b/THANKS.in @@ -323,3 +323,4 @@ Eric J. Mislivec Jean-Claude Computing Andy Brist Mikael Falkvidd +Patric Wust diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl index fb17d983..709ad174 100755 --- a/plugins-scripts/check_ifstatus.pl +++ b/plugins-scripts/check_ifstatus.pl @@ -221,7 +221,7 @@ foreach $key (keys %ifStatus) { $ifexclude, $ifunused); } -my $perfdata = sprintf("up=%d,down=%d,dormant=%d,excluded=%d,unused=%d",$ifup,$ifdown,$ifdormant,$ifexclude,$ifunused); +my $perfdata = sprintf("up=%d down=%d dormant=%d excluded=%d unused=%d",$ifup,$ifdown,$ifdormant,$ifexclude,$ifunused); print ("$state: $answer |$perfdata\n"); exit $ERRORS{$state}; -- cgit v1.2.3-74-g34f1 From 3bf812beaee7035b1c08e49b55d7962056931d7b Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 1 Oct 2013 09:26:41 +0200 Subject: sslutils: expire time in local timezone format sshutils prints the expiry time of certificates in US format this patch uses the strftime %c, I don't know how portable that is Thanks to Neil Prockter. Closes #1188 Closes #1161 Closes #977 Closes #976 Closes #975 Closes #840 Closes #382 --- THANKS.in | 1 + plugins/sslutils.c | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'THANKS.in') diff --git a/THANKS.in b/THANKS.in index 43ba182f..6738ae7f 100644 --- a/THANKS.in +++ b/THANKS.in @@ -324,3 +324,4 @@ Jean-Claude Computing Andy Brist Mikael Falkvidd Patric Wust +Neil Prockter diff --git a/plugins/sslutils.c b/plugins/sslutils.c index 687bffb7..d0ae4741 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c @@ -153,7 +153,8 @@ int np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit){ struct tm stamp; float time_left; int days_left; - char timestamp[17] = ""; + char timestamp[50] = ""; + time_t tm_t; certificate=SSL_get_peer_certificate(s); if (!certificate) { @@ -211,10 +212,8 @@ int np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit){ time_left = difftime(timegm(&stamp), time(NULL)); days_left = time_left / 86400; - snprintf - (timestamp, 17, "%02d/%02d/%04d %02d:%02d", - stamp.tm_mon + 1, - stamp.tm_mday, stamp.tm_year + 1900, stamp.tm_hour, stamp.tm_min); + tm_t = mktime (&stamp); + strftime(timestamp, 50, "%c", localtime(&tm_t)); if (days_left > 0 && days_left <= days_till_exp_warn) { printf (_("%s - Certificate '%s' expires in %d day(s) (%s).\n"), (days_left>days_till_exp_crit)?"WARNING":"CRITICAL", cn, days_left, timestamp); -- cgit v1.2.3-74-g34f1 From 2e8d440e73ac2b1875db5ecaf6df510fdcf6eb7a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 1 Oct 2013 00:47:08 +0200 Subject: check_mysql: ignore authentication failure This patch allows checking if MySQL server is running without providing valid username and password. Similar to check_ssh plugin it returns MySQL server version string and protocol number. Example: check_mysql -n -H aaa.bbb.ccc.ddd MySQL OK - Version: 5.0.51a-24+lenny5 (protocol 10) This is useful for monitoring servers where one does not have administrator privileges or does not want to grant any privileges for the monitoring station. To enable this functionality new option --ignore-auth (-n) is added to check_mysql plugin. Thanks to Julius Kriukas Closes #1020 Closes #1178 --- THANKS.in | 1 + plugins/check_mysql.c | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'THANKS.in') diff --git a/THANKS.in b/THANKS.in index 6738ae7f..b732e787 100644 --- a/THANKS.in +++ b/THANKS.in @@ -325,3 +325,4 @@ Andy Brist Mikael Falkvidd Patric Wust Neil Prockter +Julius Kriukas diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 4f09e5f8..216626bc 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c @@ -42,6 +42,7 @@ const char *email = "devel@monitoring-plugins.org"; #include "netutils.h" #include +#include #include char *db_user = NULL; @@ -59,6 +60,7 @@ char *opt_file = NULL; char *opt_group = NULL; unsigned int db_port = MYSQL_PORT; int check_slave = 0, warn_sec = 0, crit_sec = 0; +int ignore_auth = 0; int verbose = 0; static double warning_time = 0; @@ -136,7 +138,16 @@ main (int argc, char **argv) mysql_ssl_set(&mysql,key,cert,ca_cert,ca_dir,ciphers); /* establish a connection to the server and error checking */ if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,db_socket,0)) { - if (mysql_errno (&mysql) == CR_UNKNOWN_HOST) + if (ignore_auth && mysql_errno (&mysql) == ER_ACCESS_DENIED_ERROR) + { + printf("MySQL OK - Version: %s (protocol %d)\n", + mysql_get_server_info(&mysql), + mysql_get_proto_info(&mysql) + ); + mysql_close (&mysql); + return STATE_OK; + } + else if (mysql_errno (&mysql) == CR_UNKNOWN_HOST) die (STATE_WARNING, "%s\n", mysql_error (&mysql)); else if (mysql_errno (&mysql) == CR_VERSION_ERROR) die (STATE_WARNING, "%s\n", mysql_error (&mysql)); @@ -341,6 +352,7 @@ process_arguments (int argc, char **argv) {"critical", required_argument, 0, 'c'}, {"warning", required_argument, 0, 'w'}, {"check-slave", no_argument, 0, 'S'}, + {"ignore-auth", no_argument, 0, 'n'}, {"verbose", no_argument, 0, 'v'}, {"version", no_argument, 0, 'V'}, {"help", no_argument, 0, 'h'}, @@ -357,7 +369,7 @@ process_arguments (int argc, char **argv) return ERROR; while (1) { - c = getopt_long (argc, argv, "hlvVSP:p:u:d:H:s:c:w:a:k:C:D:L:f:g:", longopts, &option); + c = getopt_long (argc, argv, "hlvVnSP:p:u:d:H:s:c:w:a:k:C:D:L:f:g:", longopts, &option); if (c == -1 || c == EOF) break; @@ -419,6 +431,9 @@ process_arguments (int argc, char **argv) case 'S': check_slave = 1; /* check-slave */ break; + case 'n': + ignore_auth = 1; /* ignore-auth */ + break; case 'w': warning = optarg; warning_time = strtod (warning, NULL); @@ -506,6 +521,9 @@ print_help (void) printf (UT_EXTRA_OPTS); printf (UT_HOST_PORT, 'P', myport); + printf (" %s\n", "-n, --ignore-auth"); + printf (" %s\n", _("Ignore authentication failure and check for mysql connectivity only")); + printf (" %s\n", "-s, --socket=STRING"); printf (" %s\n", _("Use the specified socket (has no effect if -H is used)")); -- cgit v1.2.3-74-g34f1 From 5dcbab6b7c9c2c0f76e0bbb30acf9d218f017074 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 21 Jul 2014 12:25:57 +0200 Subject: Adding Patrick McAndrew to THANKS.in --- THANKS.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'THANKS.in') diff --git a/THANKS.in b/THANKS.in index b732e787..b6dc2941 100644 --- a/THANKS.in +++ b/THANKS.in @@ -324,5 +324,5 @@ Jean-Claude Computing Andy Brist Mikael Falkvidd Patric Wust -Neil Prockter Julius Kriukas +Patrick McAndrew -- cgit v1.2.3-74-g34f1