This project provides a simple way to monitor available Debian/Ubuntu package updates (including security updates) with Zabbix 7.2. It installs the required configuration files for the Zabbix Agent2 and apt periodic jobs, and provides a ready-to-use Zabbix template.
Run the following command on your Debian/Ubuntu host:
wget https://raw.githubusercontent.com/pthoelken/apt-zabbix-monitoring/refs/heads/main/install.sh -O install_apt_zabbix_monitoring.sh ; bash install_apt_zabbix_monitoring.sh ;The script will:
- Check if gitis installed β if not, it installs it silently.
- Clone this repository into /tmp.
- Copy:
- zabbix_agentd.d/apt-updates.confβ- /etc/zabbix/zabbix_agent2.d/apt-updates.conf
- apt.conf.d/02periodicβ- /etc/apt/apt.conf.d/02periodic
 
- Restart the Zabbix Agent2 service and verify that it is running.
- Clean up all temporary files.
All operations are logged in the format:
SUCCESS | YYYY-MM-DD HH:MM:SS | message
ERROR   | YYYY-MM-DD HH:MM:SS | message
with green/red color highlighting.
After installation, you must import the template:
- Go to Configuration β Templates in Zabbix 7.2.
- Click Import.
- Select the file templates/zbx_export_templates_7.X.xml.
- Attach the template to your host(s).
- Automatic detection of available Debian/Ubuntu updates
- Differentiation between security updates and non-security updates
- Ready-to-use template for Zabbix 7.2 and LTS 7.0
- Minimal system overhead (lightweight Bash + apt commands)
- Debian/Ubuntu with apt-get
- Zabbix Agent2 installed and running
- Zabbix Server 7.2+
βββ install.sh                   # Installation script
βββ zabbix_agentd.d/apt-updates.conf
βββ apt.conf.d/02periodic
βββ templates/
    βββ zbx_export_templates.xml
Once the template is attached to your host, Zabbix will start collecting:
- Number of available security updates
- Number of available non-security updates
- Combined update statistics
You can then build triggers, graphs, or dashboards on top of this data.
Example item key used in the template:
apt.updates
Update interval can be adjusted as needed (default: every 900s = 15 minutes).
To remove the integration, simply delete:
- /etc/zabbix/zabbix_agent2.d/apt-updates.conf
- /etc/apt/apt.conf.d/02periodic
and remove the template from Zabbix.