cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Metric Events Conditions

Babar_Qayyum
DynaMight Guru
DynaMight Guru

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

6 REPLIES 6

fcourbon
Dynatrace Participant
Dynatrace Participant

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

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Babar_Qayyum
DynaMight Guru
DynaMight Guru

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

Certified Dynatrace Professional | Certified Dynatrace Services Delivery - Observability & CloudOps | Dynatrace Partner - yourcompass.ca

Hello @Mohamed_Hamdy 

Thank you.

Regards,

Babar

Featured Posts