Hi,
when I try to configure:
$config[‘poller_service_poll_frequency’] = 60;
after restart (via systemctl restart librenms-poller-service.service ) in librenms.log still see 120sec interval.
How to reduce polling time to 60 sec?
====================================
Component
Version
LibreNMS
1.39-6-g4140796
DB Schema
249
PHP
7.0.28-0ubuntu0.16.04.1
MySQL
5.7.21-20-log
RRDTool
1.5.5
SNMP
NET-SNMP 5.7.3
====================================
[OK] Composer Version: 1.6.4
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
$config[‘distributed_poller_name’] = file_get_contents(’/etc/hostname’);
$config[‘distributed_poller_group’] = 1;
$config[‘poller_service_loglevel’] = “INFO”;
$config[‘poller_service_workers’] = 4;
$config[‘poller_service_poll_frequency’] = 60;
$config[‘poller_service_discover_frequency’] = 21600;
$config[‘poller_service_down_retry’] = 60;
$config[‘poller_service_retry_query’] = 1;
$config[‘poller_service_single_connection’] = false;
$config[‘poller_modules’][‘unix-agent’] = 1;
It’s in the cronjob you need to change it, follow this:
source: Support/1-Minute-Polling.md
### Information
We now have support for polling data at intervals to fit your needs.
> Please be aware of the following:
- You must also change your cron entry for `poller-wrapper.py` for this to work (if you change from the default 300 seconds).
- Your polling _MUST_ complete in the time you configure for the heartbeat step value. See `/pollers/tab=pollers/` in your WebUI for your current value.
- This will only affect RRD files created from the moment you change your settings.
- This change will affect all data storage mechanisms such as MySQL, RRD and InfluxDB. If you decrease the values then please be aware of the increase in space use for MySQL and InfluxDB.
- It's **highly recommended** to configure some [performance optimizations](Performance.md). Keep in mind that all your devices will write all graphs every minute to the disk and that every device has many graphs. The most important thing is probably the [RRDCached](../Extensions/RRDCached.md) configuration that can save a lot of write IOPS.
To make the changes, please navigate to `/settings/sub=external/` within your WebUI. Select RRDTool Setup and then update the two values for step and heartbeat intervals:
- Step is how often you want to insert data, so if you change to 1 minute polling then this should be 60.
- Heartbeat is how long to wait for data before registering a null value, i.e 120 seconds.
### Converting existing RRD files
This file has been truncated. show original
1 Like
I dont’t use a cron (only daily.sh and alerts are cron). We build this scenario:
source: Extensions/Poller-Service.md
# Poller Service
# WARNING: THIS IS HIGHLY EXPERIMENTAL AND MAY NOT WORK
The Poller service is an alternative to polling and discovery cron jobs and provides support for distributed polling without memcache. It is multi-threaded and runs continuously discovering and polling devices with the oldest data attempting to honor the polling frequency configured in `config.php`. This service replaces all the required cron jobs except for `/opt/librenms/daily.sh` and `/opt/librenms/alerts.php`.
Configure the maximum number of threads for the service in `$config['poller_service_workers']`. Configure the minimum desired polling frequency in `$config['poller_service_poll_frequency']` and the minimum desired discovery frequency in `$config['poller_service_discover_frequency']`. The service will not poll or discover devices which have data newer than this this configured age in seconds. Configure how frequently the service will attempt to poll devices which are down in `$config['poller_service_down_retry']`. If you have enough pollers that the worker threads run out of work, the service will query looking for devices every `$config['poller_service_retry_query']` seconds.
The poller service is designed to gracefully degrade. If not all devices can be polled within the configured frequency, the service will continuously poll devices refreshing as frequently as possible using the configured number of threads.
The service logs to syslog. A loglevel of INFO will print status updates every 5 minutes. Loglevel of DEBUG will print updates on every device as it is scanned.
## Configuration
```php
// Poller-Service settings
$config['poller_service_loglevel'] = "INFO";
$config['poller_service_workers'] = 16;
$config['poller_service_poll_frequency'] = 300;
$config['poller_service_discover_frequency'] = 21600;
This file has been truncated. show original
so my crons look’s like this:
#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
15 0 * * * librenms /opt/librenms/daily.sh >> /dev/null 2>&1
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
The poller service is Experimental and not recommend to use especially if you are trying to pull all of your devices in 60 seconds.
https://docs.librenms.org/#Extensions/Poller-Service/