Dostupná řešení
Podman by Zabbix agent
Overview
This template is designed for the effortless deployment of Podman monitoring by Zabbix agent and doesn't require any external scripts.
Check the API documentation for details.
Requirements
Zabbix version: 8.0 and higher.
Tested versions
This template has been tested on:
- Podman 5.4.2
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
Run an API service that listens on localhost and custom port
Example:
podman system service --time=0 tcp:127.0.0.1:8080
Note: for convenience, you can configure automatic start of the API service on system startup.
API service security
By default, the API service listens on localhost and is not protected by authentication. All processes executing on the host can access the API service and perform any actions that the user running the API service has permissions for. This can pose a security risk if not properly configured.
Macros used
| Name | Description | Default |
|---|---|---|
| {$PODMAN.PORT} | Port on which the Podman API service is listening. |
8088 |
| {$PODMAN.CONTAINER.FILTER.NAME.MATCHES} | Regex to include containers by name. |
.* |
| {$PODMAN.CONTAINER.FILTER.NAME.NOT_MATCHES} | Regex to exclude containers by name. |
CHANGE_IF_NEEDED |
| {$PODMAN.CONTAINER.FILTER.IMAGE.MATCHES} | Regex to include containers by image. |
.* |
| {$PODMAN.CONTAINER.FILTER.IMAGE.NOT_MATCHES} | Regex to exclude containers by image. |
CHANGE_IF_NEEDED |
| {$PODMAN.CONTAINER.FILTER.STATE.MATCHES} | Regex to include containers by state. |
.* |
| {$PODMAN.CONTAINER.FILTER.STATE.NOT_MATCHES} | Regex to exclude containers by state. |
CHANGE_IF_NEEDED |
| {$PODMAN.CONTAINER.FILTER.POD.MATCHES} | Regex to include containers by pod. |
.* |
| {$PODMAN.CONTAINER.FILTER.POD.NOT_MATCHES} | Regex to exclude containers by pod. |
CHANGE_IF_NEEDED |
| {$PODMAN.IMAGE.FILTER.NAME.MATCHES} | Regex to include images by name. |
.* |
| {$PODMAN.IMAGE.FILTER.NAME.NOT_MATCHES} | Regex to exclude images by name. |
CHANGE_IF_NEEDED |
| {$PODMAN.CONTAINER.NORMAL_STATE} | Normal state of the container. Support context macro with container name, e.g. {$PODMAN.CONTAINER.NORMAL_STATE:"container_name"}. |
1 |
| {$PODMAN.CONTAINER.CPU.HIGH} | CPU usage percentage that is considered high for containers. Support context macro with container name, e.g. {$PODMAN.CONTAINER.CPU.HIGH:"container_name"}. |
80 |
| {$PODMAN.CONTAINER.MEMORY.HIGH} | Memory usage percentage that is considered high for containers. Support context macro with container name, e.g. {$PODMAN.CONTAINER.MEMORY.HIGH:"container_name"}. |
80 |
| {$PODMAN.HOST.CPU.HIGH} | CPU usage percentage that is considered high for the host. |
80 |
| {$PODMAN.HOST.MEMORY.HIGH} | Memory usage percentage that is considered high for the host. |
80 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get data [Containers] | Get data from Podman API (Containers). |
Zabbix agent | web.page.get[http://127.0.0.1:{$PODMAN.PORT}/v6.0.0/libpod/containers/json?all=true] Preprocessing
|
| Get data error | Error message when failing to get data from Podman API. |
Dependent item | podman.get_data.error Preprocessing
|
| Get data [Images] | Get data from Podman API (Images). |
Zabbix agent | web.page.get[http://127.0.0.1:{$PODMAN.PORT}/v6.0.0/libpod/images/json] Preprocessing
|
| Get data [DF] | Get data from Podman API (DF). |
Zabbix agent | web.page.get[http://127.0.0.1:{$PODMAN.PORT}/v6.0.0/libpod/system/df] Preprocessing
|
| Get data [Container stats] | Get data from Podman API (Container stats). |
Zabbix agent | web.page.get[http://127.0.0.1:{$PODMAN.PORT}/v6.0.0/libpod/containers/stats?stream=false] Preprocessing
|
| Get data [Info] | Get data from Podman API (Info). |
Zabbix agent | web.page.get[http://127.0.0.1:{$PODMAN.PORT}/v6.0.0/libpod/info] Preprocessing
|
| Images size | Total size of all images in Podman. |
Dependent item | podman.images.size Preprocessing
|
| Podman API version | Version of the Podman API. |
Dependent item | podman.host.api.version Preprocessing
|
| Podman version | Version of Podman. |
Dependent item | podman.host.version Preprocessing
|
| Podman host OS architecture | OS architecture of the host running Podman. |
Dependent item | podman.host.os.arch Preprocessing
|
| Number of images | Total number of images in Podman. |
Dependent item | podman.images.number Preprocessing
|
| Number of containers | Total number of containers in Podman. |
Dependent item | podman.containers.number Preprocessing
|
| Number of paused containers | Number of paused containers in Podman. |
Dependent item | podman.containers.paused Preprocessing
|
| Number of running containers | Number of running containers in Podman. |
Dependent item | podman.containers.running Preprocessing
|
| Number of stopped containers | Number of stopped containers in Podman. |
Dependent item | podman.containers.stopped Preprocessing
|
| Number of CPU cores | Number of CPU cores on the host running Podman. |
Dependent item | podman.host.cpu.number Preprocessing
|
| Host CPU utilization in user mode | CPU utilization in user mode on the host running Podman. |
Dependent item | podman.host.cpu.util.user Preprocessing
|
| Host CPU utilization in system mode | CPU utilization in system mode on the host running Podman. |
Dependent item | podman.host.cpu.util.system Preprocessing
|
| Host CPU utilization in idle mode | CPU utilization in idle mode on the host running Podman. |
Dependent item | podman.host.cpu.util.idle Preprocessing
|
| Host total memory | Total memory on the host running Podman. |
Dependent item | podman.host.memory.total Preprocessing
|
| Host free memory | Free memory on the host running Podman. |
Dependent item | podman.host.memory.free Preprocessing
|
| Host total swap | Total swap on the host running Podman. |
Dependent item | podman.host.swap.total Preprocessing
|
| Host used memory | Used memory on the host running Podman. |
Dependent item | podman.host.memory.used Preprocessing
|
| Host free swap | Free swap on the host running Podman. |
Dependent item | podman.host.swap.free Preprocessing
|
| Host used swap | Used swap on the host running Podman. |
Dependent item | podman.host.swap.used Preprocessing
|
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| Podman: Get data error | Trigger when there is an error getting data from Podman API |
last(/Podman by Zabbix agent/podman.get_data.error)<>"" |
High | |
| Podman: Has been changed | Trigger when Podman version changes. |
change(/Podman by Zabbix agent/podman.host.version)<>0 |
Info | |
| Podman: Host CPU utilization is high | Trigger when the CPU utilization of the host running Podman is too high. |
min(/Podman by Zabbix agent/podman.host.cpu.util.idle,5m)>(100 - {$PODMAN.HOST.CPU.HIGH}) |
Warning | |
| Podman: Host memory utilization is high | Trigger when the memory utilization of the host running Podman is too high. |
min(/Podman by Zabbix agent/podman.host.memory.free,5m)/ (last(/Podman by Zabbix agent/podman.host.memory.total)+(last(/Podman by Zabbix agent/podman.host.memory.total)=0)) * 100 * (last(/Podman by Zabbix agent/podman.host.memory.total)>0)>{$PODMAN.HOST.MEMORY.HIGH} |
Warning |
LLD rule Containers discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Containers discovery | Discovery of Podman containers. |
Dependent item | podman.containers.discovery Preprocessing
|
Item prototypes for Containers discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Container [{#CONTAINER.NAME}]: Get data | Get data for a specific container. |
Zabbix agent | web.page.get[http://127.0.0.1:{$PODMAN.PORT}/v6.0.0/libpod/containers/{#CONTAINER.NAME}/json] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Get data error | Error message when failing to get data for a specific container. |
Dependent item | podman.container.error[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Created | Creation time of the container. |
Dependent item | podman.container.created[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Status | Current status of the container. |
Dependent item | podman.container.status[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Started | Start time of the container. |
Dependent item | podman.container.started[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Finished | Finish time of the container. |
Dependent item | podman.container.finished[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Checkpointed | Checkpoint time of the container. |
Dependent item | podman.container.checkpointed[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Restored | Restore time of the container. |
Dependent item | podman.container.restored[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Average CPU usage | Average CPU usage of the container. |
Dependent item | podman.container.avgcpu[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Memory usage percentage | Memory usage percentage of the container. |
Dependent item | podman.container.mem_percentage[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Memory usage | Memory usage of the container in bytes. |
Dependent item | podman.container.mem_usage[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Memory limit | Memory limit of the container in bytes. |
Dependent item | podman.container.mem_limit[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Block input | Block input of the container in bytes. |
Dependent item | podman.container.block_input[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Block output | Block output of the container in bytes. |
Dependent item | podman.container.block_output[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Size of root filesystem | Size of the container's root filesystem in bytes. |
Dependent item | podman.container.size_rootfs[{#CONTAINER.ID}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Size of read-write layer | Size of the container's read-write layer in bytes. |
Dependent item | podman.container.size_rw[{#CONTAINER.ID}] Preprocessing
|
Trigger prototypes for Containers discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| Podman: Container [{#CONTAINER.NAME}]: Get data error | Trigger when there is an error getting data for a specific container |
last(/Podman by Zabbix agent/podman.container.error[{#CONTAINER.ID}])<>"" |
High | Depends on:
|
| Podman: Container [{#CONTAINER.NAME}]: Not in normal state | Trigger when the container is not in a normal state (e.g., not running). |
last(/Podman by Zabbix agent/podman.container.status[{#CONTAINER.ID}])<>{$PODMAN.CONTAINER.NORMAL_STATE:"{#CONTAINER.NAME}"} |
Warning | |
| Podman: Container [{#CONTAINER.NAME}]: High CPU usage | Trigger when the average CPU usage of the container is too high. |
min(/Podman by Zabbix agent/podman.container.avgcpu[{#CONTAINER.ID}],5m)>{$PODMAN.CONTAINER.CPU.HIGH:"{#CONTAINER.NAME}"} |
Warning | |
| Podman: Container [{#CONTAINER.NAME}]: High memory usage | Trigger when the memory usage percentage of the container is too high. |
min(/Podman by Zabbix agent/podman.container.mem_percentage[{#CONTAINER.ID}],5m)>{$PODMAN.CONTAINER.MEMORY.HIGH:"{#CONTAINER.NAME}"} |
Warning |
LLD rule Mounts discovery for [{#CONTAINER.NAME}]
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mounts discovery for [{#CONTAINER.NAME}] | Discovery of container mounts. |
Zabbix agent | web.page.get[http://127.0.0.1:{$PODMAN.PORT}/v6.0.0/libpod/containers/{#CONTAINER.NAME}/json?placebo=foo] Preprocessing
|
Item prototypes for Mounts discovery for [{#CONTAINER.NAME}]
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Container [{#CONTAINER.NAME}]: Mount [{#MOUNT.DESTINATION}]: Get data | Get mount data for a specific container. |
Zabbix agent | web.page.get[http://127.0.0.1:{$PODMAN.PORT}/v6.0.0/libpod/containers/{#CONTAINER.NAME}/json?placebo=bar&cruft={#MOUNT.NAME}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Mount [{#MOUNT.DESTINATION}] source | Source of the container mount. |
Dependent item | podman.container.mount.source[{#CONTAINER.ID},{#MOUNT.NAME}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Mount [{#MOUNT.DESTINATION}] mode | Mode of the container mount (read-only or read-write). |
Dependent item | podman.container.mount.mode[{#CONTAINER.ID},{#MOUNT.NAME}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Mount [{#MOUNT.DESTINATION}] read-write | Whether the container mount is read-write (1) or read-only (0). |
Dependent item | podman.container.mount.rw[{#CONTAINER.ID},{#MOUNT.NAME}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Mount [{#MOUNT.DESTINATION}] propagation | Propagation mode of the container mount. |
Dependent item | podman.container.mount.propagation[{#CONTAINER.ID},{#MOUNT.NAME}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Mount [{#MOUNT.DESTINATION}] options | Additional options of the container mount. |
Dependent item | podman.container.mount.options[{#CONTAINER.ID},{#MOUNT.NAME}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Mount [{#MOUNT.DESTINATION}] size | Size of the container mount in bytes. |
Dependent item | podman.container.mount.size[{#CONTAINER.ID},{#MOUNT.NAME}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Mount [{#MOUNT.DESTINATION}] reclaimable size | Size that can be reclaimed of the container mount in bytes. |
Dependent item | podman.container.mount.reclaimable_size[{#CONTAINER.ID},{#MOUNT.NAME}] Preprocessing
|
LLD rule Networks discovery for [{#CONTAINER.NAME}]
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Networks discovery for [{#CONTAINER.NAME}] | Discovery of container networks. |
Dependent item | podman.containers.networks.discovery[{#CONTAINER.ID}] Preprocessing
|
Item prototypes for Networks discovery for [{#CONTAINER.NAME}]
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] received bytes | Total bytes received on the network interface of the container. |
Dependent item | podman.container.network.rx_bytes[{#CONTAINER.ID},{#NETWORK.INTERFACE}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] transmitted bytes | Total bytes transmitted on the network interface of the container. |
Dependent item | podman.container.network.tx_bytes[{#CONTAINER.ID},{#NETWORK.INTERFACE}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] input rate | Average bits received per second on the network interface of the container. |
Dependent item | podman.container.network.rx_rates[{#CONTAINER.ID},{#NETWORK.INTERFACE}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] output rate | Average bits transmitted per second on the network interface of the container. |
Dependent item | podman.container.network.tx_rates[{#CONTAINER.ID},{#NETWORK.INTERFACE}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] input packets rate | Average packets received per second on the network interface of the container. |
Dependent item | podman.container.network.packets_rx_rates[{#CONTAINER.ID},{#NETWORK.INTERFACE}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] output packets rate | Average packets transmitted per second on the network interface of the container. |
Dependent item | podman.container.network.packets_tx_rates[{#CONTAINER.ID},{#NETWORK.INTERFACE}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] receive errors | Count of receive errors on the network interface of the container. |
Dependent item | podman.container.network.errors_rx[{#CONTAINER.ID},{#NETWORK.INTERFACE}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] transmit errors | Count of transmit errors on the network interface of the container. |
Dependent item | podman.container.network.errors_tx[{#CONTAINER.ID},{#NETWORK.INTERFACE}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] receive dropped packets | Count of dropped packets on the network interface of the container. |
Dependent item | podman.container.network.dropped_rx[{#CONTAINER.ID},{#NETWORK.INTERFACE}] Preprocessing
|
| Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] transmit dropped packets | Count of dropped packets on the network interface of the container. |
Dependent item | podman.container.network.dropped_tx[{#CONTAINER.ID},{#NETWORK.INTERFACE}] Preprocessing
|
Trigger prototypes for Networks discovery for [{#CONTAINER.NAME}]
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| Podman: Container [{#CONTAINER.NAME}]: Interface [{#NETWORK.INTERFACE}] errors | Trigger when count of errors on the network interface of the container is changing. |
change(/Podman by Zabbix agent/podman.container.network.errors_tx[{#CONTAINER.ID},{#NETWORK.INTERFACE}])>0 or change(/Podman by Zabbix agent/podman.container.network.errors_rx[{#CONTAINER.ID},{#NETWORK.INTERFACE}])>0 |
Warning |
LLD rule Images discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Images discovery | Discovery of Podman images. |
Dependent item | podman.images.discovery |
Item prototypes for Images discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Image [{#IMAGE.NAME}]: Creation time | Creation time of the image in Unix timestamp format. |
Dependent item | podman.image.created[{#IMAGE.ID}] Preprocessing
|
| Image [{#IMAGE.NAME}]: Size | Size of the image in bytes. |
Dependent item | podman.image.size[{#IMAGE.ID}] Preprocessing
|
| Image [{#IMAGE.NAME}]: Shared size | Shared size of the image in bytes. |
Dependent item | podman.image.shared_size[{#IMAGE.ID}] Preprocessing
|
| Image [{#IMAGE.NAME}]: Virtual size | Virtual size of the image in bytes. |
Dependent item | podman.image.virtual_size[{#IMAGE.ID}] Preprocessing
|
| Image [{#IMAGE.NAME}]: Containers count | Number of containers using the image. |
Dependent item | podman.image.containers[{#IMAGE.ID}] Preprocessing
|
| Image [{#IMAGE.NAME}]: Architecture | Architecture of the image. |
Dependent item | podman.image.architecture[{#IMAGE.ID}] Preprocessing
|
| Image [{#IMAGE.NAME}]: Operating system | Operating system of the image. |
Dependent item | podman.image.os[{#IMAGE.ID}] Preprocessing
|
| Image [{#IMAGE.NAME}]: Unique size | Unique size of the image in bytes. |
Dependent item | podman.image.unique_size[{#IMAGE.ID}] Preprocessing
|
Trigger prototypes for Images discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| Podman: Image [{#IMAGE.NAME}]: Unused | Trigger when the image is not used by any container. |
last(/Podman by Zabbix agent/podman.image.containers[{#IMAGE.ID}])=0 |
Info |
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