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

ifName plugin parallel lookups fails #9983

Closed
Hipska opened this issue Oct 22, 2021 · 0 comments · Fixed by #10007
Closed

ifName plugin parallel lookups fails #9983

Hipska opened this issue Oct 22, 2021 · 0 comments · Fixed by #10007
Assignees
Labels
area/snmp bug unexpected problem or unintended behavior plugin/processor

Comments

@Hipska
Copy link
Contributor

Hipska commented Oct 22, 2021

It seems like the processors.ifname setting max_parallel_lookups isn't working as expected. When I added more devices, the plugin started failing to get the ifname for some of them.

Relevant telegraf.conf:

Used default processors.ifname config (max_parallel_lookups = 100)

System info:

Telegraf 1.20.2 (git: HEAD f721f53)

Steps to reproduce:

  1. add lot of metrics from different agents

Expected behavior:

ifname processor to perfectly be able to do lookups in parallel.

Actual behavior:

Randomly getting these kind of errors:

D! [processors.ifname] Error adding tag interface number 126 isn't in the table of interface names

Additional info:

Although there seem to be signals in place to only do one lookup per agent, the lookup function itself does not seem to be thread-safe implemented:

func (d *IfName) getMapRemoteNoMock(agent string) (nameMap, error) {
gs := d.gsBase
err := gs.SetAgent(agent)
if err != nil {
return nil, fmt.Errorf("parsing agent tag: %w", err)
}
err = gs.Connect()
if err != nil {
return nil, fmt.Errorf("connecting when fetching interface names: %w", err)
}

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 plugin/processor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants