diff --git a/plugins/inputs/snmp/snmp.go b/plugins/inputs/snmp/snmp.go index 706dbb4c02aef..d894cd47cf9d4 100644 --- a/plugins/inputs/snmp/snmp.go +++ b/plugins/inputs/snmp/snmp.go @@ -20,7 +20,7 @@ type Snmp struct { Host []Host Get []Data Bulk []Data - Snmptranslatefile string + SnmptranslateFile string } type Host struct { @@ -69,7 +69,7 @@ var sampleConfig = ` # snmptranslate -m all -Tz -On | sed -e 's/"//g' > /tmp/oids.txt # Or if you have an other MIB folder with custom MIBs # snmptranslate -M /mycustommibfolder -Tz -On -m all | sed -e 's/"//g' > oids.txt - snmptranslatefile = "/tmp/oids.txt" + snmptranslate_file = "/tmp/oids.txt" [[inputs.snmp.host]] address = "192.168.2.2:161" # SNMP community @@ -173,8 +173,8 @@ func findnodename(node Node, ids []string) string { func (s *Snmp) Gather(acc inputs.Accumulator) error { // Create oid tree - if s.Snmptranslatefile != "" { - data, err := ioutil.ReadFile(s.Snmptranslatefile) + if s.SnmptranslateFile != "" { + data, err := ioutil.ReadFile(s.SnmptranslateFile) if err != nil { fmt.Print(err) } else {