-
Notifications
You must be signed in to change notification settings - Fork 307
ROB-699: docs for HolmesGPT prometheus toolset #1733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3f2025e
doc: add initial prometheus docs
nherment fdcef9b
doc: add more config to prometheus toolset. Add datetime toolset.
nherment de84f60
Merge branch 'master' into initial_prometheus_toolset_docs
nherment c794ba1
Merge branch 'master' into initial_prometheus_toolset_docs
nherment 5cbc5e2
Merge branch 'master' into initial_prometheus_toolset_docs
nherment a6c5f5b
doc: update Prometheus troolset docs to reflect new features
nherment b4ee323
Merge branch 'master' into initial_prometheus_toolset_docs
nherment 70afbc6
Merge branch 'master' into initial_prometheus_toolset_docs
nherment 2304a4b
doc: update prometheus docs, add holmes CLI config
nherment 28a1cbd
doc: fix incorrect indentation
nherment File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| Datetime :checkmark:`_` | ||
| ======================= | ||
| .. include:: ./_toolset_enabled_by_default.inc.rst | ||
|
|
||
| By enabling this toolset, HolmesGPT will be able to get the current UTC date and time. | ||
| This feature works well with other toolsets. For example, the :doc:`prometheus <prometheus>` | ||
| toolset needs ``start`` and ``end`` time parameters to properly create and execute | ||
| PromQL queries. | ||
|
|
||
| Configuration | ||
| ------------- | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| holmes: | ||
| toolsets: | ||
| datetime: | ||
| enabled: true | ||
|
|
||
| .. include:: ./_toolset_configuration.inc.rst | ||
|
|
||
| Capabilities | ||
| ------------ | ||
| .. include:: ./_toolset_capabilities.inc.rst | ||
|
|
||
| .. list-table:: | ||
| :header-rows: 1 | ||
| :widths: 30 70 | ||
|
|
||
| * - Tool Name | ||
| - Description | ||
| * - get_current_time | ||
| - Return current time information. Useful to build queries that require a time information |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| Prometheus | ||
| ========== | ||
|
|
||
| By enabling this toolset, HolmesGPT will be able to generate graphs from prometheus metrics as well as help you write and | ||
| validate prometheus queries. | ||
|
|
||
| There is also an option for Holmes to analyze prometheus metrics. When enabled, HolmesGPT can detect memory leak patterns, | ||
| CPU throttling, high latency for your APIs, etc. The configuration field to enable prometheus metrics analysis is | ||
| `tool_calls_return_data`. | ||
|
|
||
| Configuration | ||
| ------------- | ||
|
|
||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| holmes: | ||
| toolsets: | ||
| prometheus/metrics: | ||
| enabled: true | ||
| config: | ||
| prometheus_url: http://robusta-kube-prometheus-st-prometheus.default.svc.cluster.local:9090 | ||
|
|
||
|
|
||
| It is also possible to set the ``PROMETHEUS_URL`` environment variable instead of the above ``prometheus_url`` config key. | ||
|
|
||
| .. include:: ./_toolset_configuration.inc.rst | ||
|
|
||
| Prior to generating a PromQL query, HolmesQPT tends to list the available metrics. This is done to ensure the metrics used | ||
| in PromQL are actually available. | ||
|
|
||
| Below is the full list of options for this toolset: | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| holmes: | ||
| toolsets: | ||
| prometheus/metrics: | ||
| enabled: true | ||
| config: | ||
| prometheus_url: ... | ||
| metrics_labels_time_window_hrs: 48 # default value | ||
| metrics_labels_cache_duration_hrs: 12 # default value | ||
| fetch_labels_with_labels_api: false # default value | ||
| fetch_metadata_with_series_api: false # default value | ||
| tool_calls_return_data: false # default value | ||
| headers: | ||
| Authorization: "Basic <base_64_encoded_string>" | ||
|
|
||
|
|
||
| - **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. | ||
| - **metrics_labels_cache_duration_hrs** How long are labels cached, in hours. Set it to ``null`` to disable caching. | ||
| - **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. | ||
| - **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.). | ||
| - **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. | ||
| - **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/>`_. | ||
|
|
||
| Capabilities | ||
| ------------ | ||
| .. include:: ./_toolset_capabilities.inc.rst | ||
|
|
||
| .. list-table:: | ||
| :header-rows: 1 | ||
| :widths: 30 70 | ||
|
|
||
| * - Tool Name | ||
| - Description | ||
| * - list_available_metrics | ||
| - List all the available metrics to query from prometheus, including their types (counter, gauge, histogram, summary) and available labels. | ||
| * - execute_prometheus_instant_query | ||
| - Execute an instant PromQL query | ||
| * - execute_prometheus_range_query | ||
| - Execute a PromQL range query | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.