项目作者: robcowart

项目描述 :
SNMP Data Collection and Analytics with the TICK Stack (Telegraf, InfluxDB, Chronograf and Kapacitor)
高级语言: Dockerfile
项目地址: git://github.com/robcowart/influx_snmp.git
创建时间: 2018-08-23T07:56:26Z
项目社区:https://github.com/robcowart/influx_snmp

开源协议:Other

下载


THIS REPOSITORY IS ARCHIVED AND SHOULD NOT BE USED!!!

While Telegraf’s SNMP input has some advantages over other open source options, the simple fact is that it has serious deficiencies that make it almost useless for anything beyond the simplest low-scale use-cases. If I ever find an SNMP poller worth recommending I will note it here at that time.

SNMP Data Collection and Analytics with the TICK Stack

influx_snmp provides a solution for SNMP data collection and analytics using InfluxData’s TICK Stack - Telegraf, InfluxDB, Chronograf and Kapacitor.

influx_snmp

“Dockerized” Telegraf for SNMP Polling

To poll a device, a container of the appropriate type is configured and run. docker-compose provides a mechanism to easily configure and start multiple containers for the various devices in your infrastructure. An example docker-compose.yml file is provided, including an example of using a environment variable file to set global settings.

The containers are available on Docker Hub HERE.

The following is an example docker-compoase.yml file, which polls three different device type-specific containers:

  1. version: '3'
  2. services:
  3. snmp-rt1:
  4. image: robcowart/telegraf-snmp:0.0.1_ubiquiti_edgeos_base
  5. container_name: snmp-rt1
  6. restart: unless-stopped
  7. hostname: snmp-rt1
  8. network_mode: host
  9. env_file:
  10. - influx_snmp.env
  11. environment:
  12. TELEGRAF_SNMP_AGENT: "192.0.2.1:161"
  13. TELEGRAF_SNMP_AGENT_TYPE: ubiquiti_edgeos
  14. TELEGRAF_SNMP_HOST: rt1
  15. snmp-sw1:
  16. image: robcowart/telegraf-snmp:0.0.1_juniper_ex
  17. container_name: snmp-sw1
  18. restart: unless-stopped
  19. hostname: snmp-sw1
  20. network_mode: host
  21. env_file:
  22. - influx_snmp.env
  23. environment:
  24. TELEGRAF_SNMP_AGENT: "192.0.2.2:161"
  25. TELEGRAF_SNMP_AGENT_TYPE: juniper_ex
  26. TELEGRAF_SNMP_HOST: rt2
  27. snmp-wlan1:
  28. image: robcowart/telegraf-snmp:0.0.1_engenius_wifi
  29. container_name: snmp-wlan1
  30. restart: unless-stopped
  31. hostname: snmp-wlan1
  32. network_mode: host
  33. env_file:
  34. - influx_snmp.env
  35. environment:
  36. TELEGRAF_SNMP_AGENT: "192.0.2.5:161"
  37. TELEGRAF_SNMP_AGENT_TYPE: engenius_wifi
  38. TELEGRAF_SNMP_HOST: wlan1

The external environment variable file influx_snmp.env for global settings:

  1. # The SNMP query timeout.
  2. TELEGRAF_SNMP_TIMEOUT=5s
  3. # polling interval.
  4. TELEGRAF_SNMP_INTERVAL=60s
  5. # SNMPv1/v2c community string
  6. TELEGRAF_SNMP_COMMUNITY=public
  7. # SNMPv3 credentials
  8. TELEGRAF_SNMP_SEC_NAME=username
  9. TELEGRAF_SNMP_AUTH_PROTOCOL=MD5
  10. TELEGRAF_SNMP_AUTH_PASSWORD=changeme
  11. TELEGRAF_SNMP_SEC_LEVEL=authNoPriv
  12. # InfluxDB instance, credentials and DB name.
  13. TELEGRAF_SNMP_INFLUXDB_URL=http://192.168.9.11:8086
  14. TELEGRAF_SNMP_INFLUXDB_USER=admin
  15. TELEGRAF_SNMP_INFLUXDB_PASSWD=changeme
  16. TELEGRAF_SNMP_DATABASE=snmp

You can also easily run InfluxDB, Kapacitor, Chronograf and even Grafana in Docker containers. A docker-compose.yml file to help you get started is available HERE.

Building the Docker Containers

This repository includes the configuration and scripts to build containers for each supported device type.

To-Do

  • More Chronograf and/or Grafana Dashboards
  • Kapacitor Alerts
  • Additional device support