poller.php is Observium's main poller script. It performs all of the tasks involved in collecting data from monitored devices and storing it in RRD and in the database.
poller.php should usually be executed automatically by
poller-wrapper.py, but can be run manually for various reasons, including debugging.
Running poller.php from cron
On old installations
poller.php may be run directly by cron. This is deprecated and should be replaced with
poller.php [-drqV] [-i instances] [-n number] [-m module] [-h device]
||Poll a single device by device_id|
||Poll devices matching the hostname wildcard|
||Poll all odd numbered devices|
||Poll all even numbered devices|
||Poll all devices|
||Poll all new devices which have never been polled|
||Poll as instance
||Show globally enabled/disabled modules and exit|
||Show version and exit|
||Do not create or update RRDs. This is useful during debugging and development to not pollute RRDs|
||Enable debugging output|
||More verbose debugging output|
||Specify poller module(s) (separated by commas) to be run|
poller-wrapper.py is Observium's multi-threaded poller control process. It launches and monitors individual
poller.php processes for each monitored device and optionally also launches
alerter.php for each device to generate notifications from alert conditions.
As documented in our install guides, the correct way to run the Observium poller is by executing
poller-wrapper.py automatically via cron every 5 minutes. It is now no longer required to specify the number of threads as a commandline option, as this can now be configured in the web UI or in
*/5 * * * * root python /opt/observium/observium-wrapper poller >> /dev/null 2>&1
By default the poller-wrapper will execute twice as many threads as your system has CPUs. This is a good default for many systems, but can easily be fine-tuned by changing the corresponding setting.
The poller-wrapper will try to prevent runaway high load sitations by refusing to run too many times if the system's load average reaches a certain point. By default this limit is 5 processes for systems with a load average above 10. These settings can be changed in the UI and in
Poller Wrapper Performance
To try to reduce load spikes and I/O and MySQL congestion and to ensure consistent load on the Observium server you should aim for the poller-wrapper process to take as close as possible to 300 seconds to complete.
There are a number of options which can be configured either in
config.php or in the Web UI.
Most manual usage of the poller script will be for debugging or development purposes. For example, to check if a device is returning any useful data to a particular poller module.
For example, to debug the
storage module on the device
storage-server.company.com you could use this :
./poller.php -h storage-server.company.com -m storage -dd
You can run multiple modules using the
-m option, this is useful when debugging unix-agent and application modules, which require both to be run :
./poller.php -h srv01.company.com -m unix-agent,applications -dd