Add unit tests for threshold format

This commit is contained in:
Mihai Coman 2016-11-15 13:34:06 +02:00
parent 9375959b68
commit 562f6e383d
11 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1 @@
BELOW_THRESHOLD

View File

@ -0,0 +1,12 @@
general {
output_format = "none"
}
order += "disk /"
disk "/" {
format = "%used"
format_below_threshold = "BELOW_THRESHOLD"
low_threshold = 100
threshold_type = "percentage_free"
}

View File

@ -0,0 +1 @@
ABOVE_THRESHOLD: 50 °C

View File

@ -0,0 +1,11 @@
general {
output_format = "none"
}
order += "cpu_temperature 0"
cpu_temperature 0 {
format_above_threshold = "ABOVE_THRESHOLD: %degrees °C"
max_threshold = 45
path = "testcases/005-cpu-temp-max-threshold-format/temp1_input"
}

View File

@ -0,0 +1 @@
50000

View File

@ -0,0 +1 @@
ABOVE_THRESHOLD

View File

@ -0,0 +1,10 @@
general {
output_format = "none"
}
order += "cpu_usage"
cpu_usage {
format_above_threshold = "ABOVE_THRESHOLD"
max_threshold = -1
}

View File

@ -0,0 +1 @@
ABOVE_THRESHOLD

View File

@ -0,0 +1,10 @@
general {
output_format = "none"
}
order += "cpu_usage"
cpu_usage {
format_above_threshold = "ABOVE_THRESHOLD"
max_threshold = -1
}

View File

@ -0,0 +1 @@
ABOVE_THRESHOLD

View File

@ -0,0 +1,10 @@
general {
output_format = "none"
}
order += "load"
load {
format_above_threshold = "ABOVE_THRESHOLD"
max_threshold = -1
}