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

Telegraf 1.22.0 / GoSNMP.Conn is missing #10890

Closed
bondskin opened this issue Mar 25, 2022 · 11 comments · Fixed by #11163
Closed

Telegraf 1.22.0 / GoSNMP.Conn is missing #10890

bondskin opened this issue Mar 25, 2022 · 11 comments · Fixed by #11163
Labels
area/snmp bug unexpected problem or unintended behavior

Comments

@bondskin
Copy link

bondskin commented Mar 25, 2022

Relevant telegraf.conf

[[inputs.snmp.table]]
    oid = "IF-MIB::ifTable"
    [[inputs.snmp.table.field]]
      is_tag = true
      oid = "IF-MIB::ifDescr"

Logs from Telegraf

Mar 25 10:46:00 raspberrypidns telegraf[16226]: 2022-03-25T09:46:00Z E! [inputs.snmp] Error in plugin: agent dreamer.ip: gathering table unifiIfTable: performing bulk walk for field unifiIfName: &GoSNMP.Conn is missing. Provide a connection or use Connect()
Mar 25 10:46:00 raspberrypidns telegraf[16226]: 2022-03-25T09:46:00Z E! [inputs.snmp] Error in plugin: agent dreamer.ip: gathering table hrProcessorTable: performing bulk walk for field hrProcessorFrwID: &GoSNMP.Conn is missing. Provide a connection or use Connect()
Mar 25 10:46:00 raspberrypidns telegraf[16226]: 2022-03-25T09:46:00Z E! [inputs.snmp] Error in plugin: agent dreamer.ip: gathering table laTable: performing bulk walk for field laNames: &GoSNMP.Conn is missing. Provide a connection or use Connect()
Mar 25 10:46:00 raspberrypidns telegraf[16226]: 2022-03-25T09:46:00Z E! [inputs.snmp] Error in plugin: agent area51.ip: performing get on field sysName: &GoSNMP.Conn is missing. Provide a connection or use Connect()

System info

Telegraf, 1.22.0, Raspberry Pi 4

Docker

No response

Steps to reproduce

...

Expected behavior

no errors and values are correctly captured.

Actual behavior

For some devices, it produces errors and no SNMP values are being captured

Additional info

no issue with telegraf_1.20.4-1_armhf.deb

@bondskin bondskin added the bug unexpected problem or unintended behavior label Mar 25, 2022
@Hipska
Copy link
Contributor

Hipska commented Mar 25, 2022

This seems like a duplicate of #10554

@sjwang90
Copy link
Contributor

Let's close this to avoid duplicated. @bondskin - please check out #10554 and comment anything you would like to add on that issue.

@Hipska
Copy link
Contributor

Hipska commented May 19, 2022

@bondskin I just came to some code that might have introduced your problem: #10268

I think we still need to do that reconnect in some cases. Like in your case for example.

If I'm correct, latest working version was 1.20.4? Could you confirm that?

@Hipska Hipska reopened this May 19, 2022
@bondskin
Copy link
Author

Hi @Hipska , yes exactly. 1.20.4 was the last good version in regards to this issue.

@Hipska
Copy link
Contributor

Hipska commented May 19, 2022

Okay, and what are your settings for retries and is it an TCP device?

@bondskin
Copy link
Author

bondskin commented May 19, 2022

 # Polling interval
  interval = "60s"
  # Timeout for each SNMP query.
  timeout = "10s"
  # Number of retries to attempt within timeout.
  retries = 3
  # SNMP version
  version = 2

and yes, TCP

@Hipska
Copy link
Contributor

Hipska commented May 19, 2022

Okay, I was suspecting that. I think I can fix it.

@srebhan
Copy link
Contributor

srebhan commented May 24, 2022

@bondskin can you please confirm that the linked PR fixes your issue!?

@bondskin
Copy link
Author

Hi @srebhan , this is looking exceptionally great!

it took 1-2 min until the hostnames of the SNMP clients were correctly resolved after restarting the new Telegraf (PR) instance

May 24 20:06:01 raspberrypidns telegraf[13104]: 2022-05-24T18:06:01Z E! [inputs.snmp] Error in plugin: agent millenniumfalcon.ip: setting up connection: error establishing con
nection to host: dial udp: lookup millenniumfalcon.ip on 127.0.0.1:53: no such host
May 24 20:06:01 raspberrypidns telegraf[13104]: 2022-05-24T18:06:01Z E! [inputs.snmp] Error in plugin: agent flash.ip: setting up connection: error establishing connection to
host: dial udp: lookup flash.ip on 127.0.0.1:53: no such host
May 24 20:06:01 raspberrypidns telegraf[13104]: 2022-05-24T18:06:01Z E! [inputs.snmp] Error in plugin: agent area51.ip: setting up connection: error establishing connection to
host: dial udp: lookup area51.ip on 127.0.0.1:53: no such host
May 24 20:07:01 raspberrypidns telegraf[13104]: 2022-05-24T18:07:01Z E! [inputs.snmp] Error in plugin: agent millenniumfalcon.ip: reconnecting: error establishing connection t
o host: dial udp: lookup millenniumfalcon.ip on 127.0.0.1:53: no such host
May 24 20:07:01 raspberrypidns telegraf[13104]: 2022-05-24T18:07:01Z E! [inputs.snmp] Error in plugin: agent flash.ip: reconnecting: error establishing connection to host: dia
l udp: lookup flash.ip on 127.0.0.1:53: no such host

but then everything is working fine, no more errors and all clients are delivering results

@Hipska
Copy link
Contributor

Hipska commented May 30, 2022

Hi @bondskin, would you be able to test the builds from #11197 as well? (Or the latest nightly builds) They did a minor change on my code and I just wanted to make sure it still works for you.. (Since we could not reproduce your issues)

@bondskin
Copy link
Author

Hi @Hipska , thanks for asking, much appreciated.
Still looking good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/snmp bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants