{"action":"created","issue":{"url":"https://api.github.com/repos/librenms/librenms/issues/1405","labels_url":"https://api.github.com/repos/librenms/librenms/issues/1405/labels{/name}","comments_url":"https://api.github.com/repos/librenms/librenms/issues/1405/comments","events_url":"https://api.github.com/repos/librenms/librenms/issues/1405/events","html_url":"https://github.com/librenms/librenms/pull/1405","id":93598725,"number":1405,"title":"Poller Service","user":{"login":"clinta","id":3177437,"avatar_url":"https://avatars.githubusercontent.com/u/3177437?v=3","gravatar_id":"","url":"https://api.github.com/users/clinta","html_url":"https://github.com/clinta","followers_url":"https://api.github.com/users/clinta/followers","following_url":"https://api.github.com/users/clinta/following{/other_user}","gists_url":"https://api.github.com/users/clinta/gists{/gist_id}","starred_url":"https://api.github.com/users/clinta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clinta/subscriptions","organizations_url":"https://api.github.com/users/clinta/orgs","repos_url":"https://api.github.com/users/clinta/repos","events_url":"https://api.github.com/users/clinta/events{/privacy}","received_events_url":"https://api.github.com/users/clinta/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/librenms/librenms/labels/Polling","name":"Polling","color":"99FF99"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-07-07T18:35:39Z","updated_at":"2015-07-15T12:15:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/librenms/librenms/pulls/1405","html_url":"https://github.com/librenms/librenms/pull/1405","diff_url":"https://github.com/librenms/librenms/pull/1405.diff","patch_url":"https://github.com/librenms/librenms/pull/1405.patch"},"body":"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).\r\n\r\nIt utilizes mysql [GET_LOCK](https://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_get-lock) to ensure that a device is only being polled by one poller at a time allowing distributed polling without memcached.\r\n\r\nConfiguration parameters are described in [doc/Extensions/Poller-Service.md](https://github.com/clinta/librenms/blob/poller-service/doc/Extensions/Poller-Service.md).\r\n\r\nI'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.\r\n\r\nI 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.\r\n\r\nIf you would like to test this, add a new remote and checkout the poller-service branch.\r\n\r\n```bash\r\ncd /opt/librenms\r\ngit remote add clinta https://github.com/clinta/librenms.git\r\ngit remote update clinta\r\ngit checkout poller-service\r\n```\r\n\r\nThe 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](https://github.com/clinta/librenms/blob/poller-service/doc/Extensions/Poller-Service.md).\r\n\r\n```php\r\n// Poller-Service settings\r\n$config['poller_service_loglevel']                       = \"INFO\";\r\n$config['poller_service_workers']                        = 16;\r\n$config['poller_service_poll_frequency']                 = 300;\r\n$config['poller_service_discover_frequency']             = 21600;\r\n$config['poller_service_down_retry']                     = 60;\r\n```\r\n\r\nIf you are using Ubuntu, or another distribution that uses Upstart, copy `/opt/librenms/poller-service.conf` to `/etc/init/poller-service.conf` and run `start poller-service` to start the service."},"comment":{"url":"https://api.github.com/repos/librenms/librenms/issues/comments/121598723","html_url":"https://github.com/librenms/librenms/pull/1405#issuecomment-121598723","issue_url":"https://api.github.com/repos/librenms/librenms/issues/1405","id":121598723,"user":{"login":"LibreNMS-CI","id":12872343,"avatar_url":"https://avatars.githubusercontent.com/u/12872343?v=3","gravatar_id":"","url":"https://api.github.com/users/LibreNMS-CI","html_url":"https://github.com/LibreNMS-CI","followers_url":"https://api.github.com/users/LibreNMS-CI/followers","following_url":"https://api.github.com/users/LibreNMS-CI/following{/other_user}","gists_url":"https://api.github.com/users/LibreNMS-CI/gists{/gist_id}","starred_url":"https://api.github.com/users/LibreNMS-CI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LibreNMS-CI/subscriptions","organizations_url":"https://api.github.com/users/LibreNMS-CI/orgs","repos_url":"https://api.github.com/users/LibreNMS-CI/repos","events_url":"https://api.github.com/users/LibreNMS-CI/events{/privacy}","received_events_url":"https://api.github.com/users/LibreNMS-CI/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T12:15:09Z","updated_at":"2015-07-15T12:15:09Z","body":"Auto-Deploy finished, Test PR at http://1405.ci.librenms.org or https://1405.ci.librenms.org \n"}}