2023-08-15 15:46:37 +00:00
|
|
|
// vim: set ft=icinga2 et sw=2 ts=2 si ai:
|
|
|
|
apply Service "apt" {
|
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "apt"
|
|
|
|
|
|
|
|
check_interval = 1h
|
|
|
|
retry_interval = 15m
|
|
|
|
|
|
|
|
vars.apt_list = true
|
|
|
|
|
|
|
|
assign where host.vars.osfamily == "Debian"
|
|
|
|
}
|
|
|
|
|
2023-08-17 07:49:33 +00:00
|
|
|
apply Service "disk " for (disk => config in host.vars.disks) {
|
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "disk"
|
|
|
|
|
|
|
|
vars += config
|
|
|
|
}
|
|
|
|
|
2023-08-17 07:55:24 +00:00
|
|
|
apply Service for (http_vhost => config in host.vars.http_vhosts) {
|
2023-08-17 07:49:33 +00:00
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "http"
|
|
|
|
|
|
|
|
vars += config
|
|
|
|
}
|
|
|
|
|
2023-08-15 15:46:37 +00:00
|
|
|
apply Service "icinga" {
|
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "icinga"
|
2023-08-15 15:55:10 +00:00
|
|
|
|
2023-08-17 07:49:33 +00:00
|
|
|
assign where host.name == NodeName
|
|
|
|
}
|
|
|
|
|
|
|
|
apply Service "load" {
|
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "load"
|
|
|
|
|
|
|
|
assign where host.name == NodeName
|
|
|
|
}
|
|
|
|
|
2023-08-18 12:15:32 +00:00
|
|
|
apply Service "pgsql " for (name => config in host.vars.pgsql_dbs) {
|
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "pgsql_socket"
|
|
|
|
|
|
|
|
vars += config
|
|
|
|
}
|
|
|
|
|
2023-08-17 07:49:33 +00:00
|
|
|
apply Service "ping4" {
|
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "ping4"
|
|
|
|
|
|
|
|
assign where host.address
|
|
|
|
}
|
|
|
|
|
|
|
|
apply Service "ping6" {
|
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "ping6"
|
|
|
|
|
|
|
|
assign where host.address6
|
2023-08-15 15:46:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
apply Service "procs" {
|
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "procs"
|
2023-08-15 15:55:10 +00:00
|
|
|
|
2023-08-17 07:49:33 +00:00
|
|
|
assign where host.name == NodeName
|
2023-08-15 15:46:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
apply Service "proc-" for (proc => config in host.vars.procs) {
|
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "procs"
|
|
|
|
|
|
|
|
vars += config
|
|
|
|
}
|
|
|
|
|
2023-08-17 07:49:33 +00:00
|
|
|
apply Service "ssh" {
|
2023-08-15 15:46:37 +00:00
|
|
|
import "generic-service"
|
|
|
|
|
2023-08-17 07:49:33 +00:00
|
|
|
check_command = "ssh"
|
2023-08-15 15:46:37 +00:00
|
|
|
|
2023-08-17 07:49:33 +00:00
|
|
|
assign where (host.address || host.address6) && host.vars.os == "Linux" && !host.vars.no_check_ssh
|
|
|
|
}
|
2023-08-15 15:55:10 +00:00
|
|
|
|
2023-08-17 07:49:33 +00:00
|
|
|
apply Service "users" {
|
|
|
|
import "generic-service"
|
|
|
|
|
|
|
|
check_command = "users"
|
|
|
|
|
|
|
|
assign where host.name == NodeName
|
2023-08-15 15:46:37 +00:00
|
|
|
}
|