icinga-zones/global-templates/services.conf

170 lines
3.2 KiB
Text
Raw Permalink Normal View History

// 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-18 13:03:06 +00:00
apply Service "certificate " for (name => config in host.vars.x509_certs) {
import "generic-service"
check_command = "custom_ssl_cert"
2023-08-18 13:03:06 +00:00
check_interval = 6h
retry_interval = 15m
vars += config
}
apply Service "ca-certificate " for (name => config in host.vars.ca_certs) {
import "generic-service"
check_command = "custom_ca_cert"
check_interval = 1d
retry_interval = 6h
vars += config
}
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) {
import "generic-service"
check_command = "http"
vars += config
}
apply Service "icinga" {
import "generic-service"
check_command = "icinga"
2024-09-27 08:38:09 +00:00
assign where "icinga-host" in host.templates
}
2023-08-19 09:59:32 +00:00
apply Service "icinga API certificate" {
import "generic-service"
check_command = "custom_ssl_cert"
2023-08-19 09:59:32 +00:00
check_interval = 6h
retry_interval = 15m
vars.ssl_cert_address = "localhost"
vars.ssl_cert_file = "/var/lib/icinga2/certs/" + NodeName + ".crt"
vars.ssl_cert_ignore_sct = true
vars.ssl_cert_warn = 30
vars.ssl_cert_rootssl_cert = "/var/lib/icinga2/certs/ca.crt"
2024-09-27 08:38:09 +00:00
assign where "icinga-host" in host.templates
2023-08-19 09:59:32 +00:00
}
apply Service "icinga CA certificate" {
import "generic-service"
check_command = "custom_ca_cert"
check_interval = 1d
retry_interval = 6h
vars.ssl_cert_file = "/var/lib/icinga2/certs/ca.crt"
vars.ssl_cert_warn = 396
vars.ssl_cert_critical = 376
2023-08-19 10:00:59 +00:00
2024-09-27 08:38:09 +00:00
assign where "icinga-host" in host.templates
2023-08-19 09:59:32 +00:00
}
2023-08-18 13:03:06 +00:00
apply Service "kernel-status" {
import "generic-service"
check_command = "kernel_status"
2024-09-27 08:38:09 +00:00
assign where !host.vars.is_container && "linux-host" in host.templates
2023-08-18 13:03:06 +00:00
}
apply Service "load" {
import "generic-service"
check_command = "load"
2024-09-27 08:38:09 +00:00
assign where !host.vars.is_container && "linux-host" in host.templates
}
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
}
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
}
apply Service "procs" {
import "generic-service"
check_command = "procs"
command_endpoint = host.name
2024-09-27 08:38:09 +00:00
assign where "linux-host" in host.templates
}
apply Service "proc-" for (proc => config in host.vars.procs) {
import "generic-service"
check_command = "procs"
vars += config
}
apply Service "ssh" {
import "generic-service"
check_command = "ssh"
assign where (host.address || host.address6) && host.vars.os == "Linux" && !host.vars.no_check_ssh
}
apply Service "systemd" {
import "generic-service"
check_command = "custom_systemd"
assign where host.vars.debian_release && host.vars.debian_release >= 12
}
apply Service "users" {
import "generic-service"
check_command = "users"
command_endpoint = host.name
2024-09-27 08:38:09 +00:00
assign where "linux-host" in host.templates
}