You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration/holmesgpt/toolsets/prometheus.rst
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Configuration
24
24
prometheus/metrics:
25
25
enabled: true
26
26
config:
27
-
prometheus_url: ...
27
+
prometheus_url: http://<prometheus host>:9090
28
28
metrics_labels_time_window_hrs: 48# default value
29
29
metrics_labels_cache_duration_hrs: 12# default value
30
30
fetch_labels_with_labels_api: false # default value
@@ -46,7 +46,7 @@ Configuration
46
46
prometheus/metrics:
47
47
enabled: true
48
48
config:
49
-
prometheus_url: ...
49
+
prometheus_url: http://<prometheus host>:9090
50
50
metrics_labels_time_window_hrs: 48# default value
51
51
metrics_labels_cache_duration_hrs: 12# default value
52
52
fetch_labels_with_labels_api: false # default value
@@ -62,13 +62,26 @@ in PromQL are actually available.
62
62
63
63
Below is the full list of options for this toolset:
64
64
65
+
- **prometheus_url** A base URL for prometheus. This should include the protocol (e.g. `https`) and the port.
65
66
- **metrics_labels_time_window_hrs** Represents the time window, in hours, over which labels are fetched. This avoids fetching obsolete labels. Set it to ``null`` to let HolmesGPT fetch labels regardless of when they were generated.
66
67
- **metrics_labels_cache_duration_hrs** How long are labels cached, in hours. Set it to ``null`` to disable caching.
67
68
- **fetch_labels_with_labels_api** Uses prometheus `labels API <https://prometheus.io/docs/prometheus/latest/querying/api/#getting-label-names>`_ to fetch labels instead of the `series API <https://prometheus.io/docs/prometheus/latest/querying/api/#finding-series-by-label-matchers>`_. In some cases setting to True can improve the performance of the toolset, however there will be an increased number of HTTP calls to prometheus. You can experiment with both as they are functionally identical.
68
69
- **fetch_metadata_with_series_api** Uses the `series API <https://prometheus.io/docs/prometheus/latest/querying/api/#finding-series-by-label-matchers>`_ instead of the `metadata API <https://prometheus.io/docs/prometheus/latest/querying/api/#querying-metric-metadata>`_. You should only set this value to `true` if the metadata API is disabled or not working. HolmesGPT's ability to select the right metric will be negatively impacted because the series API does not return key metadata like the metrics/series description or their type (gauge, histogram, etc.).
69
70
- **tool_calls_return_data** Experimental. If true, the prometheus data will be available to HolmesGPT. In some cases, HolmesGPT will be able to detect memory leaks or other anomalies. This is disabled by default to reduce the likelyhood of reaching the input token limit.
70
71
- **headers** Extra headers to pass to all prometheus http requests. Use this to pass authentication. Prometheus `supports basic authentication <https://prometheus.io/docs/guides/basic-auth/>`_.
71
72
73
+
**Finding the prometheus URL**
74
+
75
+
The best way to find the prometheus URL is to use "ask holmes". This only works if your cluster is live and already connected to Robusta.
76
+
77
+
If not, follow these steps:
78
+
79
+
1. Run ``kubectl get services -n <monitoring-namespace>`` to list all services. Replace ``<monitoring-namespace>`` with the namespace where Prometheus is deployed. This is often ``monitoring`` or ``prometheus``. You can also run ``kubectl get services -A`` which will list all services in all namespaces.
80
+
2. Identify which are the namespace and name of your Prometheus service. You can set up port forwarding to test if the service is correct and if Prometheus is reachable.
81
+
3. Run ``kubectl describe service <service-name> -n <namespace>`` to get details about the service, including the cluster IP and port.
82
+
4. Set the DNS or the cluster IP as well as the port to the configuration field ``prometheus_url`` as mentioned above.
0 commit comments