Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNMP plugin generating duplicate measurements #773

Closed
DebtFromAbove opened this issue Mar 1, 2016 · 4 comments
Closed

SNMP plugin generating duplicate measurements #773

DebtFromAbove opened this issue Mar 1, 2016 · 4 comments

Comments

@DebtFromAbove
Copy link

Hi,

Im running telegraf 0.10.4.1 and trying to use the snmp plugin to gather measurements from a router running DD-WRT and send them to influx. I've specified a few measurements to get using the bulk and get methods.

When I run a config test it is showing some of the measurements twice for each interface

I have checked the router itself by running snmpwalk -c XXXX -v 2c 192.168.1.4 . > /tmp/dir-router-snmp. I've then searched the resulting file to ensure that the the translated OID descriptions I am requesting in my config file only appear once for each interface. I have also tried the same config file below but replacing the translated OID descriptions with the actual OID value E.g. '.1.3.6.1.2.1.2.2.1.10'

I've run it without the test option and confirmed the same from the influxDB query interface. There are two measurements for each interface approx 1 second apart, then another two 10 seconds later. The global interval is set to 10s so there should only be one measurement every 10s.

One final point, I've also tested with "retries" set to 0 in case it was retrying because it thought there was an error and in actual fact pulled stats twice. This made no difference either

Could someone take a look at what may be causing this, or offer up any advice as to what I could try next

TIA

[[inputs.snmp]]
  #   snmptranslate -m all -Tz -On | sed -e 's/"//g' > /tmp/oids.txt
  snmptranslate_file = "/tmp/oids.txt"

[[inputs.snmp.host]]
    address = "192.168.1.4:161"
    community = "XXXX"
    version = 2
    timeout = 5.0
    retries = 2
    collect = ["sysuptime", "ifInOctets","ifOutOctets","ifInDiscards","ifOutDiscards","ifInErrors","ifOutErrors"]
    get_oids = [
        "ifNumber",
    "hrSystemUptime"
    ]

[[inputs.snmp.get]]
  name = "sysuptime"
  oid = ".1.3.6.1.2.1.1.3.0"
  unit = "second"
[[inputs.snmp.bulk]]
  name = "ifInOctets"
  oid = "ifInOctets"
  max_repetition = 63
[[inputs.snmp.bulk]]
  name = "ifOutOctets"
  oid = "ifOutOctets"
  max_repetition = 63
[[inputs.snmp.bulk]]
  name = "ifInDiscards"
  oid = "ifInDiscards"
  max_repetition = 63
[[inputs.snmp.bulk]]
  name = "ifOutDiscards"
  oid = "ifOutDiscards"
  max_repetition = 63
[[inputs.snmp.bulk]]
  name = "ifInErrors"
  oid = "ifInErrors"
  max_repetition = 63
[[inputs.snmp.bulk]]
  name = "ifOutErrors"
  oid = "ifOutErrors"
  max_repetition = 63
@sparrc
Copy link
Contributor

sparrc commented Mar 1, 2016

cc @titilambert

@titilambert
Copy link
Contributor

@DebtFromAbove Thanks for this bug report.
I can reproduce it ! Thanks !

titilambert added a commit to titilambert/telegraf that referenced this issue Mar 1, 2016
@titilambert
Copy link
Contributor

@DebtFromAbove Found and fixed :)
Thanks !

@sparrc I made a patch for this bug on snmp PR (#735)
Do you want I put the patch in an other PR ?

titilambert added a commit to titilambert/telegraf that referenced this issue Mar 1, 2016
@DebtFromAbove
Copy link
Author

Thanks for fix.

On 1 March 2016 00:46:33 GMT+00:00, Thibault Cohen notifications@github.com wrote:

@DebtFromAbove Found and fixed :)
Thanks !

@sparrc I made a patch for this bug on snmp PR
(#735)
Do you want I put the patch in an other PR ?


Reply to this email directly or view it on GitHub:
#773 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

titilambert added a commit to titilambert/telegraf that referenced this issue Mar 2, 2016
@sparrc sparrc closed this as completed in e5503c5 Mar 3, 2016
sparrc pushed a commit that referenced this issue Mar 3, 2016
geodimm pushed a commit to miketonks/telegraf that referenced this issue Mar 10, 2016
geodimm pushed a commit to miketonks/telegraf that referenced this issue Mar 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants