diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:32:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:32:39 +0000 |
commit | 56ae875861ab260b80a030f50c4aff9f9dc8fff0 (patch) | |
tree | 531412110fc901a5918c7f7442202804a83cada9 /test/config/8063.conf | |
parent | Initial commit. (diff) | |
download | icinga2-upstream.tar.xz icinga2-upstream.zip |
Adding upstream version 2.14.2.upstream/2.14.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/config/8063.conf')
-rw-r--r-- | test/config/8063.conf | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/test/config/8063.conf b/test/config/8063.conf new file mode 100644 index 0000000..75676d1 --- /dev/null +++ b/test/config/8063.conf @@ -0,0 +1,73 @@ +object CheckCommand "8063-my-disk" { + command = [ PluginDir + "/check_disk" ] + + arguments = { + "-w" = { + value = "$disk_wfree$" + description = "Exit with WARNING status if less than INTEGER units of disk are free or Exit with WARNING status if less than PERCENT of disk space is free" + required = true + } + "-c" = { + value = "$disk_cfree$" + description = "Exit with CRITICAL status if less than INTEGER units of disk are free or Exit with CRITCAL status if less than PERCENT of disk space is free" + required = true + } + "-W" = { + value = "$disk_inode_wfree$" + description = "Exit with WARNING status if less than PERCENT of inode space is free" + } + "-K" = { + value = "$disk_inode_cfree$" + description = "Exit with CRITICAL status if less than PERCENT of inode space is free" + } + "-p" = { + value = "$disk_partitions$" + description = "Path or partition (may be repeated)" + repeat_key = true + order = 1 + } + "-x" = { + value = "$disk_partitions_excluded$" + description = "Ignore device (only works if -p unspecified)" + } + } + + 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 +} + |