See www.zabbix.com for the official Zabbix site.

Docs/howto/sytemupdate monitoring

From Zabbix.org
Jump to: navigation, search

Debian

UserParameter=debiansecurityupdates,/usr/lib/update-notifier/apt-check --human-readable|grep "security update"|cut -d " " -f1

See http://lab4.org/wiki/Zabbix_linux_securityupdates_monitoren

Alternate Debian Method

This method requires no extra packages other than what the base system provides. It shows a count of all packages that need to be updated, not just security updates. The second command returns a list of all the updated packages. You need to be running apt-get update via cron to make sure the system is checking for new packages on a regular basis.

UserParameter=system.sw.debianupdates,apt-get dist-upgrade -s  |sed -n 's/^\([0-9]\+\) upgraded.*/\1/p'
UserParameter=system.sw.debianupdates-list,apt-get dist-upgrade -s  |sed -n 's/^Inst \(.*\) (.*/\1,/p' | tr '\n' ' '

ArchLinux

UserParameter=archlinuxupdates,if [ -d /tmp/pacmandb ]; then fakeroot pacman -Syup --dbpath /tmp/pacmandb | grep "pkg.tar.xz" -c; else mkdir /tmp/pacmandb && ln -s /var/lib/pacman/local /tmp/pacmandb && fakeroot pacman -Syup --dbpath /tmp/pacmandb | grep "pkg.tar.xz" -c; fi