From 44a321cb8a42d6c0ea2d96a1086a17f2134c89cc Mon Sep 17 00:00:00 2001 From: Ethan Galstad Date: Thu, 28 Feb 2002 06:42:51 +0000 Subject: Initial revision git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/tests/check_disk | 9 +++++++++ plugins/tests/check_dns | 9 +++++++++ plugins/tests/check_ftp | 9 +++++++++ plugins/tests/check_hpjd | 9 +++++++++ plugins/tests/check_http | 9 +++++++++ plugins/tests/check_load | 9 +++++++++ plugins/tests/check_ping | 13 +++++++++++++ plugins/tests/check_procs | 23 +++++++++++++++++++++++ plugins/tests/check_swap | 13 +++++++++++++ plugins/tests/check_users | 9 +++++++++ plugins/tests/check_vsz | 9 +++++++++ 11 files changed, 121 insertions(+) create mode 100644 plugins/tests/check_disk create mode 100644 plugins/tests/check_dns create mode 100644 plugins/tests/check_ftp create mode 100644 plugins/tests/check_hpjd create mode 100644 plugins/tests/check_http create mode 100644 plugins/tests/check_load create mode 100644 plugins/tests/check_ping create mode 100644 plugins/tests/check_procs create mode 100644 plugins/tests/check_swap create mode 100644 plugins/tests/check_users create mode 100644 plugins/tests/check_vsz (limited to 'plugins/tests') diff --git a/plugins/tests/check_disk b/plugins/tests/check_disk new file mode 100644 index 00000000..c4323e0b --- /dev/null +++ b/plugins/tests/check_disk @@ -0,0 +1,9 @@ +check_disk + +[normal] +100 100 / +^Disk ok - +[\.0-9]+ + +[critical] +0 0 / +^Only +[\.0-9]+ diff --git a/plugins/tests/check_dns b/plugins/tests/check_dns new file mode 100644 index 00000000..2e9b9a09 --- /dev/null +++ b/plugins/tests/check_dns @@ -0,0 +1,9 @@ +check_dns + +[normal] +127.0.0.1 +DNS ok - +[\.0-9]+ seconds response time, Address\(es\) is\/are 127\.0\.0\.1 + +[critical] +$nullhost +DNS (problem - Probably a non-existent host/domain|CRITICAL - Non-existent host/domain|CRITICAL - Connection timed out after [0-9]+ seconds) diff --git a/plugins/tests/check_ftp b/plugins/tests/check_ftp new file mode 100644 index 00000000..4266ebdc --- /dev/null +++ b/plugins/tests/check_ftp @@ -0,0 +1,9 @@ +check_ftp + +[normal] +$hostname -wt 300 -ct 600 +FTP ok - [0-9]+ second response time + +[critical] +$noserver -wt 0 -ct 0 +(Invalid FTP response received from host|Connection refused by host) diff --git a/plugins/tests/check_hpjd b/plugins/tests/check_hpjd new file mode 100644 index 00000000..df35996f --- /dev/null +++ b/plugins/tests/check_hpjd @@ -0,0 +1,9 @@ +check_hpjd + +[normal] +$printer +^Printer ok - + +[critical] +$noserver +Timeout: No response from ns diff --git a/plugins/tests/check_http b/plugins/tests/check_http new file mode 100644 index 00000000..e09f6ff7 --- /dev/null +++ b/plugins/tests/check_http @@ -0,0 +1,9 @@ +check_http + +[normal] +www.infoplease.com -wt 300 -ct 600 +HTTP/1.1 200 OK - [0-9]+ second response time + +[critical] +$nullhost -wt 1 -ct 2 +(Connection refused by host|Network is unreachable|Connection refused or timed out|Socket timeout after [0-9]+ seconds)$ diff --git a/plugins/tests/check_load b/plugins/tests/check_load new file mode 100644 index 00000000..5e4be3a4 --- /dev/null +++ b/plugins/tests/check_load @@ -0,0 +1,9 @@ +check_load + +[normal] +100 100 100 100 100 100 +^load average: +[\.0-9]+, +[\.0-9]+, +[\.0-9]+$ + +[critical] +0 0 0 0 0 0 +^load average: +[\.0-9]+, +[\.0-9]+, +[\.0-9]+ CRITICAL$ diff --git a/plugins/tests/check_ping b/plugins/tests/check_ping new file mode 100644 index 00000000..115cbaa3 --- /dev/null +++ b/plugins/tests/check_ping @@ -0,0 +1,13 @@ +check_ping + +[normal] +127.0.0.1 100 100 1000 1000 -p 1 +PING ok - Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms + +[critical] +127.0.0.1 0 0 0 0 -p 1 +Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms + +[critical] +$nullhost 0 0 0 0 -p 1 -to 1 +CRITICAL - Plugin timed out after 1 seconds diff --git a/plugins/tests/check_procs b/plugins/tests/check_procs new file mode 100644 index 00000000..f7c65222 --- /dev/null +++ b/plugins/tests/check_procs @@ -0,0 +1,23 @@ +check_procs + +# this is a comment + +[normal] +100000 100000 +^OK - [0-9]+ processes running$ + +[normal] +100000 100000 Z +^OK - [0-9]+ processes with Z status$ + +[warning] +0 10000000 +^WARNING - [0-9]+ processes running$ + +[critical] +0 0 +^CRITICAL - [0-9]+ processes running$ + +[critical] +0 0 S +^CRITICAL - [0-9]+ processes with S status$ diff --git a/plugins/tests/check_swap b/plugins/tests/check_swap new file mode 100644 index 00000000..b6cbb42f --- /dev/null +++ b/plugins/tests/check_swap @@ -0,0 +1,13 @@ +check_swap + +[normal] +100 100 +^Swap ok - Swap used\: +[0-9]{1,2}\% \([0-9]+ bytes out of [0-9]+\)$ + +[critical] +0 0 +^CRITICAL - Swap used\: +[0-9]{1,2}\% \([0-9]+ bytes out of [0-9]+\)$ + +[critical] +100 100 1000000000 10000000000 +^CRITICAL - Swap used\: +[0-9]{1,2}\% \([0-9]+ bytes out of [0-9]+\)$ diff --git a/plugins/tests/check_users b/plugins/tests/check_users new file mode 100644 index 00000000..5a7959a5 --- /dev/null +++ b/plugins/tests/check_users @@ -0,0 +1,9 @@ +check_users + +[normal] +1000 1000 +^Users ok - +[0-9]+ users logged in$ + +[critical] +0 0 +^[0-9]+ +users currently logged in$ diff --git a/plugins/tests/check_vsz b/plugins/tests/check_vsz new file mode 100644 index 00000000..4fdec936 --- /dev/null +++ b/plugins/tests/check_vsz @@ -0,0 +1,9 @@ +check_vsz + +[normal] +100000 1000000 init +^ok \(all VSZ\<[0-9]+\) + +[critical] +0 0 +^CRITICAL \(VSZ\>[0-9]+\) -- cgit v1.2.3-74-g34f1