summaryrefslogtreecommitdiffstats
path: root/plugins
AgeCommit message (Collapse)AuthorFilesLines
2014-07-29check_disk: show troubled partition in verbose modeJan Wagner1-5/+11
I'm submitting a small patch to check_disk that will show which partitions are actually causing the error state. This helps the human operator to quickly identify the exact issue. I made it so a single -v flag is required so it doesn't harm legacy code that may be parsing the original style of output. Thanks to Jason Benguerel. --- Closes #984 Closes #1182
2014-07-29check_ntp_time.c - Cleaned up usage and added a noteabrist1-1/+3
Closes #907 Closes #1184
2014-07-29check_ntp_time: adding offset optionJan Wagner1-3/+10
Not sure if this is of use or not - we have a strange requirement to run certain servers 5 minutes fast. I've added a switch to the check_ntp_time to allow for this offset. Thanks to Patrick McAndrew.
2014-07-29netutils.c - A few more changesabrist1-4/+3
Changed bool to short. Removed first instance of is_socket to avoid redeclaration error. Changed 'socket' to 'file socket' for verbosity.
2014-07-29This patch will add the IP and port, or socket name, to the error message andDavide Madrisan1-3/+13
thus simplify the problem debugging: no need to check for this information in the Nagios configuration. This function is only used by 'check_tcp.c'. Without the patch: $ ./plugins/check_tcp -H 127.0.0.1 -p 21 Connection refused $ ./plugins/check_tcp -H /var/spool/nagios/cmd/nagios.cmd Permission denied With the patch: $ ./plugins/check_tcp -H 127.0.0.1 -p 21 connect to address 127.0.0.1 and port 21: Connection refused $ ./plugins/check_tcp -H /var/spool/nagios/cmd/nagios.cmd connect to socket /var/spool/nagios/cmd/nagios.cmd: Permission denied Thanks to Davide Madrisan. --- Closes #1277
2014-07-28check_mysql: ignore authentication failureJan Wagner1-2/+20
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
2014-07-21plugins/tests/check_http.t: Adjust date stringsHolger Weiss1-4/+4
Adjust the expected date strings to the now-localized output produced by plugins/sslutils.c. Closes #1275.
2014-07-21plugins/t/check_dns.t: Fix Perl warningHolger Weiss1-1/+1
Perl said: "Unrecognized escape \d passed through at ./t/check_dns.t line 57."
2014-07-21sslutils: expire time in local timezone formatJan Wagner1-5/+4
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
2014-07-20travis-ci: Adding ports for check_hpjdJan Wagner1-0/+2
2014-07-20added tests for check_hpjd port optionsabrist1-7/+28
--- Closes #1160 and #973
2014-07-20Added check_hpjd port option to news and clarified the port usage error.abrist1-1/+1
2014-07-20check_hpjd - Added a switch for port specification. Defaults to 161.abrist1-6/+24
2014-07-20check_ntp.t - fixed tests for new status outputabrist1-2/+2
closes #1236 and #1239
2014-07-20check_ntp_peer - Added specific state output for each metric. It now should ↵abrist1-12/+37
be easy to see which check caused the alert.
2014-07-10check_procs: Add delay after forking in testrefs/pull/1272/headMikael Falkvidd1-1/+1
Forking raises a race condition, where the parent might run the test before the child has had time to fork. If that happens, an error similar to this is produced: Failed test 'Output correct' at ./t/check_procs.t line 32. 'PROCS OK: 0 processes with args 'sleep 7' | processes=0;;;0;' doesn't match '/^PROCS OK: 1 process?/' Sleeping a bit should avoid the problem. It might be enough to sleep less than a second, but perl's built-in sleep function only supports integer seconds. In our build environment, the build failed 3 of 4 times before this patch. After the patch it failed 0 of 7 times. Signed-off-by: Mikael Falkvidd <mfalkvidd@op5.com>
2014-07-07plugins/netutils.h: Adjust UNIX_PATH_MAX for BSDHolger Weiss1-2/+2
On at least FreeBSD, NetBSD, OpenBSD, DragonFly, and OS X, this is hard-coded at 104 bytes. Closes #1267.
2014-06-30Merge PR #1265 from waja/check_tcp_server_addrJan Wagner2-5/+10
2014-06-30check_jabber.t - fixed tests for new status output including hostnamerefs/pull/1265/headabrist1-3/+3
2014-06-30Merge pull request #1190 from waja/github780Sven Nierlein1-4/+20
check_ssh: check protocol
2014-06-28Merge pull request #1262 from waja/fix_aixSven Nierlein2-4/+3
Include common.h before any system headers.
2014-06-28Merge pull request #1264 from waja/check_nt_unitsSven Nierlein1-2/+2
check_nt.c - Changed 'Mb' to 'MB' in MEMUSE.
2014-06-28Merge pull request #1263 from waja/coverity_fixesSven Nierlein5-10/+24
Serveral coverity fixes from nagios-plugins
2014-06-28tests: added check_dns performance data testSven Nierlein1-1/+2
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-06-28check_dns.c Added a bit more logic to thresholdsabrist1-4/+13
Added two if elses to cover when only one threshold is set.
2014-06-28check_dns: add warning and critical thresholds to perfdataJean-Claude Computing1-1/+8
2014-06-28Cleaned up status output of check_tcp changesabrist1-1/+1
2014-06-28check_tcp: also display the server addr when host_specified is set. This ↵Davide Madrisan1-2/+7
will help the admins when multiple checks are configured Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
2014-06-28check_nt.c - Changed 'Mb' to 'MB' in MEMUSE.refs/pull/1264/headabrist1-2/+2
2014-06-28plugins/negate.c - Function should not return.Spenser Reinhardt1-2/+2
Coverity 66479 - validate_arguments has no need to return anything, as it dies on error, yet was set to return an int. Set to void to resolve warning.
2014-06-28plugins/negate.c - Reorder if statement, aiobSpenser Reinhardt1-2/+1
Coverity 66480 - Potential array index out of bounds, since result was not verified to be positive prior to using as an index for state[]. Simply reording the if statement should resolve the issue. - SR
2014-06-28plugins/check_http.c - leakage fixSpenser Reinhardt1-4/+6
Coverity 66514 - Possible leakage and overflow with addr in redirect functionality. Not confirmed as null terminated, and externally gathered. Restrict string comparisons and duplications by size. - SR
2014-06-28plugins/check_ntp.c - Verify struct from responseSpenser Reinhardt1-2/+11
Coverity 66524 - req.data is not neccessarily null terminated but still feed to printf statements. This both does that, and verifies the struct more so than before. - SR
2014-06-28plugins/check_real.c - recv string null terminateSpenser Reinhardt1-0/+1
Recv into buffer is not properly null terminated prior to strstr and possible other string functions expecting a null termination. Simply take bytes received and use as an index to append \0 after. We are creating buffer[] with size of MAX_INPUT_BUFFER and recv with MAX_INPUT_BUFFER-1 so this should never overflow.
2014-06-28plugins/check_apt.c - Print uninitialized eregSpenser Reinhardt1-0/+3
Coverity 66531 - ereg.buffer can be printed without being initialized if do_include and do_exclude are null and critical is an invalid regex. While minor this may leak memory and cause undefined behavior.
2014-06-28Include common.h before any system headers.refs/pull/1262/headEric J. Mislivec2-4/+3
This should fix some problems building on AIX.
2014-06-24tests: always build and test on travisrefs/pull/1261/headSven Nierlein4-7/+61
also make test is now working on travis-ci Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-06-23check_ide_smart: Fixing spelling bugJan Wagner1-1/+1
2014-06-23check_mrtg: Fixing spelling bugJan Wagner1-1/+1
2014-06-23check_ups/check_dbi: Fixing spelling bugJan Wagner2-6/+6
2014-06-22check_radius.c: Add newline to die() callsHolger Weiss1-14/+14
Our die() function doesn't append a newline character to the message.
2014-06-22check_radius: Support FreeRADIUS Client libraryHolger Weiss1-7/+14
Allow for using the FreeRADIUS Client library instead of radiusclient or radiusclient-ng. The latter two projects are dead. Closes #1231.
2014-06-18plugins/runcmd.c: Remove superfluous newlineHolger Weiss1-1/+1
The puts(3) function already appends a newline character to the string.
2014-06-13tests: freebsds snmpd does not use quotesSven Nierlein1-1/+1
when returning syscontact. So make them optional since we want to test check_snmp and not the snmpd. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-13tests: check_proc tests fail if uid -2 does not map to nobodySven Nierlein1-0/+1
so make sure our tests only run if -2 maps to nobody Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-13tests: fping checks require being root or setuid rootSven Nierlein1-6/+8
on the fping binary. Check this before running the test. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-13require at least HTTP::Daemon 6.01Sven Nierlein1-1/+2
since the test uses send_header from HTTP::Daemon::ClientConn which has been introduced in HTTP::Daemon 6.01
2014-06-12tests: testCmd has own timeout which overwrites local oneSven Nierlein1-15/+9
so add configurable/optional timeout to testCmd. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-12tests: parts of the check_procs test only work when uid -2 existsSven Nierlein1-12/+16
skip those tests if the uid does not exist Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-11Fix compilation with GnuTLSHolger Weiss1-0/+2
GnuTLS doesn't provide a SSL_CTX_check_private_key() function. Closes #1254.