aboutsummaryrefslogtreecommitdiff
path: root/plugins/tests
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/tests')
-rw-r--r--plugins/tests/check_disk9
-rw-r--r--plugins/tests/check_dns9
-rw-r--r--plugins/tests/check_ftp9
-rw-r--r--plugins/tests/check_hpjd9
-rw-r--r--plugins/tests/check_http9
-rw-r--r--plugins/tests/check_load9
-rw-r--r--plugins/tests/check_ping13
-rw-r--r--plugins/tests/check_procs23
-rw-r--r--plugins/tests/check_swap13
-rw-r--r--plugins/tests/check_users9
-rw-r--r--plugins/tests/check_vsz9
11 files changed, 121 insertions, 0 deletions
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]+\)