Ad Widget

Collapse

Monitoring of list of certain systemd services

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zlobniy Shurik
    Junior Member
    • Nov 2025
    • 2

    #1

    Monitoring of list of certain systemd services

    Debian 13, zabbix-agent 2 v 7.4.xx

    I want to monitor a list of specific systemd services (whether they are currently running or not).

    For now I tried to use Systemd by Zabbix Agent 2 template. It's working, but with default settings this template monitoring all enabled systemd-services. For me, this is not an ideal option - too many unnecessary metrics and alerts.
    Can I limit monitoring services with this template? For example, nginx|postgresql|redis|e.t.c

    P.S. I tried limit services by change macros {$SYSTEMD.NAME.SERVICE.MATCHES} to something like
    Code:
    ^(nginx|postgresql|redis)$
    but without succes - services was not discowered at all. No new metrics, no alerts on non running services.
    I am definitely doing something wrong, but what?
  • Answer selected by Zlobniy Shurik at 25-11-2025, 15:26.
    troffasky
    Senior Member
    • Jul 2008
    • 565

    Your regex needs to match .service on the end of each service name.
    Last edited by troffasky; 25-11-2025, 14:33.

    Comment

    • troffasky
      Senior Member
      • Jul 2008
      • 565

      #2
      Your regex needs to match .service on the end of each service name.
      Last edited by troffasky; 25-11-2025, 14:33.

      Comment

      • Zlobniy Shurik
        Junior Member
        • Nov 2025
        • 2

        #3
        Thank you!
        Now it's working.

        Comment

        Working...