summaryrefslogtreecommitdiffstats
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 0000000..c4323e0
--- /dev/null
+++ b/plugins/tests/check_disk
@@ -0,0 +1,9 @@
1check_disk
2
3[normal]
4100 100 /
5^Disk ok - +[\.0-9]+
6
7[critical]
80 0 /
9^Only +[\.0-9]+
diff --git a/plugins/tests/check_dns b/plugins/tests/check_dns
new file mode 100644
index 0000000..2e9b9a0
--- /dev/null
+++ b/plugins/tests/check_dns
@@ -0,0 +1,9 @@
1check_dns
2
3[normal]
4127.0.0.1
5DNS ok - +[\.0-9]+ seconds response time, Address\(es\) is\/are 127\.0\.0\.1
6
7[critical]
8$nullhost
9DNS (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 0000000..4266ebd
--- /dev/null
+++ b/plugins/tests/check_ftp
@@ -0,0 +1,9 @@
1check_ftp
2
3[normal]
4$hostname -wt 300 -ct 600
5FTP ok - [0-9]+ second response time
6
7[critical]
8$noserver -wt 0 -ct 0
9(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 0000000..df35996
--- /dev/null
+++ b/plugins/tests/check_hpjd
@@ -0,0 +1,9 @@
1check_hpjd
2
3[normal]
4$printer
5^Printer ok -
6
7[critical]
8$noserver
9Timeout: No response from ns
diff --git a/plugins/tests/check_http b/plugins/tests/check_http
new file mode 100644
index 0000000..e09f6ff
--- /dev/null
+++ b/plugins/tests/check_http
@@ -0,0 +1,9 @@
1check_http
2
3[normal]
4www.infoplease.com -wt 300 -ct 600
5HTTP/1.1 200 OK - [0-9]+ second response time
6
7[critical]
8$nullhost -wt 1 -ct 2
9(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 0000000..5e4be3a
--- /dev/null
+++ b/plugins/tests/check_load
@@ -0,0 +1,9 @@
1check_load
2
3[normal]
4100 100 100 100 100 100
5^load average: +[\.0-9]+, +[\.0-9]+, +[\.0-9]+$
6
7[critical]
80 0 0 0 0 0
9^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 0000000..115cbaa
--- /dev/null
+++ b/plugins/tests/check_ping
@@ -0,0 +1,13 @@
1check_ping
2
3[normal]
4127.0.0.1 100 100 1000 1000 -p 1
5PING ok - Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms
6
7[critical]
8127.0.0.1 0 0 0 0 -p 1
9Packet loss = +[0-9]{1,2}\%, +RTA = [\.0-9]+ ms
10
11[critical]
12$nullhost 0 0 0 0 -p 1 -to 1
13CRITICAL - Plugin timed out after 1 seconds
diff --git a/plugins/tests/check_procs b/plugins/tests/check_procs
new file mode 100644
index 0000000..f7c6522
--- /dev/null
+++ b/plugins/tests/check_procs
@@ -0,0 +1,23 @@
1check_procs
2
3# this is a comment
4
5[normal]
6100000 100000
7^OK - [0-9]+ processes running$
8
9[normal]
10100000 100000 Z
11^OK - [0-9]+ processes with Z status$
12
13[warning]
140 10000000
15^WARNING - [0-9]+ processes running$
16
17[critical]
180 0
19^CRITICAL - [0-9]+ processes running$
20
21[critical]
220 0 S
23^CRITICAL - [0-9]+ processes with S status$
diff --git a/plugins/tests/check_swap b/plugins/tests/check_swap
new file mode 100644
index 0000000..b6cbb42
--- /dev/null
+++ b/plugins/tests/check_swap
@@ -0,0 +1,13 @@
1check_swap
2
3[normal]
4100 100
5^Swap ok - Swap used\: +[0-9]{1,2}\% \([0-9]+ bytes out of [0-9]+\)$
6
7[critical]
80 0
9^CRITICAL - Swap used\: +[0-9]{1,2}\% \([0-9]+ bytes out of [0-9]+\)$
10
11[critical]
12100 100 1000000000 10000000000
13^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 0000000..5a7959a
--- /dev/null
+++ b/plugins/tests/check_users
@@ -0,0 +1,9 @@
1check_users
2
3[normal]
41000 1000
5^Users ok - +[0-9]+ users logged in$
6
7[critical]
80 0
9^[0-9]+ +users currently logged in$
diff --git a/plugins/tests/check_vsz b/plugins/tests/check_vsz
new file mode 100644
index 0000000..4fdec93
--- /dev/null
+++ b/plugins/tests/check_vsz
@@ -0,0 +1,9 @@
1check_vsz
2
3[normal]
4100000 1000000 init
5^ok \(all VSZ\<[0-9]+\)
6
7[critical]
80 0
9^CRITICAL \(VSZ\>[0-9]+\)