Composite Monitors
Composite monitors allow you to create monitors based on combinations of other monitors. This is useful when you need to alert on complex conditions that depend on multiple monitors.
What are Composite Monitors?
Composite monitors use the ALERTS metric, which is automatically generated by Oodle for all active alerts.
By querying this metric, you can create monitors that trigger based on the state of other monitors.
Creating a Composite Monitor
To create a composite monitor, you'll use the ALERTS metric in your PromQL query.
Each alert has several labels that you can filter on:
_oodle_monitor_id: The unique ID of the monitor that generated the alertalertstate: The current state of the alert (firingorpending)alertname: The name of the alert_oodle_severity: The severity level (critical,warnorno_data)
Basic Example: AND Logic
To alert when both Monitor A and Monitor B are firing:
(
count(ALERTS{
_oodle_monitor_id="<monitor-a-id>",
alertstate="firing"
})
)
and
(
count(ALERTS{
_oodle_monitor_id="<monitor-b-id>",
alertstate="firing"
})
)
This composite monitor will only trigger when both specified monitors are actively firing. Set the condition to trigger when the result is greater than 0, indicating both alerts are firing.
OR Logic Example
To alert when either Monitor A or Monitor B is firing:
count(ALERTS{
_oodle_monitor_id=~"<monitor-a-id>|<monitor-b-id>",
alertstate="firing"
})
Severity-Based Composite Monitor
To alert when any critical alert from a specific set of monitors is firing:
count(ALERTS{
_oodle_monitor_id=~"monitor-id-1|monitor-id-2",
alertstate="firing",
_oodle_severity="critical"
})
Finding Monitor IDs
To create composite monitors, you'll need the monitor IDs of the monitors you want to combine. You can find a monitor's ID:
- Navigate to the monitor in the Oodle UI
- The monitor ID is displayed in the URL params
- You can also use labels to identify monitors instead of IDs
Support
If you have any questions or need any assistance, please contact us via our help chat app located at the bottom-right of the page or by reaching out to support@oodle.ai.