summaryrefslogtreecommitdiffstats
path: root/plugins/t
AgeCommit message (Collapse)AuthorFilesLines
2016-11-11check_http: add host header testsSven Nierlein1-1/+27
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07tests: enable snmp testsSven Nierlein1-2/+2
Enabled snmp tests against snmpd on localhost. It was installed already in the travis file, we just need to enable the tests by setting the parameters in the answers file. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07check_snmp: fix number of tests skipedSven Nierlein1-1/+1
2016-11-07check_snmp: add testcase for no datatypeSven Nierlein1-1/+5
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07tests: adjust check_http to new output formatSven Nierlein1-2/+2
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07check_users: add new test casesSven Nierlein1-1/+3
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-02-22Let check_http test use HTTP/1.1Holger Weiss1-1/+1
2015-10-08Merge branch 'maint'Holger Weiss1-2/+2
* maint: sslutils: Remove superfluous parenthesis for sslv3 function too sslutils: remove superfluous parenthesis check_snmp: modified tests check_snmp.c: switched DEFAULT_TIMEOUT to DEFAULT_SOCKET_TIMEOUT (provided by utils.h), already used by help description, see issue #1318 install snmpd on travis tests enable libtab on travis builds add perl snmp to travis dependencies NEWS: Mention check_ups performance data fix Fix incorrect performance data thresholds check_dhcp: Fix option parsing Fixes segfaults when running via monitoring worker (off-by-one) travis: fix http test host sslutils: Check if OpenSSL supports SSLv3. Conflicts: NEWS plugins/sslutils.c
2015-10-04check_snmp: modified testsOliver Skibbe1-2/+2
(Closes #1325)
2015-10-02add faketime based tests for check_httpSven Nierlein1-3/+40
2015-10-02travis: fix http test hostSven Nierlein1-1/+1
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-01travis: fix http test hostSven Nierlein1-1/+1
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-04-23check_ldap: fix number of skipable testsSven Nierlein1-2/+2
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2015-04-22add check_ldap testSven Nierlein2-0/+82
install openldap on travis and grep base dn from slapcat. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-07-31tests: negate test fails when not run from plugins folderSven Nierlein1-1/+1
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-07-31tests: get current directory the perl waySven Nierlein1-1/+2
instead of hoping to have it in the environment. This at least broke tests on solaris. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-07-30check_dns: added test for nonresponsive dns server (#982)Sven Nierlein1-1/+11
Signed-off-by: Sven Nierlein <sven@nierlein.de>
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-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-20check_ntp.t - fixed tests for new status outputabrist1-2/+2
closes #1236 and #1239
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-06-30Merge PR #1265 from waja/check_tcp_server_addrJan Wagner1-3/+3
2014-06-30check_jabber.t - fixed tests for new status output including hostnamerefs/pull/1265/headabrist1-3/+3
2014-06-28tests: added check_dns performance data testSven Nierlein1-1/+2
Signed-off-by: Sven Nierlein <sven@nierlein.de>
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-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-04-24check_snmp: Handle SNMPv3 noAuthNoPriv properlyAnton Lofgren1-2/+9
The SNMPv3 noAuthNoPriv security level, somewhat unintuitively, requires a security name to be passed along together with the request. Check_snmp previously did not do this, causing snmpget to throw an error: "External command error: No log handling enabled - turning on stderr logging snmpget: No securityName specified" This patch fixes the issue by always providing the security name when noAuthNoPriv is specified. See also: https:://bugs.op5.com/view.php?id=8385. Signed-off-by: Anton Lofgren <alofgren@op5.com>
2014-01-29TypoThomas Guyot-Sionnest1-1/+1
2014-01-28Clarify check_mysql test promptsThomas Guyot-Sionnest1-15/+17
Also default to "-u test -ptest" which are default MySQL accounts only missing the prescribed privileges. The database is no longer specified as it is not used. If wanted is should be its own parameter/tests.
2014-01-21Merge branch 'maint'Holger Weiss2-6/+14
* maint: check_ssh: Get rid of sshd: Read from socket failed: Connection reset by peer fixed tests when there is no direct internet connection NEWS: Mention fix for check_http's -S option Fix for SSL Versioning when multiple options are used. Fix #1217 spec file fails to build due to duplicate files and unused files check_http: Don't let "-N" expect an argument README: Change GitHub URL README: Clarify license notice Update URLs and mailing list addresses Just using the posix conform extended regular expression grep check_oracle: --db +ASM bad string matching check_oracle doesn't correctly check for pmon +ASM instance from at least Oracle 11 as the pmon proces was renamed from ora_pmon_.* to asm_pmon_.*. -- Just turning attached patch of github issue #1207 into a push request. (Closes #1207) Update web site URLs Conflicts: FAQ NEWS README SUPPORT configure.in monitoring-plugins.spec.in pkg/solaris/pkginfo.in plugins-root/check_dhcp.c plugins-root/check_icmp.c plugins-scripts/check_ifoperstatus.pl plugins-scripts/check_mssql.pl plugins/check_apt.c plugins/check_by_ssh.c plugins/check_cluster.c plugins/check_dbi.c plugins/check_dig.c plugins/check_disk.c plugins/check_dns.c plugins/check_dummy.c plugins/check_fping.c plugins/check_game.c plugins/check_hpjd.c plugins/check_http.c plugins/check_ide_smart.c plugins/check_ldap.c plugins/check_load.c plugins/check_mrtg.c plugins/check_mrtgtraf.c plugins/check_mysql.c plugins/check_mysql_query.c plugins/check_nagios.c plugins/check_nt.c plugins/check_ntp.c plugins/check_ntp_peer.c plugins/check_ntp_time.c plugins/check_nwstat.c plugins/check_overcr.c plugins/check_pgsql.c plugins/check_ping.c plugins/check_procs.c plugins/check_radius.c plugins/check_real.c plugins/check_smtp.c plugins/check_snmp.c plugins/check_ssh.c plugins/check_swap.c plugins/check_tcp.c plugins/check_time.c plugins/check_ups.c plugins/check_users.c plugins/negate.c plugins/urlize.c plugins/utils.h po/Makevars po/de.po po/fr.po po/monitoring-plugins.pot
2014-01-20Minor fixes to be amended into "rename" commitHolger Weiss1-1/+1
2014-01-19Project rename initial commit.Monitoring Plugins Development Team3-14/+14
This is an initial take at renaming the project to Monitoring Plugins. It's not expected to be fully complete, and it is expected to break things (The perl module for instance). More testing will be required before this goes mainline.
2013-12-27fixed tests when there is no direct internet connectionSven Nierlein2-6/+14
- check http had wrong number of skipped tests - check tcp did not use the 'no internet' flag at all
2013-11-20make testing check_proc not rely on bashSven Nierlein1-6/+4
also grandparents make this test fail but is not a problem in real live. NPTest->testCmd uses "sh -c" already, so there is no need to do that twice.
2013-11-19check_procs: ignore plugin parent processAnton Lofgren1-1/+8
This fixes an issue that appears when running check_procs over NRPE, where the default shell is configured to (for example) dash, as is the case on Debian. dash (and tcsh, and mksh, and probably others), when invoked with -c forks an additional process to execute the argument string. Contrast this with bash, which does not do this, provided that the argument string simply can be exec()'d as-is. To demonstrate: $ bash -c pstree init─┬ .. ... ├─sshd─-─sshd───pstree versus $ dash -c pstree init─┬ .. ... ├─sshd─-─sshd───dash───pstree The consequence of this fork is that the following invocation: /opt/plugins/check_procs -a init will result in this output: PROCS OK: 2 processes with args 'init' | processes=2;;;0; because the check_procs, in addition to finding the actual init process, finds its parent shell as well. This example is a bit contrived, but I think it illustrates the point. This wouldn't really be a problem, and normally isn't, if it weren't for the fact that NRPE uses a call to popen() which does exactly the above (executes '/bin/sh -c ...'), causing inconsistent behaviour between distributions and much confusion for end users. The argument may be made that the dash process spawned by NRPE is just a process like any other, and should therefore be included in the process count just like any other. However, this is not very intuitive, because of the previously mentioned inconsistencies. The argument might also well be made that we're _never_ interested in the immediate ancestor of the plugin, and while it is unknown how many installations have already made the necessary modifications to their setups to make up for the fact that the plugin behaves the way it does, it is not deemed worthwhile to entertain such workarounds. Thus, this patch ignores the parent process. See also these bug reports: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626913 http://sourceforge.net/p/nagiosplug/bugs/512/ https://github.com/nagios-plugins/nagios-plugins/issues/999 https://bugs.op5.com/view.php?id=4398
2013-09-28Change default host names for some testsHolger Weiss2-5/+5
Testing "nagiosplugins.org" will currently not work.
2013-09-17check_disk: die with a reasonable error message if one mount point hits ↵Sven Nierlein1-0/+6
average value
2013-09-17check_ssh: added test caseSven Nierlein1-0/+49
2013-09-17check_by_ssh: tests expand key and config pathSven Nierlein1-0/+4
some systems do not expand the path automatically.
2013-09-17check_udp: skip tests which rely on udp listenSven Nierlein1-0/+1
solaris netcat does not listen in udp mode due to http://sourceforge.net/p/netcat/bugs/27/
2013-09-16check_procs: fix test with sleeping processesSven Nierlein1-1/+1
at least on freebsd, there are a processes with state 'S', they always use two character status.
2013-09-16check_http: tests use supplied value if possibleSven Nierlein1-9/+3
2013-09-14check_ping: increase test timeoutSven Nierlein1-1/+1
freebsds ping takes a few seconds till it returns, so a 1 second timeout does not work for the test.
2013-09-14check_udp: try nc.traditional tooSven Nierlein1-1/+4
nc.traditional is available on (at least) ubuntu systems and uses traditional nc syntax
2013-09-14tests: move ipv6 detection into NPTest moduleSven Nierlein2-18/+18
2013-09-13unified nc syntaxSven Nierlein1-3/+15
older netcats do not understand -p, they expect host and port as additional argument. This is backwards compatibel to newer clients. Also support netcat instead of nc.
2013-09-12check_tcp: only test ipv6 if ping6 worksSven Nierlein1-3/+18
2013-08-21fixed check_tcp testSven Nierlein1-1/+1
A check with thresholds 9000,1 must exit with warning if the certificate expires in less than 9000 but more than one day.
2013-08-21check_snmp: added threshold testsSven Nierlein1-137/+156