fix: procstat tags were not getting generated correctly (#9973)
Fixes: #9961
This commit is contained in:
parent
90eeee7824
commit
85a7fbc13f
|
|
@ -154,13 +154,18 @@ func (p *Procstat) Gather(acc telegraf.Accumulator) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tags := make(map[string]string)
|
|
||||||
p.procs = newProcs
|
p.procs = newProcs
|
||||||
for _, proc := range p.procs {
|
for _, proc := range p.procs {
|
||||||
tags = proc.Tags()
|
|
||||||
p.addMetric(proc, acc, now)
|
p.addMetric(proc, acc, now)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tags := make(map[string]string)
|
||||||
|
for _, pidTag := range pidTags {
|
||||||
|
for key, value := range pidTag.Tags {
|
||||||
|
tags[key] = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fields := map[string]interface{}{
|
fields := map[string]interface{}{
|
||||||
"pid_count": pidCount,
|
"pid_count": pidCount,
|
||||||
"running": len(p.procs),
|
"running": len(p.procs),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue