no gather extend metrics if len(pids) == 0
This commit is contained in:
parent
a8b13de71a
commit
544aa71ba6
|
@ -154,6 +154,10 @@ func (s *Procstat) gatherOnce(slist *list.SafeList, ins *Instance) {
|
|||
}
|
||||
|
||||
slist.PushFront(inputs.NewSample("lookup_count", len(pids), tags))
|
||||
if len(pids) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
if len(ins.GatherMoreMetrics) == 0 {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue