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:
- 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) |
|
} |
|
|
It seems like the
processors.ifnamesettingmax_parallel_lookupsisn'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.ifnameconfig (max_parallel_lookups = 100)System info:
Telegraf 1.20.2 (git: HEAD f721f53)
Steps to reproduce:
Expected behavior:
ifname processor to perfectly be able to do lookups in parallel.
Actual behavior:
Randomly getting these kind of errors:
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:
telegraf/plugins/processors/ifname/ifname.go
Lines 301 to 312 in 8265969