You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
76
100
77
101
**Search labels**
78
102
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
+
81
119
82
120
You can verify what labels to use by attempting to run a query in the coralogix ui:
Copy file name to clipboardExpand all lines: docs/configuration/holmesgpt/toolsets/prometheus.rst
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Configuration
24
24
prometheus/metrics:
25
25
enabled: true
26
26
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
28
28
headers:
29
29
Authorization: "Basic <base_64_encoded_string>"
30
30
@@ -41,7 +41,7 @@ Configuration
41
41
prometheus/metrics:
42
42
enabled: true
43
43
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
45
45
headers:
46
46
Authorization: "Basic <base_64_encoded_string>"
47
47
@@ -78,13 +78,11 @@ Below is the full list of options for this toolset:
78
78
79
79
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.
80
80
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):
82
82
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.
0 commit comments