Following on from the zabbix status script, I have put togethor another script to list any unsupported items on agents.

For an item to go unsupported, it usually means something is wrong with the agent, so I add this script to /etc/cron.hourly.

The SQL query to get the list of unsupported items is,

SELECT
hosts.host AS hostname,
items.description AS item,
items.key_ AS "key"
FROM
items
RIGHT JOIN
hosts ON items.hostid=hosts.hostid
WHERE
items.status = 3;

Download

  zabbix-unsupported-status.sh (1.3 KiB, 76 hits)

A backup failed so I disabled the host, but the status page still listed the failure.

To delete this entry:

Stop backuppc [ /etc/init.d/backuppc stop ]
Search /var/lib/backuppc/log/status.pl for the failed host and delete the entry.
Restart backuppc [ /etc/init.d/backuppc start ]

If you upgrade Perl to 5.13.5 or beyond, backuppc will begin to spew this warning at every oppurtunity. Debian/wheezy currently has these warnings on startup and in backuppc logs.

Debian bug #650522 suggests surrounding each use of qw(…) with rounded parenthesis: (qw(…)). There are a lot these used throughout backuppc, so I took a slightly less ingenious but just as effective route.

By adding: “no warnings 'deprecated';” to the beginning of each file that uses qw(…), the warnings are suppressed. This change can be scripted by using the following one-liner:

grep -ril 'qw(' /usr/share/backuppc/lib/BackupPC/|while read file; do sed -i "1i no warnings 'deprecated';" $file; done

The location /usr/share/backuppc/lib/BackupPC/ is used on Debian/wheezy and may need adjusting for other distros.