Metric Events Conditions

Dear All,

Is there a way to apply a condition on the metric events to exclude a particular host from the below built-in rule?

builtin:host.cpu.steal:filter(existsKey(“dt.entity.host”),not(remainder(“dt.entity.host”))):avg

Regards,

Babar

Would the query below work?

builtin:host.cpu.steal:filter(ne("dt.entity.host","HOST-3AA8614244B22695"),existsKey("dt.entity.host"),not(remainder("dt.entity.host"))):avg

Hello @fcourbon

Thank you.

The following query should work, but how to use it in the metric events?

builtin:host.cpu.steal:filter(existsKey("dt.entity.host"),ne("dt.entity.host","HOST-E90312219E625BC0"),not(remainder("dt.entity.host"))):avg

Regards,

Babar

Hi,

I would say using a metric selector event.

Best regards

Hello @AntonPineiro & @fcourbon

Thank you.

Please help me to merge the following two queries to include the osType with the ne (to exclude the host).

builtin:host.cpu.steal:filter(and(or(in("dt.entity.host",entitySelector("type(host),osType(~"LINUX~")"))))):splitBy("dt.entity.host"):avg
builtin:host.cpu.steal:filter(existsKey("dt.entity.host"),ne("dt.entity.host","HOST-E90312219E625BC0"),not(remainder("dt.entity.host"))):avg

Regards,

Babar

Hi @Babar_Qayyum ,

I think it will be something like this:

builtin:host.cpu.steal:filter(and(or(in(“dt.entity.host”,entitySelector(“type(host),osType(~“LINUX~”)”))),existsKey(“dt.entity.host”),ne(“dt.entity.host”,“HOST-E90312219E625BC0”),not(remainder(“dt.entity.host”)))):splitBy(“dt.entity.host”):avg

Hello @Mohamed_Hamdy

Thank you.

Regards,

Babar