librenms / docker

LibreNMS Docker image
MIT License
691 stars 278 forks source link

1 Minute Polling #211

Open Valdri opened 3 years ago

Valdri commented 3 years ago

How do I change cron entry for poller-wrapper.py in docker install?

kajset commented 3 years ago

I would like to chime in as well, we would like to also use Fast Ping on our LibreNMS setup, we run the Docker image on 21.6.0. Currently I have got it working in a test environment by following the documentation: LibreNMS - Fast up/down checking

  1. Stop the RRDCached container
  2. Add PHP config <?php $config['ping_rrd_step'] = 60; to ./librenms/config/fastping.php
  3. Run ./scripts/rrdstep.php -h all from within the LibreNMS container
  4. Add the line * * * * * librenms /opt/librenms/ping.php >> /dev/null 2>&1 to /opt/librenms/librenms.nonroot.cron

This works in our testing environment, though modifying the files within the LibreNMS container isn't persistent. @crazy-max how would we go about configuring the cron entries in a persistent way?

Preferrably we would be able to access the cron files through the ./librenms:/data volume mapping?

If there is any way I could help please let me know.

hugalafutro commented 2 years ago

I am the great Post Necromancer and I been running 1min polling that survives container updates; without editing any files in docker or outside of it; for about a year now like so:

Go to http://[your librenms]/poller/settings Click the Advanced Toggle in upper right to see all options

Mine looks like this (note the changed values not pertaining to workers): image

Go to http://[your librenms]/settings/poller/rrdtool

Mine looks like this (note I have rrdcached disabled, YMMV): image

On machine where librenms runs go to terminal and run docker exec -it librenms bash, in the new bash prompt that comes up run ./scripts/rrdstep.php -h all and let it finish (will take some time), then type exit. You only need to do this once (or more precisely every time you change the interval).

Olen commented 2 years ago

It would be nice if the last step was run automatically when the interval is changed. Also, you might need to restart the dispatcher container if you rune that. Other than that, it works fine.