Add systemd check

This commit is contained in:
Tunui Franken 2025-02-02 18:28:10 +01:00
parent 70382d628f
commit a0fac3c2dc
3 changed files with 14 additions and 0 deletions

View file

@ -13,6 +13,7 @@
- monitoring-plugins-basic
- monitoring-plugins-common
- monitoring-plugins-standard
- monitoring-plugins-systemd
state: present
- name: Setup Icinga2 master

View file

@ -4,3 +4,9 @@ object CheckCommand "sudo_pgsql" {
import "pgsql"
command = [ "sudo", "-u", "postgres" ] + command
}
# the original "systemd" CheckCommand uses /check_systemd.py as executable
object CheckCommand "check_systemd" {
import "systemd"
command = [ PluginDir + "/check_systemd" ]
}

View file

@ -88,3 +88,10 @@ apply Service "mailq" {
vars.mailq_warning = 10
vars.mailq_critical = 20
}
apply Service "systemd" {
import "generic-service"
check_command = "check_systemd"
command_endpoint = host.name
assign where true
}