Metricpass on multiple metrics at once

Hello all

let’s say i have multiple metrics to filters depending of the value

this work for one metric

[[inputs.win_perf_counters]]
    metricpass = "fields.IO_Other_Bytes_persec > 0"

i tested different way, but it seems it don’t work.

[[inputs.win_perf_counters]]
    metricpass = "fields.IO_Other_Bytes_persec > 0","fields.IO_Read_Bytes_persec >0"

[[inputs.win_perf_counters]]
  metricpass = [
	"fields.IO_Data_Bytes_persec > 0",
	"fields.IO_Other_Bytes_persec > 0",
	"fields.IO_Read_Bytes_persec >0",
	"fields.IO_Write_Bytes_persec >0",
  ]	

Any suggestions?
regards
p.s.: it’s a derivateds question from this topics that is now resolved Do not send/ignore measurement if Value is Zero

How about the “logic” way of connecting your expression using a logical or?

[[inputs.win_perf_counters]]
  metricpass = 'fields.IO_Data_Bytes_persec > 0 || fields.IO_Other_Bytes_persec > 0 || fields.IO_Read_Bytes_persec >0 || fields.IO_Write_Bytes_persec >0'

Hi Srebhan

Thanks you, that definitively work.

1 Like