Loading...
Loading...
This skill should be used when the user asks to "manage alerts", "create alert", "list alerts", "check alert status", "enable alert", "disable alert", "investigate firing alerts", "check which alerts are active", "find alerting rules", "set up an alert", "configure alerting", "mute an alert", "silence an alert", "see alert definitions", "check alert priority", or wants to manage Coralogix alert definitions using the cx CLI.
npx skill4agent add coralogix/cx-cli cx-alertscx alerts| Command | Purpose | Key flags |
|---|---|---|
| List all alert definitions | |
| Get a single alert definition by ID | - |
| Create an alert from a JSON definition | |
| Enable an alert | - |
| Disable an alert | - |
| List alert trigger events | |
| Get alert event statistics | - |
| List suppression rules | - |
| Get a suppression rule | - |
| Create a suppression rule | |
| Update a suppression rule | |
| Delete a suppression rule | - |
-o json-o agentslistgetcreate-p <profile>| Type enum | Human name | Description |
|---|---|---|
| Logs Immediate | Trigger on every matching log entry |
| Logs Threshold | Trigger when log count exceeds a threshold in a time window |
| Logs Anomaly | ML-based anomaly detection on log volume |
| Logs Ratio Threshold | Trigger on ratio between two log queries |
| Logs New Value | Trigger when a new value appears in a field |
| Logs Unique Count | Trigger on unique value count threshold |
| Logs Time Relative | Compare current vs past time window |
| Metric Threshold | Trigger when a PromQL expression crosses a threshold |
| Metric Anomaly | ML-based anomaly detection on metrics |
| Tracing Immediate | Trigger on every matching span |
| Tracing Threshold | Trigger when span count exceeds a threshold |
| Flow | Sequence-based alert combining multiple conditions |
| Priority | Use case |
|---|---|
| P1 | Critical - pages on-call immediately |
| P2 | High - needs attention within the hour |
| P3 | Medium - investigate during business hours |
| P4 | Low - informational, check when convenient |
| P5 | Info - logging/tracking only |
alertDefPropertiesreferences/alert-schemas.mdcx alerts get <existing-id> -o jsonecho '<json>' | cx alerts createcx alerts create --from-file alert.jsoncx alerts list --name "<alert name>"type"ALERT_DEF_TYPE_LOGS_THRESHOLD""logsThreshold": {...}type{
"alertDefProperties": {
"name": "High Error Rate",
"description": "Alert when error logs exceed threshold",
"priority": "ALERT_DEF_PRIORITY_P2",
"type": "ALERT_DEF_TYPE_LOGS_THRESHOLD",
"enabled": true,
"logsThreshold": {
"logsFilter": {
"simpleFilter": {
"luceneQuery": "severity:ERROR",
"labelFilters": {
"applicationName": [
{ "operation": "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED", "value": "my-app" }
]
}
}
},
"rules": [{
"condition": {
"conditionType": "LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED",
"threshold": 100,
"timeWindow": {
"logsTimeWindowSpecificValue": "LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
}
}
}]
}
}
}{
"alertDefProperties": {
"name": "CPU Usage Critical",
"priority": "ALERT_DEF_PRIORITY_P1",
"type": "ALERT_DEF_TYPE_METRIC_THRESHOLD",
"enabled": true,
"metricThreshold": {
"metricFilter": { "promql": "avg(cpu_usage_percent)" },
"rules": [{
"condition": {
"conditionType": "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED",
"threshold": 90,
"ofTheLast": { "dynamicDuration": "5m" },
"forOverPct": 100
}
}]
}
}
}{
"alertDefProperties": {
"name": "OOM Killer Detected",
"description": "Alert immediately when OOM killer runs",
"priority": "ALERT_DEF_PRIORITY_P1",
"type": "ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED",
"enabled": true,
"logsImmediate": {
"logsFilter": {
"simpleFilter": {
"luceneQuery": "\"Out of memory\" OR \"OOM\"",
"labelFilters": {}
}
}
}
}
}# List all alerts and look for ALERTING status
cx alerts list -o json | jq '.[] | select(.status == "ALERTING")'
# Filter by name
cx alerts list --name "error"cx alerts get <alert-id>
cx alerts get <alert-id> -o jsoncx alerts disable <alert-id>
# Later, re-enable:
cx alerts enable <alert-id>| Command | Purpose |
|---|---|
| List all suppression rules |
| Get a suppression rule by ID |
| Create a suppression rule |
| Update a suppression rule |
| Delete a suppression rule |
# List suppression rules
cx alerts suppression-rules list -o json
# Create from template
cx alerts suppression-rules get <existing-id> -o json > suppression-rule.json
# Edit suppression-rule.json
cx alerts suppression-rules create --from-file suppression-rule.json--name-o jsonjq--from-file -references/alert-schemas.mdcx-incident-managementcx-observability-setupcx-telemetry-querying