Documentation: Poller service and Crontab

Hello

The documentation for poller-service Redirecting... is:

Cron Scripts

Once the poller service is installed, the cron scripts used by LibreNMS are no longer required and must be removed.

The current crontab is https://github.com/librenms/librenms/blob/master/librenms.nonroot.cron

# Using this cron file requires an additional user on your system, please see install docs.
33 */6 * * * librenms /opt/librenms/cronic /opt/librenms/discovery-wrapper.py 1
*/5 * * * * librenms /opt/librenms/discovery.php -h new >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16
* * * * * librenms /opt/librenms/alerts.php >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/poll-billing.php >> /dev/null 2>&1
01 * * * * librenms /opt/librenms/billing-calculate.php >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/check-services.php >> /dev/null 2>&1

# Daily maintenance script. DO NOT DISABLE!
# If you want to modify updates:
# Switch to monthly stable release: https://docs.librenms.org/General/Releases/
# Disable updates: https://docs.librenms.org/General/Updating/
15 0 * * * librenms /opt/librenms/daily.sh >> /dev/null 2>&1

Should we really disable the 7 first jobs AND the daily.sh ?
Or only some of them ?

If someone can give a clear reply, I will send a merge request to update the documentation.

1 Like

Only the poller

As I understand, only the line calling: /opt/librenms/cronic /opt/librenms/poller-wrapper.py ?

Yes Correct

You should disable all cron entries as the docs describe.
The “LibreNMS” service replaces all cron scheduling and does scheduling itself. (If you are using the legacy “poller” service, it only replaces polling)

@murrant including daily?

Yep, it runs daily too.

1 Like

does anyone know of a way to make sure the ./daily.sh maintenance/update script is run within a specific timeframe/window?
The config.php for the poller service only lists how often to run updates (every 84600 seconds), not at what time. So, if the service is restarted unexpectedly, the poller will then continue to update/restart every day at that time until it’s restarted manually during the correct timeframe.

Delete it in

$config['service_update_frequency'] = 86400; # Seconds between LibreNMS update checks

and add it in cron at the time frame you whant

maybe an option

i dont know yet of timeframe in the dispatch service (maybe some1 can script it in and get an PR)

1 Like

FYI to anyone interested, I ended up disabling 'service_update_frequency' on the polling service, and re-enabled the cron ./daily.sh script, and it seems to work fine