Skip to content

Commit a6c5f5b

Browse files
committed
doc: update Prometheus troolset docs to reflect new features
1 parent 5cbc5e2 commit a6c5f5b

1 file changed

Lines changed: 21 additions & 6 deletions

File tree

docs/configuration/holmesgpt/toolsets/prometheus.rst

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
Prometheus
22
==========
33

4-
By enabling this toolset, HolmesGPT will be able to analyze prometheus metrics and generate graphs from these metrics.
5-
This gives HolmesGPT the ability to detect memory leak patterns, CPU throttling, high latency for your APIs, etc.
4+
By enabling this toolset, HolmesGPT will be able to generate graphs from prometheus metrics as well as help you write and
5+
validate prometheus queries.
6+
7+
There is also an option for Holmes to analyze prometheus metrics. When enabled, HolmesGPT can detect memory leak patterns,
8+
CPU throttling, high latency for your APIs, etc. The configuration field to enable prometheus metrics analysis is
9+
`tool_calls_return_data`.
610

711
Configuration
812
-------------
@@ -12,33 +16,44 @@ Configuration
1216
1317
holmes:
1418
toolsets:
15-
opensearch/status:
19+
prometheus/metrics:
1620
enabled: true
1721
config:
1822
prometheus_url: http://robusta-kube-prometheus-st-prometheus.default.svc.cluster.local:9090
1923
24+
2025
It is also possible to set the ``PROMETHEUS_URL`` environment variable instead of the above ``prometheus_url`` config key.
2126

2227
.. include:: ./_toolset_configuration.inc.rst
2328

2429
Prior to generating a PromQL query, HolmesQPT tends to list the available metrics. This is done to ensure the metrics used
25-
in PromQL are actually available. The result of the request to fetch the labels available for each metric is cached. The
26-
request and the caching behaviour (TTL) can be tweaked:
30+
in PromQL are actually available.
31+
32+
Below is the full list of options for this toolset:
2733

2834
.. code-block:: yaml
2935
3036
holmes:
3137
toolsets:
32-
opensearch/status:
38+
prometheus/metrics:
3339
enabled: true
3440
config:
3541
prometheus_url: ...
3642
metrics_labels_time_window_hrs: 48 # default value
3743
metrics_labels_cache_duration_hrs: 12 # default value
44+
fetch_labels_with_labels_api: false # default value
45+
fetch_metadata_with_series_api: false # default value
46+
tool_calls_return_data: false # default value
47+
headers:
48+
Authorization: "Basic <base_64_encoded_string>"
3849
3950
4051
- **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.
4152
- **metrics_labels_cache_duration_hrs** How long are labels cached, in hours. Set it to ``null`` to disable caching.
53+
- **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.
54+
- **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.).
55+
- **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.
56+
- **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/>`_.
4257

4358
Capabilities
4459
------------

0 commit comments

Comments
 (0)