2016-08-24 08:12:20 +01:00
|
|
|
source: Support/Poller Support.md
|
2018-10-27 23:04:34 +01:00
|
|
|
path: blob/master/doc/
|
2015-05-04 16:20:38 +01:00
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
# poller.php
|
|
|
|
|
|
|
|
This document will explain how to use poller.php to debug issues or
|
|
|
|
manually running to process data.
|
|
|
|
|
|
|
|
## Command options
|
2015-05-04 16:20:38 +01:00
|
|
|
|
|
|
|
```bash
|
2019-10-21 02:47:40 +02:00
|
|
|
LibreNMS 2014.master Poller
|
2015-05-04 16:20:38 +01:00
|
|
|
|
|
|
|
-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
|
2016-08-26 00:40:11 +01:00
|
|
|
-f Do not insert data into InfluxDB
|
2015-05-04 16:20:38 +01:00
|
|
|
-d Enable debugging output
|
2016-08-26 00:40:11 +01:00
|
|
|
-v Enable verbose debugging output
|
2018-07-12 15:30:39 -05:00
|
|
|
-m Specify module(s) to be run. Comma separate modules, submodules may be added with /
|
2015-05-04 16:20:38 +01:00
|
|
|
```
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
`-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.
|
2015-05-04 16:20:38 +01:00
|
|
|
|
|
|
|
`-i` This can be used to stagger the poller process.
|
|
|
|
|
|
|
|
`-r` This option will suppress the creation or update of RRD files.
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
`-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.
|
2016-08-26 00:40:11 +01:00
|
|
|
|
|
|
|
`-v` Enables verbose debugging output with all data in tact.
|
2015-05-04 16:20:38 +01:00
|
|
|
|
|
|
|
`-m` This enables you to specify the module you want to run for poller.
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
# Poller Wrapper
|
2018-06-20 16:56:51 -05:00
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
We have a `poller-wrapper.py` script by [Job
|
|
|
|
Snijders](https://github.com/job). This script is currently the
|
|
|
|
default.
|
2018-06-20 16:56:51 -05:00
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
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.
|
2018-06-20 16:56:51 -05:00
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
# Poller config
|
2015-05-04 16:20:38 +01:00
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
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.
|
2015-05-04 16:20:38 +01:00
|
|
|
|
|
|
|
```php
|
2018-06-15 03:45:20 -05:00
|
|
|
$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;
|
2018-06-15 03:45:20 -05:00
|
|
|
$config['poller_modules']['bgp-peers'] = true;
|
|
|
|
$config['poller_modules']['junose-atm-vp'] = false;
|
|
|
|
$config['poller_modules']['toner'] = 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']['cisco-sla'] = 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;
|
2020-06-22 22:57:30 +02:00
|
|
|
$config['poller_modules']['availability'] = true;
|
2018-06-15 03:45:20 -05:00
|
|
|
$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;
|
2015-05-04 16:20:38 +01:00
|
|
|
```
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
## OS based Poller config
|
2016-11-13 20:46:05 +01:00
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
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
|
2016-11-13 20:46:05 +01:00
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
Poller performance improvement can be achieved by deactivating all
|
|
|
|
modules that are not supported by specific OS.
|
2016-11-13 20:46:05 +01:00
|
|
|
|
|
|
|
E.g. to deactivate spanning tree but activate unix-agent module for linux OS
|
|
|
|
|
|
|
|
```php
|
2018-06-15 03:45:20 -05:00
|
|
|
$config['os']['linux']['poller_modules']['stp'] = false;
|
|
|
|
$config['os']['linux']['poller_modules']['unix-agent'] = true;
|
2016-11-13 20:46:05 +01:00
|
|
|
```
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
## Poller modules
|
2015-05-04 16:20:38 +01:00
|
|
|
|
|
|
|
`unix-agent`: Enable the check_mk agent for external support for applications.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`system`: Provides information on some common items like uptime, sysDescr and sysContact.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`os`: Os detection. This module will pick up the OS of the device.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`ipmi`: Enables support for IPMI if login details have been provided for IPMI.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`sensors`: Sensor detection such as Temperature, Humidity, Voltages + More.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`processors`: Processor support for devices.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`mempools`: Memory detection support for devices.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`storage`: Storage detection for hard disks
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`netstats`: Statistics for IP, TCP, UDP, ICMP and SNMP.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`hr-mib`: Host resource support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`ucd-mib`: Support for CPU, Memory and Load.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`ipSystemStats`: IP statistics for device.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2019-07-18 21:25:53 -05: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
|
|
|
|
2019-01-19 20:08:10 +01:00
|
|
|
`nac`: Network Access Control (NAC) or 802.1X support.
|
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`bgp-peers`: BGP detection and support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`junose-atm-vp`: Juniper ATM support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`toner`: Toner levels support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`ucd-diskio`: Disk I/O support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`wifi`: WiFi Support for those devices with support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +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
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`cisco-remote-access-monitor`: Cisco remote access support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`cisco-cef`: CEF detection and support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`cisco-sla`: SLA detection and support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`cisco-mac-accounting`: MAC Address account support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`cipsec-tunnels`: IPSec tunnel support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`cisco-ace-loadbalancer`: Cisco ACE Support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`cisco-ace-serverfarms`: Cisco ACE Support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`netscaler-vsvr`: Netscaler support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2016-01-30 22:37:28 -05:00
|
|
|
`aruba-controller`: Aruba wireless controller support.
|
2016-01-30 21:06:58 -05:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`entity-physical`: Module to pick up the devices hardware support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`applications`: Device application support.
|
2015-05-04 16:29:03 +01:00
|
|
|
|
2020-06-22 22:57:30 +02:00
|
|
|
`availability`: Device Availability Calculation.
|
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
`cisco-asa-firewall`: Cisco ASA firewall support.
|
|
|
|
|
2015-06-08 14:58:22 +10:00
|
|
|
`mib`: Support for generic MIB parsing.
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
# Running
|
2015-05-04 16:20:38 +01:00
|
|
|
|
|
|
|
Here are some examples of running poller from within your install directory.
|
2019-07-18 21:25:53 -05:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
```bash
|
|
|
|
./poller.php -h localhost
|
|
|
|
|
|
|
|
./poller.php -h localhost -m ports
|
|
|
|
```
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
# Debugging
|
2015-05-04 16:20:38 +01:00
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
To provide debugging output you will need to run the poller process
|
|
|
|
with the `-d` flag. You can do this either against
|
2015-05-04 16:20:38 +01:00
|
|
|
all modules, single or multiple modules:
|
|
|
|
|
|
|
|
All Modules
|
2019-07-18 21:25:53 -05:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
```bash
|
|
|
|
./poller.php -h localhost -d
|
|
|
|
```
|
|
|
|
|
|
|
|
Single Module
|
2019-07-18 21:25:53 -05:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
```bash
|
|
|
|
./poller.php -h localhost -m ports -d
|
|
|
|
```
|
|
|
|
|
|
|
|
Multiple Modules
|
2019-07-18 21:25:53 -05:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
```bash
|
|
|
|
./poller.php -h localhost -m ports,entity-physical -d
|
|
|
|
```
|
|
|
|
|
2019-07-18 21:25:53 -05:00
|
|
|
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.
|
2015-05-04 16:20:38 +01:00
|
|
|
|
|
|
|
The output will contain:
|
|
|
|
|
|
|
|
DB Updates
|
|
|
|
|
|
|
|
RRD Updates
|
|
|
|
|
2015-06-08 14:56:12 +10:00
|
|
|
SNMP Response
|