icinga2/test/config/8063.conf

54 lines
1.1 KiB
Plaintext
Raw Normal View History

object CheckCommand "8063-my-disk" {
import "plugin-check-command"
command = [ PluginDir + "/check_disk" ]
arguments = {
"-w" = "$disk_wfree$%"
"-c" = "$disk_cfree$%"
"-W" = "$disk_inode_wfree$%"
"-K" = "$disk_inode_cfree$%"
"-p" = "$disk_partitions$"
"-x" = "$disk_partitions_excluded$"
}
vars.disk_wfree = 20
vars.disk_cfree = 10
}
object Host "8063-my-server" {
import "generic-host"
address = "127.0.0.1"
address6 = "::1"
vars.local_disks["basic-partitions"] = {
disk_partitions = [ "/", "/tmp", "/var", "/home", "/run/user/1000/gvfs" ]
}
}
apply Service "8063-" for (disk => config in host.vars.local_disks) {
import "generic-service"
check_command = "8063-my-disk"
check_interval = 5s
retry_interval = 5s
volatile = true
vars.volatile_check = true
vars += config
vars.disk_wfree = 10
vars.disk_cfree = 5
assign where host.vars.local_disks
}
apply Notification "disk-notification" to Service {
import "test-mail-service-notification"
users = [ "test-icingaadmin" ]
assign where service.vars.volatile_check == true
}