Composite Monitor Use Cases

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Overview

This guide lists non-exhaustive use cases for composite monitors. These examples illustrate how composite monitors can be configured to address various use cases in monitoring environments:

Error rates

Alert when the error rate exceeds a threshold only when hits are above a certain number.

Create two monitors:

  • Monitor A: Alert when trace.requests.request.errors / trace.requests.request.hits > X
  • Monitor B: Alert when trace.requests.request.hits > Y

Composite Monitor C: Alert when both Monitor A and Monitor B are in alert (A && B).

Monitor AMonitor BComposite Monitor C
Alert Error rate above thresholdAlert Hits above thresholdAlert
Alert Error rate above thresholdOK Hits below thresholdOK Only 1 condition met, no alert
OK Error rate below thresholdAlert Hits above thresholdOK Only 1 condition met, no alert

For more state combinations, see Composite Monitor.

Monitor frequent metrics

Monitor latency for services, ignoring occasional spikes due to low traffic. For example, a period of time during the night where services report very few values.

Create two monitors:

  • Monitor A: Alert when latency > X
  • Monitor B: Alert when sum:latency{*}.rollup(count) > Y over the last 1 hour

Composite Monitor C: Alert when both conditions are met.

Monitor AMonitor BComposite Monitor C
Alert Latency above thresholdAlert More than Y metricsAlert
Alert Latency above thresholdOK Less than Y metricsOK Not enough metrics
OK Latency below thresholdAlert More than Y metricsOK Latency below threshold

Step monitor

Trigger an alert in the absence of a paired metric. For example, log metrics for sent/received, down/up, or create/resolve. You can adjust the evaluation windows for the monitors if paired metrics are expected to be N minutes apart.

  • Monitor A: Alert when action:create is above 0
  • Monitor B: Alert when action:resolve is above 0

Composite: Alert if a && !b.

Monitor AMonitor BComposite Monitor C
Alert Action create above 0Alert Action resolve above 0OK
Alert Action create above 0OKAlert Action resolve not present
OKAlert Action resolve above 0OK

Renotifying on recovery

Renotify on recovery using two monitors with a timeshift.

  • Monitor A: Current metric status
  • Monitor B: Past metric status using timeshift

Composite Monitor: Logic is !a && b.

Monitor AMonitor BComposite Monitor C
Alert Real-time metricAlert Past metricOK
Alert Real-time metricOK Metric not triggeredOK
OK Metric not triggeredAlert Past metricAlert

Delay on notification

Alert after errors persist for a set duration. For example, a set of errors triggered for at least 15 minutes.

  • Monitor A: Real-time metric
  • Monitor B (timeshifted): Metric shifted by X minutes

Composite Monitor: Alert if a && b.

Monitor AMonitor B (timeshifted)Composite Monitor C
Alert Real-time metricAlert Past metricAlert
Alert Real-time metricOK Metric not triggeredOK
OK Metric not triggeredAlert Past metricOK

Further reading

Documentation, liens et articles supplémentaires utiles: