Summary
Add an optional cluster parameter to the get_active_alerts MCP tool so users can list firing alerts for a specific cluster (or set of clusters), instead of always returning every alert in the TSDB.
Background
get_active_alerts calls Prometheus's /api/v1/alerts endpoint directly and returns the full list with no filter parameter. In multi-cluster Harvest deployments this is often too noisy — operators usually want "what's firing in prod-east-1?" not "what's firing across all 30 clusters?".
Proposed enhancement
Add an optional argument:
cluster — exact cluster name, or
cluster_match — regex pattern matched against the cluster label of each alert.
After fetching alerts from /api/v1/alerts, filter the returned list (and the severity counts) so only alerts whose labels.cluster matches the requested cluster(s) are included. When omitted, behavior is unchanged.
Use cases
- "Any active alerts in
prod-east-1?"
- Drilling down from
infrastructure_health to per-cluster alert details.
- Per-datacenter chatbot/ops conversations.
Notes
Filed as part of a NAbox chatbot integration review. The other harvest-mcp query tools allow cluster scoping via PromQL label matchers; get_active_alerts and infrastructure_health are the two "what's wrong?" tools that currently can't be narrowed to a cluster. (Companion issue: #4286.)
Summary
Add an optional
clusterparameter to theget_active_alertsMCP tool so users can list firing alerts for a specific cluster (or set of clusters), instead of always returning every alert in the TSDB.Background
get_active_alertscalls Prometheus's/api/v1/alertsendpoint directly and returns the full list with no filter parameter. In multi-cluster Harvest deployments this is often too noisy — operators usually want "what's firing inprod-east-1?" not "what's firing across all 30 clusters?".Proposed enhancement
Add an optional argument:
cluster— exact cluster name, orcluster_match— regex pattern matched against theclusterlabel of each alert.After fetching alerts from
/api/v1/alerts, filter the returned list (and the severity counts) so only alerts whoselabels.clustermatches the requested cluster(s) are included. When omitted, behavior is unchanged.Use cases
prod-east-1?"infrastructure_healthto per-cluster alert details.Notes
Filed as part of a NAbox chatbot integration review. The other harvest-mcp query tools allow cluster scoping via PromQL label matchers;
get_active_alertsandinfrastructure_healthare the two "what's wrong?" tools that currently can't be narrowed to a cluster. (Companion issue: #4286.)