jarischaefer / docker-librenms

Docker image for LibreNMS
MIT License
115 stars 37 forks source link

How to enable Fast Ping Checking? #110

Closed x-Felix closed 4 years ago

x-Felix commented 4 years ago

I saw https://docs.librenms.org/Extensions/Fast-Ping-Check/ talking about how to enable fast ping checking for device UP/Down status. I want to modify my librenms docker instance PING check every 1 min instead of 5. Not sure where to modify the config.php file. I can see the mapped docker volume only has a config.custom.php. Also no idea how to run script to update the change. Maybe thru docker exec cli? ./scripts/rrdstep.php -h all And the last how to modify the cron job of PING. I only see POLLERS_CRON, SNMP_SCAN_CRON and WEATHERMAP_CRON features in the readme.md.

Ideally I just want to enable fast ping check for one specific device not a global change. Not sure if this can be archived. Thanks.

jarischaefer commented 4 years ago

Not sure where to modify the config.php file. I can see the mapped docker volume only has a config.custom.php

You may use config.custom.php, which overrides any options set in config.php. Simply add $config['ping_rrd_step'] = 60; to your config.custom.php.

Also no idea how to run script to update the change. Maybe thru docker exec cli?

Yes, something like docker exec -u librenms librenms /opt/librenms/scripts/rrdstep.php -h all might work.

And the last how to modify the cron job of PING.

You may mount your own cron file with the following content: * * * * * librenms /opt/librenms/ping.php >> /dev/null 2>&1 Mount it like the config.custom.php, but place the cron file in /etc/cron.d. Make sure it is owned by root, has permissions 644 and contains a newline at the end.

Ideally I just want to enable fast ping check for one specific device not a global change. Not sure if this can be archived.

I do not know, perhaps someone on the LibreNMS forums could help you with that.

x-Felix commented 4 years ago

@jarischaefer Thanks for the detail instruction. I've made the change to it. But need some time to verify the outcome. Right now some devices poller (ping response) graph is not properly displayed after the change. Only see couple dots there, not the full graph. Not sure it is because different scale (5 min to 1 min) of the ping data.

x-Felix commented 4 years ago

I confirm it works fine as expected. Thanks a lot for the instruction.