Skip to content

Commit bf57318

Browse files
committed
Merge branch 'master' into ROB-1032-llm-selection
2 parents e6fc173 + 93919eb commit bf57318

5 files changed

Lines changed: 58 additions & 22 deletions

File tree

docs/configuration/holmesgpt/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Robusta can integrate with `Holmes GPT <https://github.com/robusta-dev/holmesgpt
1818

1919
When available, AI based investigations can be launched in one of two ways:
2020

21-
1. Click the ``Ask Holmes`` button in Slack. The AI investigation will be sent back as a new message.
21+
1. Click the ``Ask HolmesGPT`` button in Slack. The AI investigation will be sent back as a new message.
2222

2323
.. image:: /images/robusta-holmes-investigation.png
2424
:width: 600px

docs/configuration/holmesgpt/toolsets/coralogix_logs.rst

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ Configuration
4141
api_key: <your coralogix API key>
4242
domain: eu2.coralogix.com # Your Coralogix domain
4343
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"
4844
4945
kubernetes/logs:
5046
enabled: false # Disable HolmesGPT's default logging mechanism
@@ -65,19 +61,61 @@ Configuration
6561
api_key: <your coralogix API key>
6662
domain: eu2.coralogix.com # Your Coralogix domain
6763
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"
7264
7365
kubernetes/logs:
7466
enabled: false # Disable HolmesGPT's default logging mechanism
7567
68+
Advanced Configuration
69+
^^^^^^^^^^^^^^^^^^^^^^
70+
71+
**Frequent logs and archive**
72+
73+
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>`_
74+
tier and only fetch logs from the `Archive` tier if the frequent search returned no result.
75+
76+
This behaviour can be customised using the ``logs_retrieval_methodology`` configuration field:
77+
78+
.. code-block:: yaml
79+
80+
toolsets:
81+
coralogix/logs:
82+
enabled: true
83+
config:
84+
# Possible values are:
85+
# - FREQUENT_SEARCH_ONLY
86+
# - ARCHIVE_ONLY
87+
# - ARCHIVE_FALLBACK <- default value
88+
# - FREQUENT_SEARCH_FALLBACK
89+
# - BOTH_FREQUENT_SEARCH_AND_ARCHIVE
90+
logs_retrieval_methodology: ARCHIVE_FALLBACK # default value
91+
...
92+
93+
Here is a description of each possible log retrieval methodology:
94+
95+
- **FREQUENT_SEARCH_ONLY** Always fetch logs using a frequent search.
96+
- **ARCHIVE_ONLY** Always fetch logs using the archive.
97+
- **ARCHIVE_FALLBACK** Use a frequent search first. If there are no results, fallback to searching archived logs. **This is the default behaviour.**
98+
- **FREQUENT_SEARCH_FALLBACK** Search logs in the archive first. If there are no results, fallback to searching the frequent logs.
99+
- **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.
76100

77101
**Search labels**
78102

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.
103+
You can tweak the labels used by the toolset to identify kubernetes resources. This is **optional** and only needed if your
104+
logs settings for ``pod``, ``namespace``, ``application`` and ``subsystem`` differ from the defaults in the example below.
105+
106+
.. code-block:: yaml
107+
108+
toolsets:
109+
coralogix/logs:
110+
enabled: true
111+
config:
112+
labels: # OPTIONAL: tweak the filters used by HolmesGPT if your coralogix configuration is non standard
113+
namespace: "kubernetes.namespace_name"
114+
pod: "kubernetes.pod_name"
115+
application: "coralogix.metadata.applicationName"
116+
subsystem: "coralogix.metadata.subsystemName"
117+
...
118+
81119
82120
You can verify what labels to use by attempting to run a query in the coralogix ui:
83121

@@ -111,5 +149,5 @@ Capabilities
111149

112150
* - Tool Name
113151
- Description
114-
* - coralogix_fetch_logs
115-
- Retrieve logs from Coralogix
152+
* - fetch_coralogix_logs_for_resource
153+
- Retrieve logs using coralogix

docs/configuration/holmesgpt/toolsets/prometheus.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Configuration
2424
prometheus/metrics:
2525
enabled: true
2626
config:
27-
prometheus_url: http://<prometheus host>:9090
27+
prometheus_url: http://<prometheus host>:9090 # e.g. http://robusta-kube-prometheus-st-prometheus.default.svc.cluster.local:9090
2828
headers:
2929
Authorization: "Basic <base_64_encoded_string>"
3030
@@ -41,7 +41,7 @@ Configuration
4141
prometheus/metrics:
4242
enabled: true
4343
config:
44-
prometheus_url: http://<prometheus host>:9090
44+
prometheus_url: http://<prometheus host>:9090 # e.g. http://robusta-kube-prometheus-st-prometheus.default.svc.cluster.local:9090
4545
headers:
4646
Authorization: "Basic <base_64_encoded_string>"
4747
@@ -78,13 +78,11 @@ Below is the full list of options for this toolset:
7878

7979
The best way to find the prometheus URL is to use "ask holmes". This only works if your cluster is live and already connected to Robusta.
8080

81-
If not, follow these steps:
81+
If not, you can often find the prometheus URL by running the following command (several results may be shown - pick the best match):
8282

83-
1. Run ``kubectl get services -n <monitoring-namespace>`` to list all services. Replace ``<monitoring-namespace>`` with the namespace where Prometheus is deployed. This is often ``monitoring`` or ``prometheus``. You can also run ``kubectl get services -A`` which will list all services in all namespaces.
84-
2. Identify which are the namespace and name of your Prometheus service. You can set up port forwarding to test if the service is correct and if Prometheus is reachable.
85-
3. Run ``kubectl describe service <service-name> -n <namespace>`` to get details about the service, including the cluster IP and port.
86-
4. Set the DNS or the cluster IP as well as the port to the configuration field ``prometheus_url`` as mentioned above.
83+
.. code-block:: bash
8784
85+
kubectl get svc --all-namespaces -o jsonpath='{range .items[*]}{.metadata.name}{"."}{.metadata.namespace}{".svc.cluster.local:"}{.spec.ports[0].port}{"\n"}{end}' | grep prometheus | grep -Ev 'operat|alertmanager|node|coredns|kubelet|kube-scheduler|etcd|controller' | awk '{print "http://"$1}'
8886
8987
Capabilities
9088
------------

docs/configuration/holmesgpt/toolsets/robusta.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Robusta :checkmark:`_`
33
.. include:: ./_toolset_enabled_by_default.inc.rst
44

55
By enabling this toolset, HolmesGPT will be able to fetch alerts metadata. It allows HolmesGPT to fetch information
6-
about specific issues when chatting using "Ask Holmes". This toolset is not necessary for Root Cause Analysis.
6+
about specific issues when chatting using "Ask HolmesGPT". This toolset is not necessary for Root Cause Analysis.
77

88
Configuration
99
-------------

src/robusta/integrations/slack/sender.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def __create_holmes_callback(self, finding: Finding) -> CallbackBlock:
353353

354354
return CallbackBlock(
355355
{
356-
"Ask Holmes": CallbackChoice(
356+
"Ask HolmesGPT": CallbackChoice(
357357
action=ask_holmes,
358358
action_params=AIInvestigateParams(
359359
resource=resource, investigation_type="issue", ask="Why is this alert firing?", context=context

0 commit comments

Comments
 (0)