Skip to content

Commit 532eb0e

Browse files
Merge branch 'master' into docs-improve-sanitizing-instructions
2 parents 9178e81 + d556329 commit 532eb0e

27 files changed

Lines changed: 367 additions & 75 deletions

docs/configuration/holmesgpt/builtin_toolsets.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Builtin Toolsets
99
toolsets/argocd
1010
toolsets/aws
1111
toolsets/confluence
12+
toolsets/coralogix_logs
1213
toolsets/datetime
1314
toolsets/docker
1415
toolsets/grafanaloki
@@ -52,6 +53,11 @@ by the user by providing credentials or API keys to external systems.
5253
:link: toolsets/confluence
5354
:link-type: doc
5455

56+
.. grid-item-card:: :octicon:`cpu;1em;` Coralogix logs
57+
:class-card: sd-bg-light sd-bg-text-light
58+
:link: toolsets/coralogix_logs
59+
:link-type: doc
60+
5561
.. grid-item-card:: :octicon:`cpu;1em;` Datetime
5662
:class-card: sd-bg-light sd-bg-text-light
5763
:link: toolsets/datetime

docs/configuration/holmesgpt/custom_toolsets.rst

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ This toolset lets Holmes view Grafana dashboards and suggest relevant dashboards
115115
command: "curl \"${GRAFANA_URL}/api/search\" -H \"Authorization: Bearer ${GRAFANA_API_KEY}\""
116116
117117
- name: "grafana_get_url"
118-
description: "Get the URL of a Grafana dashboard by UID, including the real url of grafana"
118+
description: "Get the URL of a Grafana dashboard by UID, including the real URL of Grafana"
119119
# in this command we use a variable called `{{ dashboard_uid }}`
120-
# unlike enviroment variables that were provided by the user, variables like `{{ dashboard_uid }}` are provided by the AI model
120+
# unlike environment variables that were provided by the user, variables like `{{ dashboard_uid }}` are provided by the AI model
121121
# the AI model sees the tool description, decides to use this tool, and then provides a value for all {{ template_variables }} to invoke the tool
122122
command: "echo \"${GRAFANA_URL}/d/{{ dashboard_uid }}\""
123123
@@ -211,23 +211,23 @@ First `create a GitHub Personal Access Token with fine-grained permissions <http
211211
description: "Fetches the most recent commits for a repository"
212212
command: "curl -H 'Authorization: token ${GITHUB_TOKEN}' https://api.github.com/repos/{{ owner }}/{{ repo }}/commits?per_page={{ limit }} "
213213
214-
- name: "get_repo_details"
215-
description: "Fetches details of a specific repository"
216-
command: "curl -H 'Authorization: token ${GITHUB_TOKEN}' https://api.github.com/repos/{{ owner }}/{{ repo }}"
217-
218-
# In the above examples, LLM-provided parameters like {{ owner }} are inferred automatically from the command
219-
# you can also define them explicitly - this is useful if:
220-
# - You want to enforce parameter requirements (e.g., `owner` and `repo` are required).
221-
# - You want to define provide a default value for optional parameters.
222-
parameters:
223-
owner:
224-
type: "string"
225-
description: "Owner of the repository."
226-
required: true
227-
repo:
228-
type: "string"
229-
description: "Name of the repository."
230-
required: true
214+
- name: "get_repo_details"
215+
description: "Fetches details of a specific repository"
216+
command: "curl -H 'Authorization: token ${GITHUB_TOKEN}' https://api.github.com/repos/{{ owner }}/{{ repo }}"
217+
218+
# In the above examples, LLM-provided parameters like {{ owner }} are inferred automatically from the command
219+
# you can also define them explicitly - this is useful if:
220+
# - You want to enforce parameter requirements (e.g., `owner` and `repo` are required).
221+
# - You want to define provide a default value for optional parameters.
222+
parameters:
223+
owner:
224+
type: "string"
225+
description: "Owner of the repository."
226+
required: true
227+
repo:
228+
type: "string"
229+
description: "Name of the repository."
230+
required: true
231231
232232
Update your Helm values with the provided YAML configuration, then apply the changes with Helm upgrade:
233233

@@ -244,7 +244,7 @@ First `create a GitHub Personal Access Token with fine-grained permissions <http
244244

245245
.. md-tab-item:: Holmes CLI
246246

247-
First, add the following environment vairables:
247+
First, add the following environment variables:
248248

249249
.. code-block:: bash
250250
@@ -271,7 +271,7 @@ First `create a GitHub Personal Access Token with fine-grained permissions <http
271271
# In the above examples, LLM-provided parameters like {{ owner }} are inferred automatically from the command
272272
# you can also define them explicitly - this is useful if:
273273
# - You want to enforce parameter requirements (e.g., `owner` and `repo` are required).
274-
# - You want to define provide a default value for optional parameters.
274+
# - You want to provide a default value for optional parameters.
275275
parameters:
276276
owner:
277277
type: "string"
@@ -283,7 +283,7 @@ First `create a GitHub Personal Access Token with fine-grained permissions <http
283283
required: true
284284
To test, run:
285285

286-
.. code-block:: yaml
286+
.. code-block:: bash
287287
288288
holmes ask -t github_toolset.yaml "who made the last commit to the robusta-dev/holmesgpt repo on github?"
289289
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
HolmesGPT provides several out-of-the-box alternatives for log access. You can select from these options:
2+
3+
* :ref:`kubernetes/logs <toolset_kubernetes_logs>`: Access logs with ``kubectl logs`` commands. **This is the default toolset.**
4+
* :ref:`coralogix/logs <toolset_coralogix_logs>`: Access logs through Coralogix.
5+
* :ref:`grafana/loki <toolset_grafana_loki>`: Access Loki logs by proxying through a Grafana instance.

docs/configuration/holmesgpt/toolsets/argocd.rst

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,35 @@ This toolset requires an ``ARGOCD_AUTH_TOKEN`` environment variable. Generate su
1212
You can consult the `available environment variables <https://argo-cd.readthedocs.io/en/latest/user-guide/environment-variables/>`_
1313
on argocd's official documentation for the CLI.
1414

15-
In addition to the auth token, you will need to tell argocd how to connect to the server. This can be done two ways:
15+
The permissions required are below (``kubectl edit configmap argocd-rbac-cm -n argocd``). You can consult
16+
ArgoCD's documentation on `user creation <https://argo-cd.readthedocs.io/en/stable/operator-manual/user-management/>`_
17+
and `permissions <https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/>`_.
18+
19+
.. code-block:: yaml
20+
21+
# Ensure this data block is present in your argocd-rbac-cm configmap.
22+
# It enables the permissions for holmes to fetch the data it needs to
23+
# investifate argocd issues.
24+
# -
25+
# These permissions depend on a new user `holmesgpt` being created,
26+
# for example using the `argocd-cm` configmap
27+
data:
28+
policy.default: role:readonly
29+
policy.csv: |
30+
p, role:admin, *, *, *, allow
31+
p, role:admin, accounts, apiKey, *, allow
32+
p, holmesgpt, accounts, apiKey, holmesgpt, allow
33+
p, holmesgpt, projects, get, *, allow
34+
p, holmesgpt, applications, get, *, allow
35+
p, holmesgpt, repositories, get, *, allow
36+
p, holmesgpt, clusters, get, *, allow
37+
p, holmesgpt, applications, manifests, */*, allow
38+
p, holmesgpt, applications, resources, */*, allow
39+
g, admin, role:admin
40+
41+
42+
In addition to setting permissiong and generating an auth token, you will need to tell argocd how to connect to the server.
43+
This can be done two ways:
1644

1745
1. **Using port forwarding**. This is the recommended approach if your argocd is inside your Kubernetes cluster.
1846
2. **Setting the env var** ``SERVER_URL``. This is the recommended approach if your argocd is reachable through a public DNS
@@ -39,7 +67,7 @@ HolmesGPT needs permission to establish a port-forward to ArgoCD. The configurat
3967
toolsets:
4068
argocd/core:
4169
enabled: true
42-
70+
4371
.. note::
4472

4573
Change the namespace ``--port-forward-namespace <your_argocd_namespace>`` to the namespace in which your argocd service
@@ -92,10 +120,10 @@ This is the recommended approach if your argocd is reachable through a public DN
92120
argocd/core:
93121
enabled: true
94122
95-
To test, run:
123+
To test, run:
96124

97125
.. code-block:: yaml
98-
126+
99127
holmes ask "Which argocd applications are failing and why?"
100128
101129
Capabilities
@@ -109,12 +137,16 @@ Capabilities
109137

110138
* - Tool Name
111139
- Description
140+
* - argocd_app_list
141+
- List the applications in Argocd
112142
* - argocd_app_get
113143
- Retrieve information about an existing application, such as its status and configuration
144+
* - argocd_app_manifests
145+
- Retrieve manifests for an application
146+
* - argocd_app_resources
147+
- List resources of an application
114148
* - argocd_app_diff
115149
- Display the differences between the current state of an application and the desired state specified in its Git repository
116-
* - argocd_app_list
117-
- List the applications in Argocd
118150
* - argocd_app_history
119151
- List the deployment history of an application in ArgoCD
120152
* - argocd_repo_list
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
.. _toolset_coralogix_logs:
2+
3+
Coralogix logs
4+
==============
5+
6+
By enabling this toolset, HolmesGPT will fetch node and pods logs from `Coralogix <https://coralogix.com/>`_.
7+
8+
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
10+
to fetch incident logs, including the ability to precisely consult past logs.
11+
12+
13+
.. include:: ./_toolsets_that_provide_logging.inc.rst
14+
15+
Prerequisites
16+
^^^^^^^^^^^^^
17+
18+
1. A `Coralogix API key <https://coralogix.com/docs/developer-portal/apis/data-query/direct-archive-query-http-api/#api-key>`_ which is assigned the ``DataQuerying`` permission preset
19+
2. A `Coralogix domain <https://coralogix.com/docs/user-guides/account-management/account-settings/coralogix-domain/>`_. For example ``eu2.coralogix.com``
20+
3. Your team's `name or hostname <https://coralogix.com/docs/user-guides/account-management/organization-management/create-an-organization/#teams-in-coralogix>`_. For example ``your-company-name``
21+
22+
23+
You can deduct the ``domain`` and ``team_hostname`` configuration fields by looking at the URL you use to access the Coralogix UI.
24+
25+
For example if you access coralogix at ``https://my-team.app.eu2.coralogix.com/``` then the ``team_hostname`` is ``my-team``and the coralogix ``domain`` is ``eu2.coralogix.com``.
26+
27+
Configuration
28+
^^^^^^^^^^^^^
29+
30+
.. md-tab-set::
31+
32+
.. md-tab-item:: Robusta Helm Chat
33+
34+
.. code-block:: yaml
35+
36+
holmes:
37+
toolsets:
38+
coralogix/logs:
39+
enabled: true
40+
config:
41+
api_key: <your coralogix API key>
42+
domain: eu2.coralogix.com # Your Coralogix domain
43+
team_hostname: my-team # Your team's hostname in coralogix, without the domain part
44+
labels:
45+
pod: "kubernetes.pod_name"
46+
namespace: "kubernetes.namespace_name"
47+
app: "kubernetes.labels.app"
48+
49+
kubernetes/logs:
50+
enabled: false # Disable HolmesGPT's default logging mechanism
51+
52+
53+
.. include:: ./_toolset_configuration.inc.rst
54+
55+
.. md-tab-item:: Holmes CLI
56+
57+
Add the following to **~/.holmes/config.yaml**, creating the file if it doesn't exist:
58+
59+
.. code-block:: yaml
60+
61+
toolsets:
62+
coralogix/logs:
63+
enabled: true
64+
config:
65+
api_key: <your coralogix API key>
66+
domain: eu2.coralogix.com # Your Coralogix domain
67+
team_hostname: my-team # Your team's hostname in coralogix
68+
labels:
69+
pod: "kubernetes.pod_name"
70+
namespace: "kubernetes.namespace_name"
71+
app: "kubernetes.labels.app"
72+
73+
kubernetes/logs:
74+
enabled: false # Disable HolmesGPT's default logging mechanism
75+
76+
77+
**Search labels**
78+
79+
You can tweak the labels used by the toolset to identify kubernetes resources. This is only needed if your
80+
logs settings for ``pod``, ``namespace``, and ``app`` differ from the defaults in the example above.
81+
82+
You can verify what labels to use by attempting to run a query in the coralogix ui:
83+
84+
.. image:: /images/coralogix-logs-for-holmes-labels.png
85+
:width: 600
86+
:align: center
87+
88+
89+
**Disabling the default toolset**
90+
91+
If Coralogix is your primary datasource for logs, it is **advised** to disable the default HolmesGPT logging
92+
tool by disabling the ``kubernetes/logs`` toolset. Without this. HolmesGPT may still use kubectl to
93+
fetch logs instead of Coralogix.
94+
95+
.. code-block:: yaml
96+
97+
holmes:
98+
toolsets:
99+
kubernetes/logs:
100+
enabled: false
101+
102+
103+
Capabilities
104+
^^^^^^^^^^^^
105+
106+
.. include:: ./_toolset_capabilities.inc.rst
107+
108+
.. list-table::
109+
:header-rows: 1
110+
:widths: 30 70
111+
112+
* - Tool Name
113+
- Description
114+
* - coralogix_fetch_logs
115+
- Retrieve logs from Coralogix

docs/configuration/holmesgpt/toolsets/datetime.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The following built-in toolsets depend on ``datetime``:
1010

1111
* :ref:`grafana/loki <toolset_grafana_loki>`
1212
* :ref:`prometheus/metrics <toolset_prometheus>`
13+
* :ref:`coralogix/logs <toolset_coralogix_logs>`
1314

1415
Configuration
1516
-------------

docs/configuration/holmesgpt/toolsets/grafanaloki.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ You **should** enable this toolset to replace the default :ref:`kubernetes/logs
1010
toolset if all your kubernetes/pod logs are consolidated inside Loki. It will make it easier for HolmesGPT
1111
to fetch incident logs, including the ability to precisely consult past logs.
1212

13+
14+
.. include:: ./_toolsets_that_provide_logging.inc.rst
15+
1316
Prerequisites
1417
^^^^^^^^^^^^^
1518

@@ -136,6 +139,7 @@ Use the following commands to list Loki's labels and determine which ones to use
136139
curl http://localhost:3100/loki/api/v1/labels
137140
138141
142+
**Disabling the default toolset**
139143

140144
If Loki is your primary datasource for logs, it is **advised** to disable the default HolmesGPT logging
141145
tool by disabling the ``kubernetes/logs`` toolset. Without this. HolmesGPT may still use kubectl to

docs/configuration/holmesgpt/toolsets/kubernetes.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,10 @@ it.
6363
By enabling this toolset, HolmesGPT will be able to read kubernetes pod logs.
6464

6565
You may disable this toolset if you provide Holmes with an alternative toolset to
66-
fetch logs from your kubernetes cluster and applications. The available built-in
67-
toolsets that provide logging are:
66+
fetch logs from your kubernetes cluster and applications.
6867

69-
* :ref:`grafana/loki <toolset_grafana_loki>`: Access Loki logs by proxying through a Grafana instance
7068

69+
.. include:: ./_toolsets_that_provide_logging.inc.rst
7170

7271
Configuration
7372
^^^^^^^^^^^^^

0 commit comments

Comments
 (0)