16 May 2023 09:55 AM
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
Solved! Go to Solution.
16 May 2023 10:32 AM
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
16 May 2023 11:03 AM
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
16 May 2023 12:06 PM
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
16 May 2023 12:34 PM
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