Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/systemd?at=release/7.4
Systemd by Zabbix agent 2
Overview
This template is designed for the effortless deployment of Systemd monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
Requirements
Zabbix version: 7.4 and higher.
Tested versions
This template has been tested on:
- Systemd 252
 
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Setup and configure zabbix-agent2 compiled with the Systemd monitoring plugin.
 - Set filters with macros if you want to override default filter parameters.
 
Macros used
| Name | Description | Default | 
|---|---|---|
| {$SYSTEMD.NAME.SOCKET.MATCHES} | Filter of systemd socket units by name.  | 
.+ | 
| {$SYSTEMD.NAME.SOCKET.NOT_MATCHES} | Filter of systemd socket units by name.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.MATCHES} | Filter of systemd socket units by active state.  | 
.+ | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by active state.  | 
^inactive$ | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.MATCHES} | Filter of systemd socket units by unit file state.  | 
^enabled$ | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by unit file state.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SERVICE.MATCHES} | Filter of systemd service units by name.  | 
.+ | 
| {$SYSTEMD.NAME.SERVICE.NOT_MATCHES} | Filter of systemd service units by name.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.MATCHES} | Filter of systemd service units by active state.  | 
.+ | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by active state.  | 
^inactive$ | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.MATCHES} | Filter of systemd service units by unit file state.  | 
^enabled$ | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by unit file state.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.SERVICETYPE.SERVICE.MATCHES} | Filter of systemd service units by service type.  | 
.+ | 
| {$SYSTEMD.SERVICETYPE.SERVICE.NOT_MATCHES} | Filter of systemd service units by service type.  | 
CHANGE_IF_NEEDED | 
LLD rule Service units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Service units discovery | Discover systemd service units and their details.  | 
Zabbix agent | systemd.unit.discovery[service] | 
Item prototypes for Service units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| {#UNIT.NAME}: Get unit info | Returns all properties of a systemd service unit. Unit description: {#UNIT.DESCRIPTION}.  | 
Zabbix agent | systemd.unit.get["{#UNIT.NAME}"] | 
| {#UNIT.NAME}: Active state | State value that reflects whether the unit is currently active or not. The following states are currently defined: "active", "reloading", "inactive", "failed", "activating", and "deactivating".  | 
Dependent item | systemd.service.active_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Load state | State value that reflects whether the configuration file of this unit has been loaded. The following states are currently defined: "loaded", "error", and "masked".  | 
Dependent item | systemd.service.load_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Unit file state | Encodes the install state of the unit file of FragmentPath. It currently knows the following states: "enabled", "enabled-runtime", "linked", "linked-runtime", "masked", "masked-runtime", "static", "disabled", and "invalid".  | 
Dependent item | systemd.service.unitfile_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Active time | Number of seconds since unit entered the active state.  | 
Dependent item | systemd.service.uptime["{#UNIT.NAME}"] Preprocessing 
  | 
Trigger prototypes for Service units discovery
| Name | Description | Expression | Severity | Dependencies and additional info | 
|---|---|---|---|---|
| Systemd: {#UNIT.NAME}: Service is not running | last(/Systemd by Zabbix agent 2/systemd.service.active_state["{#UNIT.NAME}"])<>1 | 
Warning | Manual close: Yes | |
| Systemd: {#UNIT.NAME} has been restarted | Uptime is less than 10 minutes.  | 
last(/Systemd by Zabbix agent 2/systemd.service.uptime["{#UNIT.NAME}"])<10m | 
Info | Manual close: Yes | 
LLD rule Socket units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Socket units discovery | Discover systemd socket units and their details.  | 
Zabbix agent | systemd.unit.discovery[socket] | 
Item prototypes for Socket units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| {#UNIT.NAME}: Get unit info | Returns all properties of a systemd socket unit. Unit description: {#UNIT.DESCRIPTION}.  | 
Zabbix agent | systemd.unit.get["{#UNIT.NAME}",Socket] | 
| {#UNIT.NAME}: Connections accepted per sec | The number of accepted socket connections (NAccepted) per second.  | 
Dependent item | systemd.socket.conn_accepted.rate["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Connections connected | The current number of socket connections (NConnections).  | 
Dependent item | systemd.socket.conn_count["{#UNIT.NAME}"] Preprocessing 
  | 
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/systemd?at=release/7.2
Systemd by Zabbix agent 2
Overview
This template is designed for the effortless deployment of Systemd monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
Requirements
Zabbix version: 7.2 and higher.
Tested versions
This template has been tested on:
- Systemd 252
 
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Setup and configure zabbix-agent2 compiled with the Systemd monitoring plugin.
 - Set filters with macros if you want to override default filter parameters.
 
Macros used
| Name | Description | Default | 
|---|---|---|
| {$SYSTEMD.NAME.SOCKET.MATCHES} | Filter of systemd socket units by name.  | 
.+ | 
| {$SYSTEMD.NAME.SOCKET.NOT_MATCHES} | Filter of systemd socket units by name.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.MATCHES} | Filter of systemd socket units by active state.  | 
.+ | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by active state.  | 
^inactive$ | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.MATCHES} | Filter of systemd socket units by unit file state.  | 
^enabled$ | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by unit file state.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SERVICE.MATCHES} | Filter of systemd service units by name.  | 
.+ | 
| {$SYSTEMD.NAME.SERVICE.NOT_MATCHES} | Filter of systemd service units by name.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.MATCHES} | Filter of systemd service units by active state.  | 
.+ | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by active state.  | 
^inactive$ | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.MATCHES} | Filter of systemd service units by unit file state.  | 
^enabled$ | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by unit file state.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.SERVICETYPE.SERVICE.MATCHES} | Filter of systemd service units by service type.  | 
.+ | 
| {$SYSTEMD.SERVICETYPE.SERVICE.NOT_MATCHES} | Filter of systemd service units by service type.  | 
CHANGE_IF_NEEDED | 
LLD rule Service units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Service units discovery | Discover systemd service units and their details.  | 
Zabbix agent | systemd.unit.discovery[service] | 
Item prototypes for Service units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| {#UNIT.NAME}: Get unit info | Returns all properties of a systemd service unit. Unit description: {#UNIT.DESCRIPTION}.  | 
Zabbix agent | systemd.unit.get["{#UNIT.NAME}"] | 
| {#UNIT.NAME}: Active state | State value that reflects whether the unit is currently active or not. The following states are currently defined: "active", "reloading", "inactive", "failed", "activating", and "deactivating".  | 
Dependent item | systemd.service.active_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Load state | State value that reflects whether the configuration file of this unit has been loaded. The following states are currently defined: "loaded", "error", and "masked".  | 
Dependent item | systemd.service.load_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Unit file state | Encodes the install state of the unit file of FragmentPath. It currently knows the following states: "enabled", "enabled-runtime", "linked", "linked-runtime", "masked", "masked-runtime", "static", "disabled", and "invalid".  | 
Dependent item | systemd.service.unitfile_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Active time | Number of seconds since unit entered the active state.  | 
Dependent item | systemd.service.uptime["{#UNIT.NAME}"] Preprocessing 
  | 
Trigger prototypes for Service units discovery
| Name | Description | Expression | Severity | Dependencies and additional info | 
|---|---|---|---|---|
| Systemd: {#UNIT.NAME}: Service is not running | last(/Systemd by Zabbix agent 2/systemd.service.active_state["{#UNIT.NAME}"])<>1 | 
Warning | Manual close: Yes | |
| Systemd: {#UNIT.NAME} has been restarted | Uptime is less than 10 minutes.  | 
last(/Systemd by Zabbix agent 2/systemd.service.uptime["{#UNIT.NAME}"])<10m | 
Info | Manual close: Yes | 
LLD rule Socket units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Socket units discovery | Discover systemd socket units and their details.  | 
Zabbix agent | systemd.unit.discovery[socket] | 
Item prototypes for Socket units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| {#UNIT.NAME}: Get unit info | Returns all properties of a systemd socket unit. Unit description: {#UNIT.DESCRIPTION}.  | 
Zabbix agent | systemd.unit.get["{#UNIT.NAME}",Socket] | 
| {#UNIT.NAME}: Connections accepted per sec | The number of accepted socket connections (NAccepted) per second.  | 
Dependent item | systemd.socket.conn_accepted.rate["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Connections connected | The current number of socket connections (NConnections).  | 
Dependent item | systemd.socket.conn_count["{#UNIT.NAME}"] Preprocessing 
  | 
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/systemd?at=release/7.0
Systemd by Zabbix agent 2
Overview
This template is designed for the effortless deployment of Systemd monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
Requirements
Zabbix version: 7.0 and higher.
Tested versions
This template has been tested on:
- Systemd 252
 
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Setup and configure zabbix-agent2 compiled with the Systemd monitoring plugin.
 - Set filters with macros if you want to override default filter parameters.
 
Macros used
| Name | Description | Default | 
|---|---|---|
| {$SYSTEMD.NAME.SOCKET.MATCHES} | Filter of systemd socket units by name.  | 
.+ | 
| {$SYSTEMD.NAME.SOCKET.NOT_MATCHES} | Filter of systemd socket units by name.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.MATCHES} | Filter of systemd socket units by active state.  | 
.+ | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by active state.  | 
^inactive$ | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.MATCHES} | Filter of systemd socket units by unit file state.  | 
^enabled$ | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by unit file state.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SERVICE.MATCHES} | Filter of systemd service units by name.  | 
.+ | 
| {$SYSTEMD.NAME.SERVICE.NOT_MATCHES} | Filter of systemd service units by name.  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.MATCHES} | Filter of systemd service units by active state.  | 
.+ | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by active state.  | 
^inactive$ | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.MATCHES} | Filter of systemd service units by unit file state.  | 
^enabled$ | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by unit file state.  | 
CHANGE_IF_NEEDED | 
LLD rule Service units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Service units discovery | Discover systemd service units and their details.  | 
Zabbix agent | systemd.unit.discovery[service] | 
Item prototypes for Service units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| {#UNIT.NAME}: Get unit info | Returns all properties of a systemd service unit. Unit description: {#UNIT.DESCRIPTION}.  | 
Zabbix agent | systemd.unit.get["{#UNIT.NAME}"] | 
| {#UNIT.NAME}: Active state | State value that reflects whether the unit is currently active or not. The following states are currently defined: "active", "reloading", "inactive", "failed", "activating", and "deactivating".  | 
Dependent item | systemd.service.active_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Load state | State value that reflects whether the configuration file of this unit has been loaded. The following states are currently defined: "loaded", "error", and "masked".  | 
Dependent item | systemd.service.load_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Unit file state | Encodes the install state of the unit file of FragmentPath. It currently knows the following states: "enabled", "enabled-runtime", "linked", "linked-runtime", "masked", "masked-runtime", "static", "disabled", and "invalid".  | 
Dependent item | systemd.service.unitfile_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Active time | Number of seconds since unit entered the active state.  | 
Dependent item | systemd.service.uptime["{#UNIT.NAME}"] Preprocessing 
  | 
Trigger prototypes for Service units discovery
| Name | Description | Expression | Severity | Dependencies and additional info | 
|---|---|---|---|---|
| Systemd: {#UNIT.NAME}: Service is not running | last(/Systemd by Zabbix agent 2/systemd.service.active_state["{#UNIT.NAME}"])<>1 | 
Warning | Manual close: Yes | |
| Systemd: {#UNIT.NAME} has been restarted | Uptime is less than 10 minutes.  | 
last(/Systemd by Zabbix agent 2/systemd.service.uptime["{#UNIT.NAME}"])<10m | 
Info | Manual close: Yes | 
LLD rule Socket units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Socket units discovery | Discover systemd socket units and their details.  | 
Zabbix agent | systemd.unit.discovery[socket] | 
Item prototypes for Socket units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| {#UNIT.NAME}: Get unit info | Returns all properties of a systemd socket unit. Unit description: {#UNIT.DESCRIPTION}.  | 
Zabbix agent | systemd.unit.get["{#UNIT.NAME}",Socket] | 
| {#UNIT.NAME}: Connections accepted per sec | The number of accepted socket connections (NAccepted) per second.  | 
Dependent item | systemd.socket.conn_accepted.rate["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Connections connected | The current number of socket connections (NConnections).  | 
Dependent item | systemd.socket.conn_count["{#UNIT.NAME}"] Preprocessing 
  | 
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/systemd?at=release/6.4
Systemd by Zabbix agent 2
Overview
This template is designed for the effortless deployment of Systemd monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
Requirements
Zabbix version: 6.4 and higher.
Tested versions
This template has been tested on:
- Systemd 219
 
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Setup and configure zabbix-agent2 compiled with the Systemd monitoring plugin.
 - Set filters with macros if you want to override default filter parameters.
 
Macros used
| Name | Description | Default | 
|---|---|---|
| {$SYSTEMD.NAME.SOCKET.MATCHES} | Filter of systemd socket units by name  | 
.* | 
| {$SYSTEMD.NAME.SOCKET.NOT_MATCHES} | Filter of systemd socket units by name  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.MATCHES} | Filter of systemd socket units by active state  | 
active | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by active state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.MATCHES} | Filter of systemd socket units by unit file state  | 
enabled | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by unit file state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SERVICE.MATCHES} | Filter of systemd service units by name  | 
.* | 
| {$SYSTEMD.NAME.SERVICE.NOT_MATCHES} | Filter of systemd service units by name  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.MATCHES} | Filter of systemd service units by active state  | 
active | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by active state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.MATCHES} | Filter of systemd service units by unit file state  | 
enabled | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by unit file state  | 
CHANGE_IF_NEEDED | 
LLD rule Service units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Service units discovery | Discover systemd service units and their details.  | 
Zabbix agent | systemd.unit.discovery[service] | 
Item prototypes for Service units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| {#UNIT.NAME}: Get unit info | Returns all properties of a systemd service unit. Unit description: {#UNIT.DESCRIPTION}.  | 
Zabbix agent | systemd.unit.get["{#UNIT.NAME}"] | 
| {#UNIT.NAME}: Active state | State value that reflects whether the unit is currently active or not. The following states are currently defined: "active", "reloading", "inactive", "failed", "activating", and "deactivating".  | 
Dependent item | systemd.service.active_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Load state | State value that reflects whether the configuration file of this unit has been loaded. The following states are currently defined: "loaded", "error", and "masked".  | 
Dependent item | systemd.service.load_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Unit file state | Encodes the install state of the unit file of FragmentPath. It currently knows the following states: "enabled", "enabled-runtime", "linked", "linked-runtime", "masked", "masked-runtime", "static", "disabled", and "invalid".  | 
Dependent item | systemd.service.unitfile_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Active time | Number of seconds since unit entered the active state.  | 
Dependent item | systemd.service.uptime["{#UNIT.NAME}"] Preprocessing 
  | 
Trigger prototypes for Service units discovery
| Name | Description | Expression | Severity | Dependencies and additional info | 
|---|---|---|---|---|
| {#UNIT.NAME}: Service is not running | last(/Systemd by Zabbix agent 2/systemd.service.active_state["{#UNIT.NAME}"])<>1 | 
Warning | Manual close: Yes | |
| {#UNIT.NAME}: has been restarted | Uptime is less than 10 minutes.  | 
last(/Systemd by Zabbix agent 2/systemd.service.uptime["{#UNIT.NAME}"])<10m | 
Info | Manual close: Yes | 
LLD rule Socket units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Socket units discovery | Discover systemd socket units and their details.  | 
Zabbix agent | systemd.unit.discovery[socket] | 
Item prototypes for Socket units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| {#UNIT.NAME}: Get unit info | Returns all properties of a systemd socket unit. Unit description: {#UNIT.DESCRIPTION}.  | 
Zabbix agent | systemd.unit.get["{#UNIT.NAME}",Socket] | 
| {#UNIT.NAME}: Connections accepted per sec | The number of accepted socket connections (NAccepted) per second.  | 
Dependent item | systemd.socket.conn_accepted.rate["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Connections connected | The current number of socket connections (NConnections).  | 
Dependent item | systemd.socket.conn_count["{#UNIT.NAME}"] Preprocessing 
  | 
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/systemd?at=release/6.2
Systemd by Zabbix agent 2
Overview
For Zabbix version: 6.2 and higher
The template to monitor systemd units.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Systemd by Zabbix agent 2 — collects metrics by polling zabbix-agent2.
This template was tested on:
- Systemd, version 219
 
Setup
See Zabbix template operation for basic instructions.
- Setup and configure zabbix-agent2 compiled with the Systemd monitoring plugin.
 - Set filters with macros if you want to override default filter parameters.
 
Zabbix configuration
No specific Zabbix configuration is required.
Macros used
| Name | Description | Default | 
|---|---|---|
| {$SYSTEMD.ACTIVESTATE.SERVICE.MATCHES} | Filter of systemd service units by active state  | 
active | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by active state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.MATCHES} | Filter of systemd socket units by active state  | 
active | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by active state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SERVICE.MATCHES} | Filter of systemd service units by name  | 
.* | 
| {$SYSTEMD.NAME.SERVICE.NOT_MATCHES} | Filter of systemd service units by name  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SOCKET.MATCHES} | Filter of systemd socket units by name  | 
.* | 
| {$SYSTEMD.NAME.SOCKET.NOT_MATCHES} | Filter of systemd socket units by name  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.MATCHES} | Filter of systemd service units by unit file state  | 
enabled | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by unit file state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.MATCHES} | Filter of systemd socket units by unit file state  | 
enabled | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by unit file state  | 
CHANGE_IF_NEEDED | 
Template links
There are no template links in this template.
Discovery rules
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Service units discovery | Discover systemd service units and their details.  | 
ZABBIX_PASSIVE | systemd.unit.discovery[service] Filter: AND- {#UNIT.ACTIVESTATE} MATCHES_REGEX  - {#UNIT.ACTIVESTATE} NOT_MATCHES_REGEX  - {#UNIT.UNITFILESTATE} MATCHES_REGEX  - {#UNIT.UNITFILESTATE} NOT_MATCHES_REGEX  - {#UNIT.NAME} NOT_MATCHES_REGEX  - {#UNIT.NAME} MATCHES_REGEX   | 
| Socket units discovery | Discover systemd socket units and their details.  | 
ZABBIX_PASSIVE | systemd.unit.discovery[socket] Filter: AND- {#UNIT.ACTIVESTATE} MATCHES_REGEX  - {#UNIT.ACTIVESTATE} NOT_MATCHES_REGEX  - {#UNIT.UNITFILESTATE} MATCHES_REGEX  - {#UNIT.UNITFILESTATE} NOT_MATCHES_REGEX  - {#UNIT.NAME} NOT_MATCHES_REGEX  - {#UNIT.NAME} MATCHES_REGEX   | 
Items collected
| Group | Name | Description | Type | Key and additional info | 
|---|---|---|---|---|
| Systemd | {#UNIT.NAME}: Active state | State value that reflects whether the unit is currently active or not. The following states are currently defined: "active", "reloading", "inactive", "failed", "activating", and "deactivating".  | 
DEPENDENT | systemd.service.active_state["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - DISCARD_UNCHANGED_HEARTBEAT:   | 
| Systemd | {#UNIT.NAME}: Load state | State value that reflects whether the configuration file of this unit has been loaded. The following states are currently defined: "loaded", "error", and "masked".  | 
DEPENDENT | systemd.service.load_state["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - DISCARD_UNCHANGED_HEARTBEAT:   | 
| Systemd | {#UNIT.NAME}: Unit file state | Encodes the install state of the unit file of FragmentPath. It currently knows the following states: "enabled", "enabled-runtime", "linked", "linked-runtime", "masked", "masked-runtime", "static", "disabled", and "invalid".  | 
DEPENDENT | systemd.service.unitfile_state["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - DISCARD_UNCHANGED_HEARTBEAT:   | 
| Systemd | {#UNIT.NAME}: Active time | Number of seconds since unit entered the active state.  | 
DEPENDENT | systemd.service.uptime["{#UNIT.NAME}"] Preprocessing: - JAVASCRIPT:   | 
| Systemd | {#UNIT.NAME}: Connections accepted per sec | The number of accepted socket connections (NAccepted) per second.  | 
DEPENDENT | systemd.socket.conn_accepted.rate["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - CHANGE_PER_SECOND  | 
| Systemd | {#UNIT.NAME}: Connections connected | The current number of socket connections (NConnections).  | 
DEPENDENT | systemd.socket.conn_count["{#UNIT.NAME}"] Preprocessing: - JSONPATH:   | 
| Zabbix raw items | {#UNIT.NAME}: Get unit info | Returns all properties of a systemd service unit. Unit description: {#UNIT.DESCRIPTION}.  | 
ZABBIX_PASSIVE | systemd.unit.get["{#UNIT.NAME}"] | 
| Zabbix raw items | {#UNIT.NAME}: Get unit info | Returns all properties of a systemd socket unit. Unit description: {#UNIT.DESCRIPTION}.  | 
ZABBIX_PASSIVE | systemd.unit.get["{#UNIT.NAME}",Socket] | 
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info | 
|---|---|---|---|---|
| {#UNIT.NAME}: Service is not running | -  | 
last(/Systemd by Zabbix agent 2/systemd.service.active_state["{#UNIT.NAME}"])<>1 | 
WARNING | Manual close: YES  | 
| {#UNIT.NAME}: has been restarted | Uptime is less than 10 minutes.  | 
last(/Systemd by Zabbix agent 2/systemd.service.uptime["{#UNIT.NAME}"])<10m | 
INFO | Manual close: YES  | 
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template or ask for help with it at ZABBIX forums.
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/systemd?at=release/6.0
Systemd by Zabbix agent 2
Overview
This template is designed for the effortless deployment of Systemd monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
Requirements
Zabbix version: 6.0 and higher.
Tested versions
This template has been tested on:
- Systemd 219
 
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Setup and configure zabbix-agent2 compiled with the Systemd monitoring plugin.
 - Set filters with macros if you want to override default filter parameters.
 
Macros used
| Name | Description | Default | 
|---|---|---|
| {$SYSTEMD.NAME.SOCKET.MATCHES} | Filter of systemd socket units by name  | 
.* | 
| {$SYSTEMD.NAME.SOCKET.NOT_MATCHES} | Filter of systemd socket units by name  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.MATCHES} | Filter of systemd socket units by active state  | 
active | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by active state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.MATCHES} | Filter of systemd socket units by unit file state  | 
enabled | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by unit file state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SERVICE.MATCHES} | Filter of systemd service units by name  | 
.* | 
| {$SYSTEMD.NAME.SERVICE.NOT_MATCHES} | Filter of systemd service units by name  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.MATCHES} | Filter of systemd service units by active state  | 
active | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by active state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.MATCHES} | Filter of systemd service units by unit file state  | 
enabled | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by unit file state  | 
CHANGE_IF_NEEDED | 
LLD rule Service units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Service units discovery | Discover systemd service units and their details.  | 
Zabbix agent | systemd.unit.discovery[service] | 
Item prototypes for Service units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| {#UNIT.NAME}: Get unit info | Returns all properties of a systemd service unit. Unit description: {#UNIT.DESCRIPTION}.  | 
Zabbix agent | systemd.unit.get["{#UNIT.NAME}"] | 
| {#UNIT.NAME}: Active state | State value that reflects whether the unit is currently active or not. The following states are currently defined: "active", "reloading", "inactive", "failed", "activating", and "deactivating".  | 
Dependent item | systemd.service.active_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Load state | State value that reflects whether the configuration file of this unit has been loaded. The following states are currently defined: "loaded", "error", and "masked".  | 
Dependent item | systemd.service.load_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Unit file state | Encodes the install state of the unit file of FragmentPath. It currently knows the following states: "enabled", "enabled-runtime", "linked", "linked-runtime", "masked", "masked-runtime", "static", "disabled", and "invalid".  | 
Dependent item | systemd.service.unitfile_state["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Active time | Number of seconds since unit entered the active state.  | 
Dependent item | systemd.service.uptime["{#UNIT.NAME}"] Preprocessing 
  | 
Trigger prototypes for Service units discovery
| Name | Description | Expression | Severity | Dependencies and additional info | 
|---|---|---|---|---|
| {#UNIT.NAME}: Service is not running | last(/Systemd by Zabbix agent 2/systemd.service.active_state["{#UNIT.NAME}"])<>1 | 
Warning | Manual close: Yes | |
| {#UNIT.NAME}: has been restarted | Uptime is less than 10 minutes.  | 
last(/Systemd by Zabbix agent 2/systemd.service.uptime["{#UNIT.NAME}"])<10m | 
Info | Manual close: Yes | 
LLD rule Socket units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Socket units discovery | Discover systemd socket units and their details.  | 
Zabbix agent | systemd.unit.discovery[socket] | 
Item prototypes for Socket units discovery
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| {#UNIT.NAME}: Get unit info | Returns all properties of a systemd socket unit. Unit description: {#UNIT.DESCRIPTION}.  | 
Zabbix agent | systemd.unit.get["{#UNIT.NAME}",Socket] | 
| {#UNIT.NAME}: Connections accepted per sec | The number of accepted socket connections (NAccepted) per second.  | 
Dependent item | systemd.socket.conn_accepted.rate["{#UNIT.NAME}"] Preprocessing 
  | 
| {#UNIT.NAME}: Connections connected | The current number of socket connections (NConnections).  | 
Dependent item | systemd.socket.conn_count["{#UNIT.NAME}"] Preprocessing 
  | 
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/systemd?at=release/5.4
Systemd by Zabbix agent 2
Overview
For Zabbix version: 5.4 and higher
The template to monitor systemd units.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Systemd by Zabbix agent 2 — collects metrics by polling zabbix-agent2.
This template was tested on:
- Systemd, version 219
 
Setup
See Zabbix template operation for basic instructions.
- Setup and configure zabbix-agent2 compiled with the Systemd monitoring plugin.
 - Set filters with macros if you want to override default filter parameters.
 
Zabbix configuration
No specific Zabbix configuration is required.
Macros used
| Name | Description | Default | 
|---|---|---|
| {$SYSTEMD.ACTIVESTATE.SERVICE.MATCHES} | Filter of systemd service units by active state  | 
active | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by active state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.MATCHES} | Filter of systemd socket units by active state  | 
active | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by active state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SERVICE.MATCHES} | Filter of systemd service units by name  | 
.* | 
| {$SYSTEMD.NAME.SERVICE.NOT_MATCHES} | Filter of systemd service units by name  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SOCKET.MATCHES} | Filter of systemd socket units by name  | 
.* | 
| {$SYSTEMD.NAME.SOCKET.NOT_MATCHES} | Filter of systemd socket units by name  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.MATCHES} | Filter of systemd service units by unit file state  | 
enabled | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by unit file state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.MATCHES} | Filter of systemd socket units by unit file state  | 
enabled | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by unit file state  | 
CHANGE_IF_NEEDED | 
Template links
There are no template links in this template.
Discovery rules
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Service units discovery | Discover systemd service units and their details.  | 
ZABBIX_PASSIVE | systemd.unit.discovery[service] Filter: AND- {#UNIT.ACTIVESTATE} MATCHES_REGEX  - {#UNIT.ACTIVESTATE} NOT_MATCHES_REGEX  - {#UNIT.UNITFILESTATE} MATCHES_REGEX  - {#UNIT.UNITFILESTATE} NOT_MATCHES_REGEX  - {#UNIT.NAME} NOT_MATCHES_REGEX  - {#UNIT.NAME} MATCHES_REGEX   | 
| Socket units discovery | Discover systemd socket units and their details.  | 
ZABBIX_PASSIVE | systemd.unit.discovery[socket] Filter: AND- {#UNIT.ACTIVESTATE} MATCHES_REGEX  - {#UNIT.ACTIVESTATE} NOT_MATCHES_REGEX  - {#UNIT.UNITFILESTATE} MATCHES_REGEX  - {#UNIT.UNITFILESTATE} NOT_MATCHES_REGEX  - {#UNIT.NAME} NOT_MATCHES_REGEX  - {#UNIT.NAME} MATCHES_REGEX   | 
Items collected
| Group | Name | Description | Type | Key and additional info | 
|---|---|---|---|---|
| Systemd | {#UNIT.NAME}: Active state | State value that reflects whether the unit is currently active or not. The following states are currently defined: "active", "reloading", "inactive", "failed", "activating", and "deactivating".  | 
DEPENDENT | systemd.service.active_state["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - DISCARD_UNCHANGED_HEARTBEAT:   | 
| Systemd | {#UNIT.NAME}: Load state | State value that reflects whether the configuration file of this unit has been loaded. The following states are currently defined: "loaded", "error", and "masked".  | 
DEPENDENT | systemd.service.load_state["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - DISCARD_UNCHANGED_HEARTBEAT:   | 
| Systemd | {#UNIT.NAME}: Unit file state | Encodes the install state of the unit file of FragmentPath. It currently knows the following states: "enabled", "enabled-runtime", "linked", "linked-runtime", "masked", "masked-runtime", "static", "disabled", and "invalid".  | 
DEPENDENT | systemd.service.unitfile_state["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - DISCARD_UNCHANGED_HEARTBEAT:   | 
| Systemd | {#UNIT.NAME}: Active time | Number of seconds since unit entered the active state.  | 
DEPENDENT | systemd.service.uptime["{#UNIT.NAME}"] Preprocessing: - JAVASCRIPT:   | 
| Systemd | {#UNIT.NAME}: Connections accepted per sec | The number of accepted socket connections (NAccepted) per second.  | 
DEPENDENT | systemd.socket.conn_accepted.rate["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - CHANGE_PER_SECOND  | 
| Systemd | {#UNIT.NAME}: Connections connected | The current number of socket connections (NConnections).  | 
DEPENDENT | systemd.socket.conn_count["{#UNIT.NAME}"] Preprocessing: - JSONPATH:   | 
| Zabbix_raw_items | {#UNIT.NAME}: Get unit info | Returns all properties of a systemd service unit. Unit description: {#UNIT.DESCRIPTION}.  | 
ZABBIX_PASSIVE | systemd.unit.get["{#UNIT.NAME}"] | 
| Zabbix_raw_items | {#UNIT.NAME}: Get unit info | Returns all properties of a systemd socket unit. Unit description: {#UNIT.DESCRIPTION}.  | 
ZABBIX_PASSIVE | systemd.unit.get["{#UNIT.NAME}",Socket] | 
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info | 
|---|---|---|---|---|
| {#UNIT.NAME}: Service is not running | -  | 
last(/Systemd by Zabbix agent 2/systemd.service.active_state["{#UNIT.NAME}"])<>1 | 
WARNING | Manual close: YES  | 
| {#UNIT.NAME}: has been restarted (uptime < 10m) | Uptime is less than 10 minutes  | 
last(/Systemd by Zabbix agent 2/systemd.service.uptime["{#UNIT.NAME}"])<10m | 
INFO | Manual close: YES  | 
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/systemd?at=release/5.0
Template APP Systemd by Zabbix agent 2
Overview
For Zabbix version: 5.0 and higher
The template to monitor systemd units.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template APP Systemd by Zabbix agent 2 — collects metrics by polling zabbix-agent2.
This template was tested on:
- Systemd, version 219
 
Setup
See Zabbix template operation for basic instructions.
- Setup and configure zabbix-agent2 compiled with the Systemd monitoring plugin.
 - Set filters with macros if you want to override default filter parameters.
 
Zabbix configuration
No specific Zabbix configuration is required.
Macros used
| Name | Description | Default | 
|---|---|---|
| {$SYSTEMD.ACTIVESTATE.SERVICE.MATCHES} | Filter of systemd service units by active state  | 
active | 
| {$SYSTEMD.ACTIVESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by active state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.MATCHES} | Filter of systemd socket units by active state  | 
active | 
| {$SYSTEMD.ACTIVESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by active state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SERVICE.MATCHES} | Filter of systemd service units by name  | 
.* | 
| {$SYSTEMD.NAME.SERVICE.NOT_MATCHES} | Filter of systemd service units by name  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.NAME.SOCKET.MATCHES} | Filter of systemd socket units by name  | 
.* | 
| {$SYSTEMD.NAME.SOCKET.NOT_MATCHES} | Filter of systemd socket units by name  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.MATCHES} | Filter of systemd service units by unit file state  | 
enabled | 
| {$SYSTEMD.UNITFILESTATE.SERVICE.NOT_MATCHES} | Filter of systemd service units by unit file state  | 
CHANGE_IF_NEEDED | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.MATCHES} | Filter of systemd socket units by unit file state  | 
enabled | 
| {$SYSTEMD.UNITFILESTATE.SOCKET.NOT_MATCHES} | Filter of systemd socket units by unit file state  | 
CHANGE_IF_NEEDED | 
Template links
There are no template links in this template.
Discovery rules
| Name | Description | Type | Key and additional info | 
|---|---|---|---|
| Service units discovery | Discover systemd service units and their details.  | 
ZABBIX_PASSIVE | systemd.unit.discovery[service] Filter: AND- A: {#UNIT.ACTIVESTATE} MATCHES_REGEX  - B: {#UNIT.ACTIVESTATE} NOT_MATCHES_REGEX  - C: {#UNIT.UNITFILESTATE} MATCHES_REGEX  - D: {#UNIT.UNITFILESTATE} NOT_MATCHES_REGEX  - E: {#UNIT.NAME} NOT_MATCHES_REGEX  - F: {#UNIT.NAME} MATCHES_REGEX   | 
| Socket units discovery | Discover systemd socket units and their details.  | 
ZABBIX_PASSIVE | systemd.unit.discovery[socket] Filter: AND- A: {#UNIT.ACTIVESTATE} MATCHES_REGEX  - B: {#UNIT.ACTIVESTATE} NOT_MATCHES_REGEX  - C: {#UNIT.UNITFILESTATE} MATCHES_REGEX  - D: {#UNIT.UNITFILESTATE} NOT_MATCHES_REGEX  - E: {#UNIT.NAME} NOT_MATCHES_REGEX  - F: {#UNIT.NAME} MATCHES_REGEX   | 
Items collected
| Group | Name | Description | Type | Key and additional info | 
|---|---|---|---|---|
| Systemd | {#UNIT.NAME}: Active state | State value that reflects whether the unit is currently active or not. The following states are currently defined: "active", "reloading", "inactive", "failed", "activating", and "deactivating".  | 
DEPENDENT | systemd.service.active_state["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - DISCARD_UNCHANGED_HEARTBEAT:   | 
| Systemd | {#UNIT.NAME}: Load state | State value that reflects whether the configuration file of this unit has been loaded. The following states are currently defined: "loaded", "error", and "masked".  | 
DEPENDENT | systemd.service.load_state["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - DISCARD_UNCHANGED_HEARTBEAT:   | 
| Systemd | {#UNIT.NAME}: Unit file state | Encodes the install state of the unit file of FragmentPath. It currently knows the following states: "enabled", "enabled-runtime", "linked", "linked-runtime", "masked", "masked-runtime", "static", "disabled", and "invalid".  | 
DEPENDENT | systemd.service.unitfile_state["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - DISCARD_UNCHANGED_HEARTBEAT:   | 
| Systemd | {#UNIT.NAME}: Active time | Number of seconds since unit entered the active state.  | 
DEPENDENT | systemd.service.uptime["{#UNIT.NAME}"] Preprocessing: - JAVASCRIPT:   | 
| Systemd | {#UNIT.NAME}: Connections accepted per sec | The number of accepted socket connections (NAccepted) per second.  | 
DEPENDENT | systemd.socket.conn_accepted.rate["{#UNIT.NAME}"] Preprocessing: - JSONPATH:  - CHANGE_PER_SECOND  | 
| Systemd | {#UNIT.NAME}: Connections connected | The current number of socket connections (NConnections).  | 
DEPENDENT | systemd.socket.conn_count["{#UNIT.NAME}"] Preprocessing: - JSONPATH:   | 
| Zabbix_raw_items | {#UNIT.NAME}: Get unit info | Returns all properties of a systemd service unit. Unit description: {#UNIT.DESCRIPTION}.  | 
ZABBIX_PASSIVE | systemd.unit.get["{#UNIT.NAME}"] | 
| Zabbix_raw_items | {#UNIT.NAME}: Get unit info | Returns all properties of a systemd socket unit. Unit description: {#UNIT.DESCRIPTION}.  | 
ZABBIX_PASSIVE | systemd.unit.get["{#UNIT.NAME}",Socket] | 
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info | 
|---|---|---|---|---|
| {#UNIT.NAME}: Service is not running | -  | 
{TEMPLATE_NAME:systemd.service.active_state["{#UNIT.NAME}"].last()}<>1 | 
WARNING | Manual close: YES  | 
| {#UNIT.NAME}: has been restarted (uptime < 10m) | Uptime is less than 10 minutes  | 
{TEMPLATE_NAME:systemd.service.uptime["{#UNIT.NAME}"].last()}<10m | 
INFO | Manual close: YES  | 
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.