Zabbix template for monitoring APT package updates.
This template uses -s
simulation option when invoking apt-get
, so no root access is needed for Zabbix user during polling.
- Create a
cron
entry (see below) - Copy
zabbix_agentd.d/apt.conf
to the Zabbix agent's configuration directory (usually located in/etc/zabbix
). - Import
templates/apt-updates.xml
to Zabbix frontend.
Use a dedicated cron entry like the following for the zabbix
user (every 8 hours):
0 8,16 * * * apt-get -s upgrade > /tmp/apt.log
With the old method the request was very likely to timeout. I Also added an item key to show the list of upgradeable pakets.
I also added an item with the list of packets to be upgraded. You can reach it also from the trigger values when a problem occurs.