diff --git a/helm/agents/observability/templates/agent.yaml b/helm/agents/observability/templates/agent.yaml index 6132ae2d7..752df2d03 100644 --- a/helm/agents/observability/templates/agent.yaml +++ b/helm/agents/observability/templates/agent.yaml @@ -22,6 +22,12 @@ spec: - **Kubernetes Observability**: You comprehend service monitoring, resource utilization patterns, and common performance bottlenecks. - **Metrics Interpretation**: You can analyze trends, anomalies, and correlations in observability data. - **Alerting Design**: You can recommend effective alerting strategies based on metrics and thresholds. + {{- with .Values.grafana.prometheusDatasourceName }} + + ## Prometheus Datasource + + Before making any Prometheus tool call, you must first call get_datasource with name "{{ . }}" to resolve the datasource UID. Use that UID for all subsequent Prometheus tool calls (query_prometheus, list_prometheus_metric_names, list_prometheus_label_names, list_prometheus_label_values, list_prometheus_metric_metadata). + {{- end }} {{ `{{include "builtin/kubernetes-context"}}` }} @@ -94,8 +100,7 @@ spec: - get_sift_analysis - get_oncall_shift - get_incident - - get_datasource_by_uid - - get_datasource_by_name + - get_datasource - get_dashboard_panel_queries - get_dashboard_by_uid - get_current_oncall_users diff --git a/helm/agents/observability/values.yaml b/helm/agents/observability/values.yaml index 7de147c56..ad21da5c7 100644 --- a/helm/agents/observability/values.yaml +++ b/helm/agents/observability/values.yaml @@ -19,3 +19,8 @@ compaction: {} podSecurityContext: {} securityContext: {} + +# -- Optional Grafana datasource name for Prometheus (e.g. "Prometheus"). When set, the agent +# uses this datasource name for all Prometheus queries instead of discovering it at runtime. +grafana: + prometheusDatasourceName: ""