From caafac4a2ff29a2c5dbb28da446bb56f510e81db Mon Sep 17 00:00:00 2001 From: "mirek.malecha@bonitoo.io" Date: Mon, 29 Jun 2020 21:19:50 +0200 Subject: [PATCH] Added Telegraf variables --- snmp/README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/snmp/README.md b/snmp/README.md index 0ca669e1..67ebd96f 100644 --- a/snmp/README.md +++ b/snmp/README.md @@ -22,7 +22,7 @@ This template includes the following: - 1 Bucket: `snmp`, 1d retention - 3 Labels: `inputs.net`,`inputs.system`,`SNMP` - - 3 Telegraf Configurations + - 3 Telegraf Configurations: `Linux SNMP`, `Cisco SNMP`, `Mikrotik SNMP` - 0 Checks: - 3 Dashboards: `SNMP System Monitoring`, `SNMP Mikrotik Monitoring`, `SNMP Network Monitoring` - 2 Variables: `snmp_host`, and `snmp_ifName` @@ -33,14 +33,29 @@ Load the dashboards and use the [SNMP plugin](https://github.com/influxdata/tele environment. Include the Telegraf `inputs.snmp` plugin in your Telegraf configuration and start Telegraf. There are multiple configuration files per specific device. -SNMP tools must be installed on the device with telegraf. If labels are used in OIDs, appropritae MIB files must be installed as well. +SNMP tools must be installed on the device with Telegraf. If labels are used in OIDs, appropriate MIB files must be installed as well. Example for Ubuntu: `sudo apt install snmp snmp-mibs-downloader` -For Linux SNMP monitoring SNMP server must be installed and proprely configured. +For Linux SNMP monitoring SNMP server must be installed and properly configured. Example for Ubuntu: `sudo apt install snmpd` +### Telegraf +The data for the dashboard is populated by the included Telegraf configuration. The Telegraf Configuration requires the following environment variables + + - `INFLUX_TOKEN` - The token with the permissions to read Telegraf configs and write data to a bucket. You can just use your master token to get started. + - `INFLUX_ORG` - The name of your Organization (this will be your email address on the InfluxDB Cloud free tier) + - `INFLUX_HOST` - The URL of your InfluxDB host (this can your localhost, a remote instance, or InfluxDB Cloud) + - `INFLUX_BUCKET` - The name of your bucket (default name is `snmp`) + +You **MUST** set these environment variables before running Telegraf using something similar to the following commands + + - This can be found on the `Load Data` > `Tokens` page in your browser: `export INFLUX_TOKEN=TOKEN` + - Your Organization name can be found on the Settings page in your browser: `export INFLUX_ORG=my_org` + +Each Telegraf configuration requires to update inputs.snmp section to configure SNMP connection parameters. + ## Customizations Extend the telegraf configuration using SNMP OID codes to process more metrics.