The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ
Browse Source

Initial version

master
Gergely Polonkai 6 years ago
commit
3053907d1b
  1. 3
      apt-config
  2. 1
      cronjob
  3. 19
      zabbix_check_updates

3
apt-config

@ -0,0 +1,3 @@
DPkg {
Post-Invoke{"/usr/bin/zabbix_check_updates";};
};

1
cronjob

@ -0,0 +1 @@
30 16 * * * root /usr/bin/zabbix_check_updates &> /dev/null

19
zabbix_check_updates

@ -0,0 +1,19 @@
#! /bin/sh
/usr/bin/apt-get -qq update 2> /dev/null
security_update_count=`/usr/bin/aptitude \
-o Dir::Etc::sourcelist="/etc/apt/sources.list.d/security.sources.list" \
-o "Dir::Etc::sourceparts=/etc/apt/sources.list.d/security.sources.list" \
search '~U' \
| wc -l`
update_count=`/usr/bin/aptitude search '~U' | wc -l`
/usr/bin/zabbix_sender -c /etc/zabbix/zabbix_agentd.conf \
-k 'linupdates[total]' \
-o "$update_count"
/usr/bin/zabbix_sender -c /etc/zabbix/zabbix_agentd.conf \
-k 'linupdates[security]' \
-o "$security_update_count"
exit 0
Loading…
Cancel
Save