Avoid local checks on remote hosts

This commit is contained in:
Jan Dittberner 2024-09-27 10:38:09 +02:00
parent 225397ae42
commit 409e745d94
5 changed files with 17 additions and 7 deletions

View file

@ -55,3 +55,6 @@ template Host "puppet-host" {
procs_critical = "1:2"
}
}
template Host "icinga-host" {
}

View file

@ -53,7 +53,7 @@ apply Service "icinga" {
check_command = "icinga"
assign where host.name
assign where "icinga-host" in host.templates
}
apply Service "icinga API certificate" {
@ -69,7 +69,7 @@ apply Service "icinga API certificate" {
vars.ssl_cert_warn = 30
vars.ssl_cert_rootssl_cert = "/var/lib/icinga2/certs/ca.crt"
assign where host.name
assign where "icinga-host" in host.templates
}
apply Service "icinga CA certificate" {
@ -83,7 +83,7 @@ apply Service "icinga CA certificate" {
vars.ssl_cert_warn = 396
vars.ssl_cert_critical = 376
assign where host.name
assign where "icinga-host" in host.templates
}
apply Service "kernel-status" {
@ -91,7 +91,7 @@ apply Service "kernel-status" {
check_command = "kernel_status"
assign where !host.vars.is_container
assign where !host.vars.is_container && "linux-host" in host.templates
}
apply Service "load" {
@ -99,7 +99,7 @@ apply Service "load" {
check_command = "load"
assign where !host.vars.is_container
assign where !host.vars.is_container && "linux-host" in host.templates
}
apply Service "pgsql " for (name => config in host.vars.pgsql_dbs) {
@ -132,7 +132,7 @@ apply Service "procs" {
check_command = "procs"
command_endpoint = host.name
assign where host.name
assign where "linux-host" in host.templates
}
apply Service "proc-" for (proc => config in host.vars.procs) {
@ -165,5 +165,5 @@ apply Service "users" {
check_command = "users"
command_endpoint = host.name
assign where host.name
assign where "linux-host" in host.templates
}

View file

@ -2,6 +2,7 @@
object Host "infra02sat.infra.cacert.org" {
import "debian-host"
import "puppet-host"
import "icinga-host"
display_name = "infra02sat"
@ -27,5 +28,7 @@ object Host "beholder-from-infra02" {
address = "49.13.65.97"
address6 = "2a01:4f8:c17:7495::1"
command_endpoint = "infra02sat"
vars.notification.from = "infra02sat"
}

View file

@ -2,6 +2,7 @@
object Host "infra03sat.infra.cacert.org" {
import "debian-host"
import "puppet-host"
import "icinga-host"
display_name = "infra03sat"
@ -27,5 +28,7 @@ object Host "beholder-from-infra03" {
address = "49.13.65.97"
address6 = "2a01:4f8:c17:7495::1"
command_endpoint = "infra03sat"
vars.notification.from = "infra03sat"
}

View file

@ -2,6 +2,7 @@
object Host "beholder" {
import "debian-host"
import "postfix-host"
import "icinga-host"
groups += [ "monitoring" ]