Skip to content

Commit 1c69ea7

Browse files
authored
ROB-1267: update docs for logging toolsets due to unified logging refactor (#1823)
* ROB-1267: update docs for logging toolsets due to unified logging refactor
1 parent 1d679bc commit 1c69ea7

11 files changed

Lines changed: 207 additions & 81 deletions

docs/configuration/holmesgpt/builtin_toolsets.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Builtin Toolsets
1919
toolsets/kafka
2020
toolsets/kubernetes
2121
toolsets/notion
22-
toolsets/opensearch
22+
toolsets/opensearch_logs
23+
toolsets/opensearch_status
2324
toolsets/prometheus
2425
toolsets/rabbitmq
2526
toolsets/robusta
@@ -105,9 +106,14 @@ by the user by providing credentials or API keys to external systems.
105106
:link: toolsets/notion
106107
:link-type: doc
107108

108-
.. grid-item-card:: :octicon:`cpu;1em;` OpenSearch
109+
.. grid-item-card:: :octicon:`cpu;1em;` OpenSearch logs
109110
:class-card: sd-bg-light sd-bg-text-light
110-
:link: toolsets/opensearch
111+
:link: toolsets/opensearch_logs
112+
:link-type: doc
113+
114+
.. grid-item-card:: :octicon:`cpu;1em;` OpenSearch status
115+
:class-card: sd-bg-light sd-bg-text-light
116+
:link: toolsets/opensearch_status
111117
:link-type: doc
112118

113119
.. grid-item-card:: :octicon:`cpu;1em;` Prometheus

docs/configuration/holmesgpt/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ Builtin toolsets
365365

366366
Built-in toolsets cover essential areas like pod status inspection, node health analysis,
367367
application diagnostics, and resource utilization monitoring. These toolsets include access to
368-
Kubernetes events and logs, AWS, Grafana, Opensearch, etc. See the full list :doc:`here <builtin_toolsets>`.
368+
Kubernetes events and logs, AWS, Grafana, OpenSearch, etc. See the full list :doc:`here <builtin_toolsets>`.
369369

370370
Custom toolsets
371371
----------------
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Disabling the Default Logging Toolset
3+
*****************************************
4+
5+
The default HolmesGPT logging tool **must** be disabled if you use a different datasource for logs.
6+
HolmesGPT may still use kubectl to fetch logs and never call your datasource if ``kubernetes/logs`` is not disabled.
7+
To disable the default logging toolset, add the following to your holmes configuration:
8+
9+
.. md-tab-set::
10+
11+
.. md-tab-item:: Robusta Helm Chart
12+
13+
.. code-block:: yaml
14+
15+
holmes:
16+
toolsets:
17+
kubernetes/logs:
18+
enabled: false
19+
20+
21+
.. include:: ./_toolset_configuration.inc.rst
22+
23+
.. md-tab-item:: Holmes CLI
24+
25+
Add the following to **~/.holmes/config.yaml**, creating the file if it doesn't exist:
26+
27+
.. code-block:: yaml
28+
29+
toolsets:
30+
kubernetes/logs:
31+
enabled: false
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
HolmesGPT provides several out-of-the-box alternatives for log access. You can select from these options:
22

3-
* :ref:`kubernetes/logs <toolset_kubernetes_logs>`: Access logs with ``kubectl logs`` commands. **This is the default toolset.**
3+
* :ref:`kubernetes/logs <toolset_kubernetes_logs>`: Access logs directly through Kubernetes. **This is the default toolset.**
44
* :ref:`coralogix/logs <toolset_coralogix_logs>`: Access logs through Coralogix.
55
* :ref:`grafana/loki <toolset_grafana_loki>`: Access Loki logs by proxying through a Grafana instance.
6+
* :ref:`opensearch/logs <toolset_opensearch_logs>`: Access logs through OpenSearch.

docs/configuration/holmesgpt/toolsets/coralogix_logs.rst

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
Coralogix logs
44
==============
55

6-
By enabling this toolset, HolmesGPT will fetch node and pods logs from `Coralogix <https://coralogix.com/>`_.
6+
By enabling this toolset, HolmesGPT will fetch pod logs from `Coralogix <https://coralogix.com/>`_.
77

88
You **should** enable this toolset to replace the default :ref:`kubernetes/logs <toolset_kubernetes_logs>`
9-
toolset if all your kubernetes/pod logs are consolidated inside Coralogix. It will make it easier for HolmesGPT
9+
toolset if all your kubernetes pod logs are consolidated inside Coralogix. It will make it easier for HolmesGPT
1010
to fetch incident logs, including the ability to precisely consult past logs.
1111

1212

@@ -43,7 +43,7 @@ Configuration
4343
team_hostname: my-team # Your team's hostname in coralogix, without the domain part
4444
4545
kubernetes/logs:
46-
enabled: false # Disable HolmesGPT's default logging mechanism
46+
enabled: false # HolmesGPT's default logging mechanism MUST be disabled
4747
4848
4949
.. include:: ./_toolset_configuration.inc.rst
@@ -63,13 +63,13 @@ Configuration
6363
team_hostname: my-team # Your team's hostname in coralogix
6464
6565
kubernetes/logs:
66-
enabled: false # Disable HolmesGPT's default logging mechanism
66+
enabled: false # HolmesGPT's default logging mechanism MUST be disabled
6767
6868
Advanced Configuration
6969
^^^^^^^^^^^^^^^^^^^^^^
7070

7171
Frequent logs and archive
72-
****************************
72+
*************************
7373

7474
By default, holmes fetched the logs from the `Frequent search <https://coralogix.com/docs/user-guides/account-management/tco-optimizer/logs/#frequent-search-data-high-priority>`_
7575
tier and only fetch logs from the `Archive` tier if the frequent search returned no result.
@@ -100,10 +100,10 @@ Here is a description of each possible log retrieval methodology:
100100
- **BOTH_FREQUENT_SEARCH_AND_ARCHIVE** Always use both the frequent search and the archive to fetch logs. The result contains merged data which is deduplicated and sorted by timestamp.
101101

102102
Search labels
103-
***************
103+
*************
104104

105105
You can tweak the labels used by the toolset to identify kubernetes resources. This is **optional** and only needed if your
106-
logs settings for ``pod``, ``namespace``, ``application`` and ``subsystem`` differ from the defaults in the example below.
106+
logs settings for ``pod`` and ``namespace`` differ from the defaults in the example below.
107107

108108
.. code-block:: yaml
109109
@@ -114,8 +114,6 @@ logs settings for ``pod``, ``namespace``, ``application`` and ``subsystem`` diff
114114
labels: # OPTIONAL: tweak the filters used by HolmesGPT if your coralogix configuration is non standard
115115
namespace: "kubernetes.namespace_name"
116116
pod: "kubernetes.pod_name"
117-
application: "coralogix.metadata.applicationName"
118-
subsystem: "coralogix.metadata.subsystemName"
119117
...
120118
121119
@@ -126,19 +124,8 @@ You can verify what labels to use by attempting to run a query in the coralogix
126124
:align: center
127125

128126

129-
Disabling the default toolset
130-
*********************************
131127

132-
If Coralogix is your primary datasource for logs, it is **advised** to disable the default HolmesGPT logging
133-
tool by disabling the ``kubernetes/logs`` toolset. Without this. HolmesGPT may still use kubectl to
134-
fetch logs instead of Coralogix.
135-
136-
.. code-block:: yaml
137-
138-
holmes:
139-
toolsets:
140-
kubernetes/logs:
141-
enabled: false
128+
.. include:: ./_disable_default_logging_toolset.inc.rst
142129

143130

144131
Capabilities
@@ -152,5 +139,5 @@ Capabilities
152139

153140
* - Tool Name
154141
- Description
155-
* - fetch_coralogix_logs_for_resource
142+
* - fetch_pod_logs
156143
- Retrieve logs using coralogix

docs/configuration/holmesgpt/toolsets/grafanaloki.rst

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Loki
44
====
55

6-
By enabling this toolset, HolmesGPT will fetch node and pods logs from `Loki <https://grafana.com/oss/loki/>`_.
6+
By enabling this toolset, HolmesGPT will fetch pod logs from `Loki <https://grafana.com/oss/loki/>`_.
77
Loki can be accessed directly or by proxying through a `Grafana <https://grafana.com/oss/grafana/>`_ instance.
88

99
You **should** enable this toolset to replace the default :ref:`kubernetes/logs <toolset_kubernetes_logs>`
@@ -20,7 +20,7 @@ Proxying through Grafana
2020
This is the recommended approach because we intend to add more capabilities to the toolset that are only available with Grafana.
2121

2222
Prerequisites
23-
-------------
23+
*************
2424

2525
A `Grafana service account token <https://grafana.com/docs/grafana/latest/administration/service-accounts/>`_
2626
with the following permissions:
@@ -79,7 +79,7 @@ A simple way to get the datasource UID is to access the Grafana API by running t
7979
8080
8181
Configuration (grafana proxy)
82-
-----------------------------
82+
*****************************
8383

8484

8585
.. md-tab-set::
@@ -98,7 +98,7 @@ Configuration (grafana proxy)
9898
grafana_datasource_uid: <the UID of the loki data source in Grafana>
9999
100100
kubernetes/logs:
101-
enabled: false # Disable HolmesGPT's default logging mechanism
101+
enabled: false # HolmesGPT's default logging mechanism MUST be disabled
102102
103103
104104
.. include:: ./_toolset_configuration.inc.rst
@@ -118,7 +118,7 @@ Configuration (grafana proxy)
118118
grafana_datasource_uid: <the UID of the loki data source in Grafana>
119119
120120
kubernetes/logs:
121-
enabled: false # Disable HolmesGPT's default logging mechanism
121+
enabled: false # HolmesGPT's default logging mechanism MUST be disabled
122122
123123
Direct connection
124124
^^^^^^^^^^^^^^^^^
@@ -128,7 +128,7 @@ This is done by not setting the ``grafana_datasource_uid`` field. Not setting th
128128
assume that it is directly connecting to Loki.
129129

130130
Configuration (direct connection)
131-
---------------------------------
131+
*********************************
132132

133133
.. md-tab-set::
134134

@@ -146,7 +146,7 @@ Configuration (direct connection)
146146
X-Scope-OrgID: "<tenant id>" # Set the X-Scope-OrgID if loki multitenancy is enabled
147147
148148
kubernetes/logs:
149-
enabled: false # Disable HolmesGPT's default logging mechanism
149+
enabled: false # HolmesGPT's default logging mechanism MUST be disabled
150150
151151
152152
.. include:: ./_toolset_configuration.inc.rst
@@ -166,13 +166,14 @@ Configuration (direct connection)
166166
X-Scope-OrgID: "<tenant id>" # Set the X-Scope-OrgID if loki multitenancy is enabled
167167
168168
kubernetes/logs:
169-
enabled: false # Disable HolmesGPT's default logging mechanism
169+
enabled: false # HolmesGPT's default logging mechanism MUST be disabled
170170
171171
172172
Advanced configuration
173173
^^^^^^^^^^^^^^^^^^^^^^
174174

175-
**Search labels**
175+
Search labels
176+
*************
176177

177178
You can tweak the labels used by the toolset to identify kubernetes resources. This is only needed if your
178179
Loki logs settings for ``pod``, and ``namespace`` differ from the defaults in the example above.
@@ -223,19 +224,7 @@ Use the following commands to list Loki's labels and determine which ones to use
223224
curl http://localhost:3100/loki/api/v1/labels
224225
225226
226-
**Disabling the default toolset**
227-
228-
If Loki is your primary datasource for logs, it is **advised** to disable the default HolmesGPT logging
229-
tool by disabling the ``kubernetes/logs`` toolset. Without this. HolmesGPT may still use kubectl to
230-
fetch logs instead of Loki.
231-
232-
.. code-block:: yaml
233-
234-
holmes:
235-
toolsets:
236-
kubernetes/logs:
237-
enabled: false
238-
227+
.. include:: ./_disable_default_logging_toolset.inc.rst
239228

240229
Capabilities
241230
^^^^^^^^^^^^
@@ -248,7 +237,5 @@ Capabilities
248237

249238
* - Tool Name
250239
- Description
251-
* - fetch_loki_logs_for_resource
252-
- Fetches the Loki logs for a given kubernetes resource
253-
* - fetch_loki_logs
254-
- Fetches Loki logs from any query
240+
* - fetch_pod_logs
241+
- Fetches pod logs

docs/configuration/holmesgpt/toolsets/grafanatempo.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ Configuration (direct connection)
135135
headers:
136136
X-Scope-OrgID: "<tenant id>" # Set the X-Scope-OrgID if tempo multitenancy is enabled
137137
138-
kubernetes/logs:
139-
enabled: false # Disable HolmesGPT's default logging mechanism
140-
141138
142139
.. include:: ./_toolset_configuration.inc.rst
143140

@@ -155,9 +152,6 @@ Configuration (direct connection)
155152
headers:
156153
X-Scope-OrgID: "<tenant id>" # Set the X-Scope-OrgID if tempo multitenancy is enabled
157154
158-
kubernetes/logs:
159-
enabled: false # Disable HolmesGPT's default logging mechanism
160-
161155
162156
Advanced configuration
163157
^^^^^^^^^^^^^^^^^^^^^^

docs/configuration/holmesgpt/toolsets/kubernetes.rst

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Core :checkmark:`_`
66
--------------------
77
.. include:: ./_toolset_enabled_by_default.inc.rst
88

9-
By enabling this toolset, HolmesGPT will be able to describe and find kubernetes resources like
9+
By enabling this toolset, HolmesGPT will be able to describe and find Kubernetes resources like
1010
nodes, deployments, pods, etc.
1111

1212
Configuration
@@ -90,22 +90,8 @@ Capabilities
9090

9191
* - Tool Name
9292
- Description
93-
* - kubectl_previous_logs
94-
- Run `kubectl logs --previous` on a single Kubernetes pod. Used to fetch logs for a pod that crashed and see logs from before the crash. Never give a deployment name or a resource that is not a pod.
95-
* - kubectl_previous_logs_all_containers
96-
- Run `kubectl logs --previous` on a single Kubernetes pod. Used to fetch logs for a pod that crashed and see logs from before the crash.
97-
* - kubectl_container_previous_logs
98-
- Run `kubectl logs --previous` on a single container of a Kubernetes pod. Used to fetch logs for a pod that crashed and see logs from before the crash.
99-
* - kubectl_logs
100-
- Run `kubectl logs` on a single Kubernetes pod. Never give a deployment name or a resource that is not a pod.
101-
* - kubectl_logs_all_containers
102-
- Run `kubectl logs` on all containers within a single Kubernetes pod.
103-
* - kubectl_container_logs
104-
- Run `kubectl logs` on a single container within a Kubernetes pod. This is to get the logs of a specific container in a multi-container pod.
105-
* - kubectl_logs_grep
106-
- Search for a specific term in the logs of a single Kubernetes pod. Only provide a pod name, not a deployment or other resource.
107-
* - kubectl_logs_all_containers_grep
108-
- kubectl logs {{pod_name}} -n {{ namespace }} --all-containers | grep {{ search_term }}
93+
* - fetch_pod_logs
94+
- Fetches logs from a kubernetes pod
10995

11096

11197
Live metrics

0 commit comments

Comments
 (0)