From 8e6ad0dbebc464f94b4aad10cc2b421d588af024 Mon Sep 17 00:00:00 2001 From: Konrad Bucheli Date: Mon, 3 Mar 2025 14:57:57 +0100 Subject: [PATCH] more systemd unit check posibilities --- admin-guide/configuration/monitoring/icinga2.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/admin-guide/configuration/monitoring/icinga2.md b/admin-guide/configuration/monitoring/icinga2.md index 86e4f7d5..1910ab74 100644 --- a/admin-guide/configuration/monitoring/icinga2.md +++ b/admin-guide/configuration/monitoring/icinga2.md @@ -209,8 +209,7 @@ Here the warning is below 180 days and below 30 days is critical by default. ### Check for Systemd Service Status -To check if a daemon or service has been successfully started by `systemd` configure: - +To check if a daemon or service has been successfully started by `systemd` configure a custom service using the `st-agent-awi-lx-service-active` template: ``` icinga2::custom_service: @@ -227,6 +226,20 @@ The `service_names` variable needs to contain one or more name of `systemd` serv You can create multiple of these checks. +Alternatively a more detailed configuration of a systemd unit state check can be done with the `st-agent-lf-systemd-unit` template: + +``` +icinga2::custom_service: + 'Last Puppet Run': + template: 'st-agent-lf-systemd-unit' + vars: + systemd_unit_unit: 'pli-puppet-run' + systemd_unit_activestate: ['active', 'inactive'] + systemd_unit_unitfilestate: 'static' + criticality: 'A' +``` + + ### External Connection Checks (Active Checks) For this we have fully custom service checks.