diff --git a/plugins/node.d.linux/apt_all b/plugins/node.d.linux/apt_all index 1ba5d943cb..0a98ed684b 100755 --- a/plugins/node.d.linux/apt_all +++ b/plugins/node.d.linux/apt_all @@ -34,25 +34,26 @@ your /etc/apt.conf defaults. =head1 USAGE -This plugin needs a cronjob that runs apt-get update every hour or so +The plugin depends on a periodic update of apt's package cache. -Example cronjob +This can be accomplished by using systemd's timer for periodic updates or via +apt's compatibility helper (/etc/cron.daily/apt-compat). - /etc/cron.d/munin-plugin-apt - 53 * * * * root apt-get update > /dev/null 2>&1 - 23 08 * * * root apt-get update > /dev/null +The relevant apt configuration setting for daily updates is: + + APT::Periodic::Update-Package-Lists "1"; + +(the numeric value defines the number of days between updates) -Remember to randomize when these cronjobs are run on your servers -This plugin can also be called with the argument "update", which will -run apt-get update +Alternatively you can also configure a simple cron job for updating the cache +more frequently: + + /etc/cron.d/munin-plugin-apt + 53 * * * * root perl -e 'sleep(3600);' && apt-get update >/dev/null 2>&1 - update +Remember to randomize the starting hour for this cron job on your servers. - Updates the APT database randomly, guaranteeing there - won't be more than seconds between each - update. Otherwise, there is a a 1 in - chance that an update will occur. =head1 MAGIC MARKERS