Files
librenms-librenms/doc/Support/Poller Support.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

243 lines
8.3 KiB
Markdown
Raw Normal View History

# poller.php
This document will explain how to use poller.php to debug issues or
manually running to process data.
## Command options
```bash
LibreNMS 2014.master Poller
-h <device id> | <device hostname wildcard> Poll single device
-h odd Poll odd numbered devices (same as -i 2 -n 0)
-h even Poll even numbered devices (same as -i 2 -n 1)
-h all Poll all devices
-i <instances> -n <number> Poll as instance <number> of <instances>
Instances start at 0. 0-3 for -n 4
Debugging and testing options:
-r Do not create or update RRDs
-f Do not insert data into InfluxDB
-d Enable debugging output
-v Enable verbose debugging output
-m Specify module(s) to be run. Comma separate modules, submodules may be added with /
```
`-h` Use this to specify a device via either id or hostname (including
wildcard using *). You can also specify odd and even. all will run
poller against all devices.
`-i` This can be used to stagger the poller process.
`-r` This option will suppress the creation or update of RRD files.
`-d` Enables debugging output (verbose output but with most sensitive
data masked) so that you can see what is happening during a poller
run. This includes things like rrd updates, SQL queries and response
from snmp.
`-v` Enables verbose debugging output with all data in tact.
`-m` This enables you to specify the module you want to run for poller.
## Poller Wrapper
We have a `poller-wrapper.py` script by [Job
Snijders](https://github.com/job). This script is currently the
default.
If you need to debug the output of poller-wrapper.py then you can add
`-d` to the end of the command - it is NOT recommended to do this in
cron.
## Poller config
These are the default poller config items. You can globally disable a
module by setting it to 0. If you just want to
disable it for one device then you can do this within the WebUI Device
-> Edit -> Modules.
```php
$config['poller_modules']['unix-agent'] = false;
$config['poller_modules']['os'] = true;
$config['poller_modules']['ipmi'] = true;
$config['poller_modules']['sensors'] = true;
$config['poller_modules']['processors'] = true;
$config['poller_modules']['mempools'] = true;
$config['poller_modules']['storage'] = true;
$config['poller_modules']['netstats'] = true;
$config['poller_modules']['hr-mib'] = true;
$config['poller_modules']['ucd-mib'] = true;
$config['poller_modules']['ipSystemStats'] = true;
$config['poller_modules']['ports'] = true;
2019-01-19 20:08:10 +01:00
$config['poller_modules']['nac'] = false;
$config['poller_modules']['bgp-peers'] = true;
$config['poller_modules']['junose-atm-vp'] = false;
Migrate xDSL code to module, and add support for VDSL2 MIB (#14207) * use component to discover if xDSL polling is needed use component to discover if xDSL polling is needed * Components OK, Polling in correct files, no DB for VDSL * GUI GUI_suite * per port as well * rename * interface listing * draytek_snmpsim * fix arraymerge fix names and max value * schema schema style * remove one dbFetchRows remove 2x dbFetchCell style style remove Legacy dbFetchRow tests tests eloquent more eloquent more eloquent one more gone * fix properties access eloquent_insert_update style tests tests tests tests * tests tests tests * adslLineCoding * Models * fix not nullable cols in DB from code default values typo rename typo schema fix fix vdsl fix now typo typo fix size fix size * Power values for VDSL Power values for VDSL Power values for VDSL DB * cleanup * Rrd::checkRrdExists * always enable DSL discovery style * xdsl module * cleanup and move to Module cleanup and move to Module cleanup and move to Module cleanup and move to Module * Fix display * fix polling and tenth * remove legacy poller * Style and Cosmetics Cosmetics Cleanup * Translations Translations * exists exists * add test support for xdsl * remove last component call unused * translations * remove non standard onclick event on xdsl line * Update Discovery Support.md Update Poller Support.md toner_gone * Notification for removal of lnms config:set enable_ports_adsl true * enable on devices with potential DSL interfaces * tests are working now fix teldat tests * os_schema * teldat * move to new module structure * move to new module structure * wrong dump function * wrong dump function * laravel_through_key hidden * Update notifications.rss * Update notifications.rss Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-09-08 02:29:17 +02:00
$config['poller_modules']['printer-supplies'] = false;
$config['poller_modules']['ucd-diskio'] = true;
$config['poller_modules']['wireless'] = true;
$config['poller_modules']['ospf'] = true;
$config['poller_modules']['cisco-ipsec-flow-monitor'] = false;
$config['poller_modules']['cisco-remote-access-monitor'] = false;
$config['poller_modules']['cisco-cef'] = false;
$config['poller_modules']['slas'] = false;
$config['poller_modules']['cisco-mac-accounting'] = false;
$config['poller_modules']['cipsec-tunnels'] = false;
$config['poller_modules']['cisco-ace-loadbalancer'] = false;
$config['poller_modules']['cisco-ace-serverfarms'] = false;
$config['poller_modules']['cisco-asa-firewall'] = false;
$config['poller_modules']['cisco-voice'] = false;
$config['poller_modules']['cisco-cbqos'] = false;
$config['poller_modules']['cisco-otv'] = false;
$config['poller_modules']['cisco-vpdn'] = false;
$config['poller_modules']['netscaler-vsvr'] = false;
$config['poller_modules']['aruba-controller'] = false;
$config['poller_modules']['entity-physical'] = true;
$config['poller_modules']['entity-state'] = false;
$config['poller_modules']['applications'] = true;
$config['poller_modules']['availability'] = true;
$config['poller_modules']['stp'] = true;
$config['poller_modules']['ntp'] = true;
$config['poller_modules']['services'] = true;
$config['poller_modules']['loadbalancers'] = false;
$config['poller_modules']['mef'] = false;
Migrate xDSL code to module, and add support for VDSL2 MIB (#14207) * use component to discover if xDSL polling is needed use component to discover if xDSL polling is needed * Components OK, Polling in correct files, no DB for VDSL * GUI GUI_suite * per port as well * rename * interface listing * draytek_snmpsim * fix arraymerge fix names and max value * schema schema style * remove one dbFetchRows remove 2x dbFetchCell style style remove Legacy dbFetchRow tests tests eloquent more eloquent more eloquent one more gone * fix properties access eloquent_insert_update style tests tests tests tests * tests tests tests * adslLineCoding * Models * fix not nullable cols in DB from code default values typo rename typo schema fix fix vdsl fix now typo typo fix size fix size * Power values for VDSL Power values for VDSL Power values for VDSL DB * cleanup * Rrd::checkRrdExists * always enable DSL discovery style * xdsl module * cleanup and move to Module cleanup and move to Module cleanup and move to Module cleanup and move to Module * Fix display * fix polling and tenth * remove legacy poller * Style and Cosmetics Cosmetics Cleanup * Translations Translations * exists exists * add test support for xdsl * remove last component call unused * translations * remove non standard onclick event on xdsl line * Update Discovery Support.md Update Poller Support.md toner_gone * Notification for removal of lnms config:set enable_ports_adsl true * enable on devices with potential DSL interfaces * tests are working now fix teldat tests * os_schema * teldat * move to new module structure * move to new module structure * wrong dump function * wrong dump function * laravel_through_key hidden * Update notifications.rss * Update notifications.rss Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-09-08 02:29:17 +02:00
$config['poller_modules']['mef'] = false;
```
## OS based Poller config
You can enable or disable modules for a specific OS by add
corresponding line in `config.php` OS based settings have preference
over global. Device based settings have preference over all others
Poller performance improvement can be achieved by deactivating all
modules that are not supported by specific OS.
E.g. to deactivate spanning tree but activate unix-agent module for linux OS
```php
$config['os']['linux']['poller_modules']['stp'] = false;
$config['os']['linux']['poller_modules']['unix-agent'] = true;
```
## Poller modules
`unix-agent`: Enable the check_mk agent for external support for applications.
2015-05-04 16:29:03 +01:00
`system`: Provides information on some common items like uptime, sysDescr and sysContact.
2015-05-04 16:29:03 +01:00
`os`: Os detection. This module will pick up the OS of the device.
2015-05-04 16:29:03 +01:00
`ipmi`: Enables support for IPMI if login details have been provided for IPMI.
2015-05-04 16:29:03 +01:00
`sensors`: Sensor detection such as Temperature, Humidity, Voltages + More.
2015-05-04 16:29:03 +01:00
`processors`: Processor support for devices.
2015-05-04 16:29:03 +01:00
`mempools`: Memory detection support for devices.
2015-05-04 16:29:03 +01:00
`storage`: Storage detection for hard disks
2015-05-04 16:29:03 +01:00
`netstats`: Statistics for IP, TCP, UDP, ICMP and SNMP.
2015-05-04 16:29:03 +01:00
`hr-mib`: Host resource support.
2015-05-04 16:29:03 +01:00
`ucd-mib`: Support for CPU, Memory and Load.
2015-05-04 16:29:03 +01:00
`ipSystemStats`: IP statistics for device.
2015-05-04 16:29:03 +01:00
`ports`: This module will detect all ports on a device excluding ones
configured to be ignored by config options.
2015-05-04 16:29:03 +01:00
Migrate xDSL code to module, and add support for VDSL2 MIB (#14207) * use component to discover if xDSL polling is needed use component to discover if xDSL polling is needed * Components OK, Polling in correct files, no DB for VDSL * GUI GUI_suite * per port as well * rename * interface listing * draytek_snmpsim * fix arraymerge fix names and max value * schema schema style * remove one dbFetchRows remove 2x dbFetchCell style style remove Legacy dbFetchRow tests tests eloquent more eloquent more eloquent one more gone * fix properties access eloquent_insert_update style tests tests tests tests * tests tests tests * adslLineCoding * Models * fix not nullable cols in DB from code default values typo rename typo schema fix fix vdsl fix now typo typo fix size fix size * Power values for VDSL Power values for VDSL Power values for VDSL DB * cleanup * Rrd::checkRrdExists * always enable DSL discovery style * xdsl module * cleanup and move to Module cleanup and move to Module cleanup and move to Module cleanup and move to Module * Fix display * fix polling and tenth * remove legacy poller * Style and Cosmetics Cosmetics Cleanup * Translations Translations * exists exists * add test support for xdsl * remove last component call unused * translations * remove non standard onclick event on xdsl line * Update Discovery Support.md Update Poller Support.md toner_gone * Notification for removal of lnms config:set enable_ports_adsl true * enable on devices with potential DSL interfaces * tests are working now fix teldat tests * os_schema * teldat * move to new module structure * move to new module structure * wrong dump function * wrong dump function * laravel_through_key hidden * Update notifications.rss * Update notifications.rss Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-09-08 02:29:17 +02:00
`xdsl`: This module will collect more metrics for xdsl interfaces.
2019-01-19 20:08:10 +01:00
`nac`: Network Access Control (NAC) or 802.1X support.
`bgp-peers`: BGP detection and support.
2015-05-04 16:29:03 +01:00
`junose-atm-vp`: Juniper ATM support.
2015-05-04 16:29:03 +01:00
Migrate xDSL code to module, and add support for VDSL2 MIB (#14207) * use component to discover if xDSL polling is needed use component to discover if xDSL polling is needed * Components OK, Polling in correct files, no DB for VDSL * GUI GUI_suite * per port as well * rename * interface listing * draytek_snmpsim * fix arraymerge fix names and max value * schema schema style * remove one dbFetchRows remove 2x dbFetchCell style style remove Legacy dbFetchRow tests tests eloquent more eloquent more eloquent one more gone * fix properties access eloquent_insert_update style tests tests tests tests * tests tests tests * adslLineCoding * Models * fix not nullable cols in DB from code default values typo rename typo schema fix fix vdsl fix now typo typo fix size fix size * Power values for VDSL Power values for VDSL Power values for VDSL DB * cleanup * Rrd::checkRrdExists * always enable DSL discovery style * xdsl module * cleanup and move to Module cleanup and move to Module cleanup and move to Module cleanup and move to Module * Fix display * fix polling and tenth * remove legacy poller * Style and Cosmetics Cosmetics Cleanup * Translations Translations * exists exists * add test support for xdsl * remove last component call unused * translations * remove non standard onclick event on xdsl line * Update Discovery Support.md Update Poller Support.md toner_gone * Notification for removal of lnms config:set enable_ports_adsl true * enable on devices with potential DSL interfaces * tests are working now fix teldat tests * os_schema * teldat * move to new module structure * move to new module structure * wrong dump function * wrong dump function * laravel_through_key hidden * Update notifications.rss * Update notifications.rss Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-09-08 02:29:17 +02:00
`printer-supplies`: Toner levels support.
2015-05-04 16:29:03 +01:00
`ucd-diskio`: Disk I/O support.
2015-05-04 16:29:03 +01:00
`wifi`: WiFi Support for those devices with support.
2015-05-04 16:29:03 +01:00
`ospf`: OSPF Support.
2015-05-04 16:29:03 +01:00
2015-06-08 14:56:12 +10:00
`cisco-ipsec-flow-monitor`: IPSec statistics support.
2015-05-04 16:29:03 +01:00
`cisco-remote-access-monitor`: Cisco remote access support.
2015-05-04 16:29:03 +01:00
`cisco-cef`: CEF detection and support.
2015-05-04 16:29:03 +01:00
`slas`: SLA detection and support.
2015-05-04 16:29:03 +01:00
`cisco-mac-accounting`: MAC Address account support.
2015-05-04 16:29:03 +01:00
`cipsec-tunnels`: IPSec tunnel support.
2015-05-04 16:29:03 +01:00
`cisco-ace-loadbalancer`: Cisco ACE Support.
2015-05-04 16:29:03 +01:00
`cisco-ace-serverfarms`: Cisco ACE Support.
2015-05-04 16:29:03 +01:00
`netscaler-vsvr`: Netscaler support.
2015-05-04 16:29:03 +01:00
`aruba-controller`: Aruba wireless controller support.
`entity-physical`: Module to pick up the devices hardware support.
2015-05-04 16:29:03 +01:00
`applications`: Device application support.
2015-05-04 16:29:03 +01:00
`availability`: Device Availability Calculation.
`cisco-asa-firewall`: Cisco ASA firewall support.
## Running
Here are some examples of running poller from within your install directory.
```bash
./poller.php -h localhost
./poller.php -h localhost -m ports
```
## Debugging
To provide debugging output you will need to run the poller process
with the `-d` flag. You can do this either against
all modules, single or multiple modules:
All Modules
```bash
./poller.php -h localhost -d
```
Single Module
```bash
./poller.php -h localhost -m ports -d
```
Multiple Modules
```bash
./poller.php -h localhost -m ports,entity-physical -d
```
Using `-d` shouldn't output much sensitive information, `-v` will so
it is then advisable to sanitise the output before pasting it
somewhere as the debug output will contain snmp details amongst other
items including port descriptions.
The output will contain:
DB Updates
RRD Updates
2015-06-08 14:56:12 +10:00
SNMP Response