zabbix_export:
  version: '6.2'
  date: '2022-08-29T09:28:02Z'
  template_groups:
    -
      uuid: 57b7ae836ca64446ba2c296389c009b7
      name: Templates/Modules
  templates:
    -
      uuid: d5151029608f4b068913d5f74a9b569b
      template: 'Template Module Linux systemd by Zabbix agent 2 active'
      name: 'Template Module Linux systemd by Zabbix agent 2 active'
      groups:
        -
          name: Templates/Modules
      discovery_rules:
        -
          uuid: 7c4ee9c507624c48a9248da972220814
          name: 'Systemd services discovery'
          type: ZABBIX_ACTIVE
          key: systemd.unit.discovery
          delay: 1h
          filter:
            evaltype: AND
            conditions:
              -
                macro: '{#UNIT.LOADSTATE}'
                value: loaded
                formulaid: A
              -
                macro: '{#UNIT.NAME}'
                value: ^unbound-anchor|ypxfrd|sendmail|selinux-policy-migrate-local-changes@targeted|sntp|rescue|rc-local|ntpdate|microcode|ipset|exim|ip6tables|iptables|cpupower|display-manager|dm-event|brandbot|cloud-init-local|ebtables|emergency
                operator: NOT_MATCHES_REGEX
                formulaid: B
              -
                macro: '{#UNIT.NAME}'
                value: ^ypserv|ypbind|ntpd|sshd-keygen|dracut-shutdown|syslog|systemd.+|plymouth.+|rhel.+|lvm2.+|getty.+
                operator: NOT_MATCHES_REGEX
                formulaid: C
              -
                macro: '{#UNIT.NAME}'
                value: ^NetworkManager-dispatcher
                operator: NOT_MATCHES_REGEX
                formulaid: D
          item_prototypes:
            -
              uuid: 932da67f277d4d27a3d672b15dc377bd
              name: 'Type of Service: {#UNIT.NAME}'
              type: ZABBIX_ACTIVE
              key: 'systemd.unit.info["{#UNIT.NAME}",Type,Service]'
              delay: 60m
              trends: '0'
              value_type: CHAR
              tags:
                -
                  tag: Application
                  value: Systemd
            -
              uuid: 480f9f2b94e7435eb10ac46192c0456c
              name: 'State of Service Permanent: {#UNIT.NAME}'
              type: ZABBIX_ACTIVE
              key: 'systemd.unit.info["{#UNIT.NAME}",UnitFileState]'
              delay: 5m
              trends: '0'
              value_type: CHAR
              tags:
                -
                  tag: Application
                  value: Systemd
            -
              uuid: 47fc89ddf36e494395f7fec300fe4cc8
              name: 'State of service: {#UNIT.NAME}'
              type: ZABBIX_ACTIVE
              key: 'systemd.unit.info["{#UNIT.NAME}"]'
              trends: '0'
              value_type: CHAR
              description: |
                Description: {#UNIT.DESCRIPTION}
                Path: {#UNIT.PATH}
              tags:
                -
                  tag: Application
                  value: Systemd
          trigger_prototypes:
            -
              uuid: 4b9da5cba9cc4a5b8672c2a8d1a912ec
              expression: 'last(/Template Module Linux systemd by Zabbix agent 2 active/systemd.unit.info["{#UNIT.NAME}"])<>"active" and last(/Template Module Linux systemd by Zabbix agent 2 active/systemd.unit.info["{#UNIT.NAME}",UnitFileState])="enabled" and last(/Template Module Linux systemd by Zabbix agent 2 active/systemd.unit.info["{#UNIT.NAME}",Type,Service])<>"oneshot"'
              name: 'Service {#UNIT.NAME} is not running!'
              opdata: 'Service current state: {ITEM.LASTVALUE}'
              priority: WARNING
              description: |
                Description: {#UNIT.DESCRIPTION}
                Path: {#UNIT.PATH}
            -
              uuid: ce5b44f9f4bc4f2085b69bfecdc9eb89
              expression: 'last(/Template Module Linux systemd by Zabbix agent 2 active/systemd.unit.info["{#UNIT.NAME}",Type,Service])<>"oneshot" and last(/Template Module Linux systemd by Zabbix agent 2 active/systemd.unit.info["{#UNIT.NAME}"])="active" and last(/Template Module Linux systemd by Zabbix agent 2 active/systemd.unit.info["{#UNIT.NAME}",UnitFileState])="disabled"'
              name: 'Service {#UNIT.NAME} is running but not enabled!'
              opdata: 'Service current state: {ITEM.LASTVALUE}'
              priority: WARNING
              description: |
                Description: {#UNIT.DESCRIPTION}
                Path: {#UNIT.PATH}
