Categorygithub.com/shenjler/ssh_ping_exporter
modulepackage
0.0.0-20211019024609-94883c90a4d1
Repository: https://github.com/shenjler/ssh_ping_exporter.git
Documentation: pkg.go.dev

# README

cisco_exporter

Exporter for metrics from devices running Cisco (NX-OS/IOS XE/IOS) (via SSH) https://prometheus.io/

The basic structure is based on https://github.com/czerwonk/junos_exporter

flags

NameDescriptionDefault
versionPrint version information.
web.listen-addressAddress on which to expose metrics and web interface.:9362
web.telemetry-pathPath under which to expose metrics./metrics
ssh.targetsComma seperated list of hosts to scrape
ssh.userUsername to use for SSH connectioncisco_exporter
ssh.keyfileKey file to use for SSH connectioncisco_exporter
ssh.timeoutTimeout in seconds to use for SSH connection5
debugShow verbose debug outputfalse
legacy.ciphersAllow insecure legacy ciphers: aes128-cbc 3des-cbc aes192-cbc aes256-cbcfalse
config.filePath to config file

metrics

All metrics are enabled by default. To disable something pass a flag --<name>.enabled=false, where <name> is the name of the metric.

NameDescriptionOS
bgpBGP (message count, prefix counts per peer, session state)IOS XE/NX-OS
environmentEnvironment (temperatures, state of power supply)NX-OS/IOS XE/IOS
factsSystem informations (OS Version, memory: total/used/free, cpu: 5s/1m/5m/interrupts)IOS XE/IOS
interfacesInterfaces (transmitted/received: bytes/errors/drops, admin/oper state)NX-OS (*_drops is always 0)/IOS XE/IOS
opticsOptical signals (tx/rx)NX-OS/IOS XE/IOS

Install

go get -u github.com/shenjler/ssh_ping_exporter

Usage

Binary

./cisco_exporter -ssh.targets="host1.example.com,host2.example.com:2233,172.16.0.1" -ssh.keyfile=cisco_exporter
./cisco_exporter -config.file=config.yml

Config file

The exporter can be configured with a YAML based config file:

---
debug: false
legacy_ciphers: false
# default values
timeout: 5
batch_size: 10000
username: default-username
password: default-password
key_file: /path/to/key

devices:
  - host: host1.example.com
    key_file: /path/to/key
    timeout: 5
    batch_size: 10000
    features: # enable/disable per host
      bgp: false
  - host: host2.example.com:2233
    username: exporter
    password: secret

features:
  bgp: true
  environment: true
  facts: true
  interfaces: true
  optics: true

Third Party Components

This software uses components of the following projects

License

(c) Martin Poppen, 2018. Licensed under MIT license.

Prometheus

see https://prometheus.io/

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author