I’m using a systemd check located here (GitHub - patrikskrivanek/icinga2-check_systemd_service: Icinga2 exchange plugin for monitoring systemd services.). Below are my configs. What I’m seeing is that on the CentOS 7 servers, the check is working normally. On CentOS 8, I’m getting “ERROR: service gitlab-runner doesn’t exist”. What am I missing?
template CheckCommand "systemd-service" {
import "plugin-check-command"
command = [ PluginDir + "/check_systemd_service" ]
arguments += {
"--service_name" = {
description = "Name of systemd service for check"
order = 1
repeat_key = false
required = true
skip_key = true
value = "$systemd_service$"
}
}
}
object CheckCommand "gitlab-runner-service" {
import "plugin-check-command"
import "systemd-service"
arguments += {
"--service_name" = {
description = "Name of systemd service for check"
order = 1
required = true
skip_key = true
value = "gitlab-runner"
}
}
}
apply Service "gitlab-runner-service" {
import "linux-services"
check_command = "gitlab-runner-service"
assign where match("*runner*", host.name)
import DirectorOverrideTemplate
}