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
Poller Service #1405
Poller Service #1405
Conversation
Auto-Deploy finished, Test PR at http://1405.ci.librenms.org or https://1405.ci.librenms.org |
Auto-Deploy finished, Test PR at http://1405.ci.librenms.org or https://1405.ci.librenms.org |
Auto-Deploy finished, Test PR at http://1405.ci.librenms.org or https://1405.ci.librenms.org |
Auto-Deploy finished, Test PR at http://1405.ci.librenms.org or https://1405.ci.librenms.org |
Auto-Deploy finished, Test PR at http://1405.ci.librenms.org or https://1405.ci.librenms.org |
Auto-Deploy finished, Test PR at http://1405.ci.librenms.org or https://1405.ci.librenms.org |
Auto-Deploy finished, Test PR at http://1405.ci.librenms.org or https://1405.ci.librenms.org |
Scrutinizer is reporting some unused code: https://scrutinizer-ci.com/g/librenms/librenms/inspections/c2435766-5805-4b20-8c07-cee10254fad6/issues/ |
@clinta keen to get this moving forward. Do you need the |
@spinza AFAIk he has already resolved the conflict and removed the issues scrutinizer complained about. However due to an issue with GH's fork-network it hasnt yet showed up here. We're working together with GH in resolving the fork-network issue so everything can go on as usual again. |
Yes I had to redo my local repo to do a pull request. |
Yup, these are all fixed. I considered deleting my fork and re-creating it, I'm just not sure if the PR comments will be preserved if I do that. |
@clinta if you choose to do that, please mention this PR in your new one so we got a 'glue' :) |
Replaced with #1561 |
This is a re-write of poller-wrapper.py, designed to run as a continuous service rather than a cron job. It works on a best effort basis, using the configured number of threads to poll devices with the oldest data first polling each device no more requently than the user configured poller_service_poll_frequency (default 5 minutes).
It utilizes mysql GET_LOCK to ensure that a device is only being polled by one poller at a time allowing distributed polling without memcached.
Configuration parameters are described in doc/Extensions/Poller-Service.md.
I'm currently testing this in an environment with just over 200 devices, and two pollers configured to attempt to poll each device every 60 seconds with up to 32 threads, retrying down devices every 15 seconds.
I plan to continue testing and monitoring the service over the next week and am opening this PR to request comments or feedback from anyone else willing to test.
If you would like to test this, add a new remote and checkout the poller-service branch.
cd /opt/librenms git remote add clinta https://github.com/clinta/librenms.git git remote update clinta git checkout poller-service
The default configuration is listed below and can be adjusted in config.php. A more detailed description of the configuration options is in doc/Extensions/Poller-Service.md.
If you are using Ubuntu, or another distribution that uses Upstart, copy
/opt/librenms/poller-service.conf
to/etc/init/poller-service.conf
and runstart poller-service
to start the service.