Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-24135

Improve Systemd template docs with better config instructions

XMLWordPrintable

    • Icon: Documentation task Documentation task
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • None
    • Documentation (D)
    • None

      By default, the Zabbix Systemd template monitors the state of all services running on the host but thats not the way I use and I expect it not the way most users will want to use it.

      I only ever want to monitor a specific few services on any given server so I think the Zabbix systemd integration docs ( https://www.zabbix.com/integrations/systemd ) should cover how to configure the template to only monitor specific services.

      Here are some notes that I wrote for my own usage which I think should be integrated with the Zabbix systemd docs, under the Configurarion or Setup section of https://www.zabbix.com/integrations/systemd maybe?

      First, zabbix-agent2 must be installed and configured on the machine you wish to monitor. The Systemd template doesn't work with the old zabbix-agent.

      Next, add the Systemd by Zabbix agent template to the host you wish to monitor under Configuration -> Hosts.

      Now we need to configure the template under Configuration -> Templates -> Macros. On this screen we adjust the value of the {$SYSTEMD.NAME.SERVICE.MATCHES} macro to:

      apache2.service|fail2ban.service|mysql.service|php8.1-fpm.service|postgresql.service|ssh.service

      Adjust php8.1-fpm to the current running version of php or add another php service in if more than one version of php is being run then click Update to save these changes.

      Optionally...

      Next, go to Configuration -> Templates -> Discovery rules and change the interval for both Service units discovery and Socket units discovery to 1m instead of 30m.

       

            zabbix.support Zabbix Support Team
            danboid Dan MacDonald
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: