2023-10-04 16:32:02 -05:00
|
|
|
# lnms device:poll
|
2019-07-18 21:25:53 -05:00
|
|
|
|
2023-10-04 16:32:02 -05:00
|
|
|
This document will explain how to use `lnms device:poll` to debug issues or
|
2019-07-18 21:25:53 -05:00
|
|
|
manually running to process data.
|
|
|
|
|
|
|
|
|
|
## Command options
|
2015-05-04 16:20:38 +01:00
|
|
|
|
|
|
|
|
```bash
|
2023-10-04 16:32:02 -05:00
|
|
|
Description:
|
|
|
|
|
Poll data from device(s) as defined by discovery
|
|
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
|
device:poll [options] [--] <device spec>
|
|
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
|
device spec Device spec to poll: device_id, hostname, wildcard (*), odd, even, all
|
|
|
|
|
|
|
|
|
|
Options:
|
|
|
|
|
-m, --modules=MODULES Specify single module to be run. Comma separate modules, submodules may be added with /
|
|
|
|
|
-x, --no-data Do not update datastores (RRD, InfluxDB, etc)
|
|
|
|
|
-h, --help Display help for the given command. When no command is given display help for the list command
|
|
|
|
|
-q, --quiet Do not output any message
|
|
|
|
|
-V, --version Display this application version
|
|
|
|
|
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
|
|
|
|
|
-n, --no-interaction Do not ask any interactive question
|
|
|
|
|
--env[=ENV] The environment the command should run under
|
|
|
|
|
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
|
2015-05-04 16:20:38 +01:00
|
|
|
```
|
|
|
|
|
|
2022-02-16 02:43:48 +01: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
|
|
|
|
2022-02-16 02:43:48 +01: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
|
|
|
|
2023-05-11 01:05:12 +01:00
|
|
|
!!! setting "poller/poller_modules"
|
|
|
|
|
```bash
|
|
|
|
|
lnms config:set poller_modules.unix-agent false
|
|
|
|
|
lnms config:set poller_modules.os true
|
|
|
|
|
lnms config:set poller_modules.ipmi true
|
|
|
|
|
lnms config:set poller_modules.sensors true
|
|
|
|
|
lnms config:set poller_modules.processors true
|
|
|
|
|
lnms config:set poller_modules.mempools true
|
|
|
|
|
lnms config:set poller_modules.storage true
|
|
|
|
|
lnms config:set poller_modules.netstats true
|
|
|
|
|
lnms config:set poller_modules.hr-mib true
|
|
|
|
|
lnms config:set poller_modules.ucd-mib true
|
|
|
|
|
lnms config:set poller_modules.ipSystemStats true
|
|
|
|
|
lnms config:set poller_modules.ports true
|
|
|
|
|
lnms config:set poller_modules.nac false
|
|
|
|
|
lnms config:set poller_modules.bgp-peers true
|
|
|
|
|
lnms config:set poller_modules.junose-atm-vp false
|
|
|
|
|
lnms config:set poller_modules.printer-supplies false
|
|
|
|
|
lnms config:set poller_modules.ucd-diskio true
|
|
|
|
|
lnms config:set poller_modules.wireless true
|
|
|
|
|
lnms config:set poller_modules.ospf true
|
|
|
|
|
lnms config:set poller_modules.cisco-ipsec-flow-monitor false
|
|
|
|
|
lnms config:set poller_modules.cisco-remote-access-monitor false
|
|
|
|
|
lnms config:set poller_modules.cisco-cef false
|
|
|
|
|
lnms config:set poller_modules.slas false
|
|
|
|
|
lnms config:set poller_modules.cisco-mac-accounting false
|
|
|
|
|
lnms config:set poller_modules.cipsec-tunnels false
|
|
|
|
|
lnms config:set poller_modules.cisco-ace-loadbalancer false
|
|
|
|
|
lnms config:set poller_modules.cisco-ace-serverfarms false
|
|
|
|
|
lnms config:set poller_modules.cisco-asa-firewall false
|
|
|
|
|
lnms config:set poller_modules.cisco-voice false
|
|
|
|
|
lnms config:set poller_modules.cisco-cbqos false
|
|
|
|
|
lnms config:set poller_modules.cisco-otv false
|
|
|
|
|
lnms config:set poller_modules.cisco-vpdn false
|
|
|
|
|
lnms config:set poller_modules.netscaler-vsvr false
|
|
|
|
|
lnms config:set poller_modules.aruba-controller false
|
|
|
|
|
lnms config:set poller_modules.entity-physical true
|
|
|
|
|
lnms config:set poller_modules.entity-state false
|
|
|
|
|
lnms config:set poller_modules.applications true
|
|
|
|
|
lnms config:set poller_modules.availability true
|
|
|
|
|
lnms config:set poller_modules.stp true
|
2023-10-05 19:49:26 -05:00
|
|
|
lnms config:set poller_modules.vminfo false
|
2023-05-11 01:05:12 +01:00
|
|
|
lnms config:set poller_modules.ntp true
|
|
|
|
|
lnms config:set poller_modules.services true
|
|
|
|
|
lnms config:set poller_modules.loadbalancers false
|
|
|
|
|
lnms config:set poller_modules.mef false
|
|
|
|
|
lnms config:set 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
|
|
|
|
|
|
2023-05-11 01:05:12 +01:00
|
|
|
!!! setting "poller/poller_modules"
|
|
|
|
|
```bash
|
|
|
|
|
lnms config:set os.linux.poller_modules.stp false
|
|
|
|
|
lnms config:set 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
|
|
|
|
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.
|
|
|
|
|
|
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
|
|
|
|
2022-09-08 02:29:17 +02:00
|
|
|
`printer-supplies`: 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
|
|
|
|
2022-09-05 02:25:36 -05:00
|
|
|
`slas`: 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.
|
|
|
|
|
|
2022-02-16 02:43:48 +01: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
|
2023-10-04 16:32:02 -05:00
|
|
|
lnms device:poll localhost
|
2015-05-04 16:20:38 +01:00
|
|
|
|
2023-10-04 16:32:02 -05:00
|
|
|
lnms device:poll localhost -m ports
|
2015-05-04 16:20:38 +01:00
|
|
|
```
|
|
|
|
|
|
2022-02-16 02:43:48 +01: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
|
2023-10-04 16:32:02 -05:00
|
|
|
with the `-vv` 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
|
2023-10-04 16:32:02 -05:00
|
|
|
lnms device:poll localhost -vv
|
2015-05-04 16:20:38 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Single Module
|
2019-07-18 21:25:53 -05:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
```bash
|
2023-10-04 16:32:02 -05:00
|
|
|
lnms device:poll localhost -m ports -vv
|
2015-05-04 16:20:38 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Multiple Modules
|
2019-07-18 21:25:53 -05:00
|
|
|
|
2015-05-04 16:20:38 +01:00
|
|
|
```bash
|
2023-10-04 16:32:02 -05:00
|
|
|
lnms device:poll localhost -m ports,entity-physical -vv
|
2015-05-04 16:20:38 +01:00
|
|
|
```
|
|
|
|
|
|
2023-10-04 16:32:02 -05:00
|
|
|
Using `-vv` shouldn't output much sensitive information, `-vvv` will so
|
2019-07-18 21:25:53 -05:00
|
|
|
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
|