Exporter for metrics from Cisco devices running NX-OS, IOS XE or IOS via SSH.
Usage of ./cisco-exporter:
-config.file string
Configuration file (default "cisco-exporter.yml")
-scrape.timeout duration
Duration after which to abort a scrape (default 50s)
-ssh.keep-alive-interval duration
Duration to wait between keep alive messages (default 10s)
-ssh.keep-alive-timeout duration
Duration to wait for keep alive message response (default 15s)
-ssh.reconnect-interval duration
Duration to wait before reconnecting to a device after connection got lost (default 30s)
-version
Print version and exit
-web.listen-address string
Address to listen on (default "[::]:9457")
-web.telemetry-path string
Path under which to expose metrics (default "/metrics")
Binary releases can be downloaded from the releases page.
Devices can be monitored in two different ways. You can configure a static device or configure a dynamic device group. Dynamic device groups are used with the multi-target exporter pattern.
devices:
# Static Device
hostname.example.com:
port: 1337 # optional: SSH port of the remote device
enabled_collectors: # required: See below for a list of collectors
- cpu
- memory
- interfaces
enabled_vlans: # optional: Some devices (BNGs) might have thousands of vlans
- 100
interfaces: # optional: Some devices (BNGs) might have thousands of interfaces
- HundredGigE0/0/0 # you can specify the interfaces to be scraped
- GigabitEthernet0
username: monitoring # required: Username to use for SSH auth
key_file: /path/to/a/private.key # optional: Private key to use for SSH auth
password: correcthorsebatterystaple # optional: Password for SSH auth
ConnectTimeout: 5 # optional: Timeout for establishing the SSH conenction
CommandTimeout: 10 # optional: Timeout for running a single command on the remote
# Dynamic Device Group
host*.foo.example.com:
port: 1338
# ... Similar ot static configuration
Multiple collectors are available, you must specify which one to use.
aaa
: Collects metrics about radius servers by runningshow aaa servers
.bgp
: Collects metrics about IPv4 / IPv6 unicast BGP peers by both runningshow bgp ipv4 unicast neighbors
andshow bgp ipv6 unicast neighbors
.cpu
: Collects metrics about CPU usage by runningshow processes cpu
.environment
: Collects metrics about the device's environment by runningshow environment
orshow env all
.interfaces
: Collects interface counters. Note that you can optionally limit which interfaces to scrape.mpls
: Collects mpls specific metrics by both executingshow mpls forwarding-table
andshow mpls memory
.memory
: Collects metrics about memory usage by runningshow system resources
(NX-OS) orshow memory statistics
.nat
: Collectrs metrics about network address translation by scraping the outputs ofshow ip nat statistics
and multipleshow ip nat pool name ...
.optics
: Collects transceiver status by issueing ashow interfaces transceiver detail
(IOS and NX-OS) or ashow inventory raw
followed by multipleshow hw-module subslot ...
commands on IOS XE.pppoe
: Collects PPPoE statistics by issueing ashow pppoe statistics
.vlans
: Collects VLAN counters returned by ashow vlans
.nat
: Collects general NAT countersshow ip nat statistics
and NAT Pool countersshow ip nat pool name $name
.local_pools
: Collects general information about local pools by usingshow ip local pool
.
Upon start cisco-exporter will try to connect with all the scrape targets. Established SSH connections are kept alive as long as possible, to reduce scrape latency, load on the tacacs server and logged events.