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
+22-18Lines changed: 22 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ Prometheus
4
4
==========
5
5
6
6
By enabling this toolset, HolmesGPT will be able to generate graphs from prometheus metrics as well as help you write and
7
-
validate prometheus queries.
7
+
validate prometheus queries. HolmesGPT can also detect memory leak patterns, CPU throttling, lagging queues, and high
8
+
latency issues.
8
9
9
-
There is also an option for Holmes to analyze prometheus metrics. When enabled, HolmesGPT can detect memory leak patterns,
10
-
CPU throttling, high latency for your APIs, etc. The configuration field to enable prometheus metrics analysis is
11
-
``tool_calls_return_data``.
10
+
Prior to generating a PromQL query, HolmesQPT tends to list the available metrics. This is done to ensure the metrics used
11
+
in PromQL are actually available.
12
12
13
13
Configuration
14
14
-------------
@@ -25,11 +25,6 @@ Configuration
25
25
enabled: true
26
26
config:
27
27
prometheus_url: http://<prometheus host>:9090
28
-
metrics_labels_time_window_hrs: 48# default value
29
-
metrics_labels_cache_duration_hrs: 12# default value
30
-
fetch_labels_with_labels_api: false # default value
31
-
fetch_metadata_with_series_api: false # default value
32
-
tool_calls_return_data: false # default value
33
28
headers:
34
29
Authorization: "Basic <base_64_encoded_string>"
35
30
@@ -47,28 +42,37 @@ Configuration
47
42
enabled: true
48
43
config:
49
44
prometheus_url: http://<prometheus host>:9090
50
-
metrics_labels_time_window_hrs: 48# default value
51
-
metrics_labels_cache_duration_hrs: 12# default value
52
-
fetch_labels_with_labels_api: false # default value
53
-
fetch_metadata_with_series_api: false # default value
54
-
tool_calls_return_data: false # default value
55
45
headers:
56
46
Authorization: "Basic <base_64_encoded_string>"
57
47
58
48
It is also possible to set the ``PROMETHEUS_URL`` environment variable instead of the above ``prometheus_url`` config key.
59
49
60
-
Prior to generating a PromQL query, HolmesQPT tends to list the available metrics. This is done to ensure the metrics used
61
-
in PromQL are actually available.
50
+
**Advanced configuration**
62
51
63
52
Below is the full list of options for this toolset:
64
53
54
+
.. code-block:: yaml
55
+
56
+
prometheus/metrics:
57
+
enabled: true
58
+
config:
59
+
prometheus_url: http://<prometheus host>:9090
60
+
headers:
61
+
Authorization: "Basic <base_64_encoded_string>"
62
+
metrics_labels_time_window_hrs: 48# default value
63
+
metrics_labels_cache_duration_hrs: 12# default value
64
+
fetch_labels_with_labels_api: false # default value
65
+
fetch_metadata_with_series_api: false # default value
66
+
tool_calls_return_data: true # default value
67
+
68
+
65
69
- **prometheus_url** A base URL for prometheus. This should include the protocol (e.g. `https`) and the port.
70
+
- **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/>`_.
66
71
- **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.
67
72
- **metrics_labels_cache_duration_hrs** How long are labels cached, in hours. Set it to ``null`` to disable caching.
68
73
- **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.
69
74
- **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.).
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.
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/>`_.
75
+
- **tool_calls_return_data** Defaults to ``true``. If ``false``, no prometheus data will be returned to HolmesGPT. Set it to ``false`` if you frequently reach the token limit when using this toolset. Setting this setting to ``false`` will also disable HolmesGPT's ability to analyze prometheus data.
0 commit comments