summaryrefslogtreecommitdiffstats
path: root/plugins/t
AgeCommit message (Collapse)AuthorFilesLines
2018-10-22made check_curl tests copies of check_http tests because they will differ ↵Andreas Baumann1-1/+204
slightly
2018-10-22check_curl: make check_curl use the same tests as check_httpSven Nierlein2-233/+36
2018-10-22add check_curl testSven Nierlein1-0/+200
just a copy of check_http for now... Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12udp test: prefer nc over netcat syntaxrefs/pull/1469/headSven Nierlein1-3/+3
sles 12 systems have netcat symlinked to nc and so expect nc syntax for netcat. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12check_disk test: increase assumed thresholdsSven Nierlein1-4/+4
The check_disk fails if the build system has more than 100GB of free disk space. Lets make this 100TB and we are safe for a couple more years. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12remove hardcoded verisign.com testsSven Nierlein3-35/+47
and make it configurable Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12make snmp tests more reliableSven Nierlein1-3/+3
snmp tests fail if the snmp daemon runs systemd, then the process with 1 has arguments. Convert the test into a regex which works for sysv and systemd. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-01-04Merge remote-tracking branch 'upstream/pr/1457'Jan Wagner1-1/+17
2016-12-31Add --only-critical switch to check_aptrefs/pull/1457/headChristian Schmidt1-1/+17
2016-12-23check_dns: Small test cleanuprefs/pull/1456/headNicolai2-4/+4
2016-12-23check_dns: Fix travis testsNicolai1-0/+2
(or try to fix it...)
2016-12-23check_dns: Tests and infoNicolai1-2/+20
2016-11-20Creating and mounting randisk to make use of check_disk testsJan Wagner1-1/+1
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.