Commit graph

117 commits

Author SHA1 Message Date
Holger Weiss
e11b67f620 Let check_ntp_peer check the number of truechimers
Add support for checking the number of usable time sources (i.e., the
number of peers which are classified as so-called "truechimers" by NTP's
intersection algorithm).  The new "-m" and "-n" options allow for
specifying the according WARNING and CRITICAL thresholds (and thereby
activating the truechimers check), respectively.
2010-03-18 00:34:14 +01:00
Thomas Guyot-Sionnest
e7e9a99117 Fix usage of repeated -o options in check_snmp 2009-10-22 03:25:41 -04:00
Ton Voon
aa6563c75c Fix skip number 2009-09-11 23:58:41 +01:00
Thomas Guyot-Sionnest
43571dba91 check_snmp: Add some verbose output and tests 2009-07-31 03:52:10 -04:00
Thomas Guyot-Sionnest
e0be2e6094 Fix check_snmp Timetick test with <1 day uptime 2009-07-31 01:41:03 -04:00
Matthias Eble
38e20a1a33 Fixed testcases for check_snmp, check_ifstatus and check_ifoperstatus when no snmp community is specified
The checks for invalid/unavailable hosts need a complete command line.
They failed on hosts where no community was specified. Now, an invalid community is used so
the tests can run on hosts w/o snmp host/community in NPTest.cache. Execution will fail anyway.
2009-06-13 18:13:49 +02:00
Thomas Guyot-Sionnest
7cb3ae0933 check_snmp: Make use of standard threshold functions
This patch makes use of standard threshold functions. This allows using
	doubles as thresholds.

	Since SNMP supports only integers, double precision numbers are only
	printed when parsed from a STRING type.

	In addition, support for printing properly Timeticks type has been added,
	and the code has been thoroughly cleaned.
2009-05-28 08:10:49 -04:00
Thomas Guyot-Sionnest
d36c976129 negate: make timeouts configurable 2009-03-20 02:28:02 -04:00
Thomas Guyot-Sionnest
ead340235e Add suggested multi-oid test (John A. Barbuto) 2009-03-18 03:51:16 -04:00
Thomas Guyot-Sionnest
9a05e97890 Check for existence of pre-instaleld pst3 for Solaris tests in t/check_procs.t 2009-03-17 01:56:26 -05:00
Thomas Guyot-Sionnest
c3c528952d Fix check_snmp test on solaris 2009-03-16 18:49:51 -05:00
Thomas Guyot-Sionnest
e2aec83e61 check_snmp fixes:
- Fix broken compilation caused by typo in command ending
- Remove extra whitespaces at EOL
- Fix invalid host test on Ubuntu Hardy (and possibly others)
2009-03-16 01:37:00 -04:00
Ton Voon
36e58ae0c3 Fixed passing of quotes in OID for check_snmp (#1985230 - Jan Wagner, patch by John Barbuto) 2009-03-14 01:17:50 +00:00
Thomas Guyot-Sionnest
948cf21aae Trick for check_users test without users logged-in 2009-01-20 21:48:05 -05:00
Thomas Guyot-Sionnest
6fbd14fea5 Removing CVS/SVN tags and replacing with git-based versioning
For contrib/, full tags have been imported from subversion


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-23 05:38:47 +00:00
Thomas Guyot-Sionnest
8f24f0bfdf Fix check_http test (altinity.com redirects now).
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2067 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-05 00:14:37 +00:00
Thomas Guyot-Sionnest
91dd53e0f4 Typo
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2032 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-16 01:52:38 +00:00
Matthias Eble
1066906a16 rewrote check_snmp.t to use Test::More
added perfdata checking for string values


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2022 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-09 21:54:41 +00:00
Matthias Eble
d8577e1994 Added testcases for check_dig
check_dig's -l option is mandatory now (#1986306)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2011 f882894a-f735-0410-b71e-b25c423dba1c
2008-06-09 19:47:36 +00:00
Thomas Guyot-Sionnest
b52e63da65 Fixed passive option in check_by_ssh
Also:
- On non-skipped stderr, check_by_ssh now returns UNKNOWN or worse (result from command) instead of always UNKNOWN.
- Fixed passive tests and make is always run the specified number of tests (using fail if there's nothing to test).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1997 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-21 08:57:13 +00:00
Thomas Guyot-Sionnest
6b2cc2f23c Oops - forgot to remove the SKIP block (which didn't seem to work fine)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1996 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-20 11:37:27 +00:00
Thomas Guyot-Sionnest
5ed2b92582 Add check_by_ssh tests (passive checks are broken - should be fixed before next release!)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1995 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-20 11:32:39 +00:00
Thomas Guyot-Sionnest
aca1e6a6ce Add socket support to check_mysql*
Also clears the password from check_mysql command-line options


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1988 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-30 12:50:52 +00:00
Ton Voon
c0cf08d5fc Don't run check_nagios tests on Solaris, because of pst3 requirement
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1953 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-17 23:08:21 +00:00
Ton Voon
9f3d864fd3 Reverted check_procs for solaris back to using pst3 due to truncation
for argument fields using other methods


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1937 f882894a-f735-0410-b71e-b25c423dba1c
2008-02-28 16:21:59 +00:00
Ton Voon
8a4f138527 Changed default test values for check_dns (using nagios.com)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1902 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 16:05:36 +00:00
Ton Voon
3120fe3806 Reverted commits 1898 and 1899 due to reversion of 1879
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1901 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 11:57:24 +00:00
Thomas Guyot-Sionnest
2e0da16fad more r1879 fixes
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1899 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 11:35:06 +00:00
Thomas Guyot-Sionnest
9693226ceb Fix test breakages for commit r1879: check_tcp now returns UNKNOWN with an invalid hostname on command line
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1898 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 11:27:57 +00:00
Thomas Guyot-Sionnest
27627ee6c2 D'oh! single escape will be handled by Perl....
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1865 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-11 13:54:23 +00:00
Thomas Guyot-Sionnest
8cb5006563 - Fix check_ntp_peer returning misleading information when an ICMP message came back
- Try to fix some servers apparently exanding the ~ in threshold ranges in t/check_ntp.t


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1864 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-11 13:31:22 +00:00
Matthias Eble
3bb4b6b336 Fixed check_load argument handling when passing non triplet thresholds. Thanks to Jonathan Kamens (bug #1831890)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1851 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-10 00:19:27 +00:00
Thomas Guyot-Sionnest
0d34c4da9d Merge changes from branches/dermoth_ntp_rework (check_ntp_peer/check_ntp_time)
NEWS                     |   13 
 plugins/Makefile.am      |    8 
 plugins/check_ntp_peer.c |  628 ++++++++++++++++-------------------------------
 plugins/check_ntp_time.c |  323 ++----------------------
 plugins/t/check_ntp.t    |   92 +++++-



git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1846 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-04 12:38:56 +00:00
Matthias Eble
d23b17e656 Added -i/-I to ignore pathes/partitions based on regular expressions
Added check_disk -A selecting all filesystems 
-E option must now be passed before -p or -r/-R
Passing -E after -p or -r results in UNKNOWN state
Fixed bug when mixing case sensitive and insensitive regexes


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1786 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-22 17:40:35 +00:00
Thomas Guyot-Sionnest
520f297fa9 Rewrite the "map changes to return codes" patch nearly from scratch.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1785 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-22 03:00:46 +00:00
Ton Voon
8a39526e1b Stop double expansion of parameters for negate - works like
time command now


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1784 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-21 23:01:28 +00:00
Ton Voon
37287823f0 Removing all .cvsignore files
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1761 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-24 00:35:42 +00:00
Matthias Eble
5e633124e4 Check_disk now calls stat() for all filesystems to check.
Check_disk prints an strerror() message if the call of stat() fails.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1754 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-10 20:18:55 +00:00
Ton Voon
3f5fbd9797 Test for new functionality in negate (not automatically run in make test)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1717 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-24 08:53:50 +00:00
Ton Voon
eaf9908edd Tests for check_dummy
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1716 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-24 08:35:53 +00:00
Thomas Guyot-Sionnest
15a018f87d Make check_tcp.t compatible with picky web servers.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1714 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-18 07:17:59 +00:00
Matthias Eble
c3c75a0980 added testcase to verify that old positional arguments only select one path
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1707 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-09 08:16:44 +00:00
Matthias Eble
14dd02c058 added test cases for check_cluster
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1702 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-28 21:57:17 +00:00
Ton Voon
d47be7a9e4 check_load can optionally divide by number of cpus
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1700 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-25 22:10:13 +00:00
Matthias Eble
0ab3f7be5d check_http.t: - added internet_access variable to skip tests where internet access is required.
- added host_tcp_http2 variable for a webserver serving the string 'nagios' in index
              - no tests are skipped if the new vars are not defined (existing installations)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1669 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-01 14:21:09 +00:00
Matthias Eble
950f99c62a Test Cases for check_disk's -r, -R, -C and -g
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1660 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-30 09:00:06 +00:00
Ton Voon
76cc1b75dd check_ping's timeout interval is only +1 if ping command has a timeout value.
Tests updated to check for 100% packet loss (always if ping has timeout), otherwise
will check for "timed out" string


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1639 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-12 10:51:06 +00:00
Ton Voon
0052e43b5a Converted check_ping.t to new-style testcases. Added test case for check_icmp -
requires sudo access


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1637 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-11 02:27:21 +00:00
Ton Voon
a483e079da Test failure if a filesystem which is a subset of another fails the inode
check (Matthias Elbe - 1660953)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1628 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-06 17:26:43 +00:00
Ton Voon
7106d10ab2 Documentation fix re: --escape flag. Fix of ./check_tcp test to webservers
to make it more standards compliant


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1620 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-14 10:11:07 +00:00