get_alerts_by_state
Filter Kubernetes alerts by state (active, suppressed, or all) to monitor and analyze alert status using the Karma Alert dashboard.
Instructions
Get alerts filtered by state (active, suppressed, or all)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes |
Implementation Reference
- src/karma_mcp/server.py:1320-1333 (handler)Implementation of the 'get_alerts_by_state' tool, which filters alerts based on the 'state' parameter ('active', 'suppressed', or 'all') by calling the respective list function.
for matcher_str in matchers.split(","): if "=" in matcher_str: key, value = matcher_str.split("=", 1) silence_matchers.append( { "name": key.strip(), "value": value.strip(), "isRegex": False, "isEqual": True, } ) # Create silence request {