Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apt_all: remove reference to "update" argument for cron job #1394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions plugins/node.d.linux/apt_all
Original file line number Diff line number Diff line change
Expand Up @@ -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 <maxinterval> <probability>
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 <maxinterval> seconds between each
update. Otherwise, there is a a 1 in <probability>
chance that an update will occur.

=head1 MAGIC MARKERS

Expand Down