Skip to content

Commit

Permalink
Rename snmptranslatefile to snmptranslate_file
Browse files Browse the repository at this point in the history
  • Loading branch information
titilambert committed Jan 19, 2016
1 parent 03846ba commit a24ebc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/inputs/snmp/snmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Snmp struct {
Host []Host
Get []Data
Bulk []Data
Snmptranslatefile string
SnmptranslateFile string
}

type Host struct {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a24ebc7

Please sign in to comment.