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

Using numeric comparison in filter

sampathkumar
Observer

i need to create metric event where disk free  between  10%- 20%   . tried with  some metrics . but not working 

following return no data

builtin:host.disk.available:filter(host.disk.available> 10):splitBy("dt.entity.host",dt.entity.disk):sort(value(auto,descending))

and more over how ti reference disk name .if i want exclude certain disk from monitoring 

 

 

 

3 REPLIES 3

mark_bley
Dynatrace Champion
Dynatrace Champion

Not possible to have such logic in the metric query.

What you can do is create a warning metric event if the threshold passes de 20% threshold, and once it is less than 10% you send out a critical one.

This requires 2 separate metric events, but these will just be 2 metric-selector-based configurations.

https://docs.dynatrace.com/docs/shortlink/metric-events-metric-selector-events

These events may be filtered by an alerting profile that triggers just an email or slack to inform about a warning, or in the critical case could open up a ticket, this is just an example.

1. //metric event if the threshold passes de 20%//  how can i set it . 

    for example i keep  1.  warning  < 20 %  and 2. critical for <10%  . can i set order or metricevent execution. 

will this work 1. builtin:host.disk.free:filter(and(in("dt.entity.host", entitySelector("type(~"HOST~"),entityName(~"xxxx~")")),series(value,ge(77)),series(value,lt(90))))

2.  builtin:host.disk.free:filter(and(in("dt.entity.host", entitySelector("type(~"HOST~"),entityName(~"xxxx~")")),series(value,gt(77))))

 

And one more question. how can i add tags or custom metric data into alert description .

 i need customer metric for specific servers, specific mount point on some server. 

will all metric event evaluated always for all metrics 

  1.  both will get triggered if less than 10% is reached
  2. you can only alert on static threshold either above or below

You can add event properties which you can use to filter these events in an alerting profile or further down the line if forwarded to any ITSM.

mark_bley_0-1718103727464.png

 

Featured Posts