Skip to content

Commit c128db3

Browse files
committed
Merge branch 'master' into ROB-1033-custom-owners
2 parents 19a06a2 + 497c446 commit c128db3

19 files changed

Lines changed: 597 additions & 64 deletions

File tree

.github/workflows/test_robusta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v2
2121
with:
22-
python-version: 3.9
22+
python-version: 3.11
2323

2424
# setup a KIND cluster for tests which need a kubernetes image
2525
- name: Create k8s Kind Cluster

docs/_static/custom.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,37 @@ h3 {
298298
margin-bottom: 20px !important;
299299
}
300300

301+
/* Back to Top Button */
302+
.back-to-top {
303+
position: fixed;
304+
bottom: 30px;
305+
right: 30px;
306+
width: 50px;
307+
height: 50px;
308+
background-color: var(--md-primary-fg-color);
309+
color: white;
310+
border-radius: 50%;
311+
text-align: center;
312+
line-height: 50px;
313+
font-size: 20px;
314+
text-decoration: none;
315+
opacity: 0;
316+
visibility: hidden;
317+
z-index: 1000;
318+
transition: opacity 0.3s, visibility 0.3s;
319+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
320+
cursor: pointer;
321+
}
322+
323+
.back-to-top.visible {
324+
opacity: 0.7;
325+
visibility: visible;
326+
}
327+
328+
.back-to-top:hover {
329+
opacity: 1;
330+
}
331+
301332
.sd-sphinx-override p {
302333
margin-bottom: 0px;
303334
}

docs/_templates/base.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{% extends '!base.html' %}
22
{% block site_meta %}
33
{{ super() }}
4+
<!-- Back to Top Button -->
5+
<a href="#" class="back-to-top" aria-label="Back to top">
6+
<span></span>
7+
</a>
48
<!-- PostHog and Segment -->
59
<script>
610
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
@@ -27,6 +31,26 @@
2731
document.getElementById('__palette_1').onclick = () => refreshRobustaLogo(true);
2832
document.getElementById('__palette_2').onclick = () => refreshRobustaLogo(false);
2933

34+
// Back to top button functionality
35+
const backToTopButton = document.querySelector('.back-to-top');
36+
37+
// Show button when page is scrolled down
38+
window.addEventListener('scroll', function() {
39+
if (window.pageYOffset > 300) {
40+
backToTopButton.classList.add('visible');
41+
} else {
42+
backToTopButton.classList.remove('visible');
43+
}
44+
});
45+
46+
// Smooth scroll to top when button is clicked
47+
backToTopButton.addEventListener('click', function(e) {
48+
e.preventDefault();
49+
window.scrollTo({
50+
top: 0,
51+
behavior: 'smooth'
52+
});
53+
});
3054
}, false);
3155
</script>
3256
{% endblock %}

docs/conf.py

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,56 @@
123123
"catalog/triggers/prometheus.html": "/master/configuration/alertmanager-integration/index.html",
124124
"playbook-reference/prometheus-examples/alert-remediation.html": "/master/playbook-reference/automatic-remediation-examples/index.html",
125125
"configuration/ai-analysis.html": "/master/configuration/holmesgpt/index.html",
126-
127-
128-
}
126+
"coverage.html": "/master/how-it-works/coverage.html",
127+
"tutorials/python-profiling.html": "/master/playbook-reference/actions/python-troubleshooting.html#python-profiler",
128+
"tutorials/more-tutorials.html": "/master/community-tutorials.html",
129+
"common-errors.html": "/master/help.html#common-errors",
130+
"user-guide/defining-playbooks.html": "/master/playbook-reference/defining-playbooks/index.html",
131+
"user-guide/global-config.html": "/master/setup-robusta/additional-settings.html#global-config",
132+
"user-guide/configuration-secrets.html": "master/setup-robusta/configuration-secrets.html",
133+
"user-guide/additional-playbooks.html": "/master/playbook-reference/defining-playbooks/external-playbook-repositories.html",
134+
"user-guide/embedded-prometheus.html": "/master/configuration/alertmanager-integration/embedded-prometheus.html#enabling-the-embedded-prometheus",
135+
"user-guide/node-selector.html": "/master/setup-robusta/node-selector.html",
136+
"user-guide/interactivity.html": "/master/setup-robusta/additional-settings.html#two-way-interactivity",
137+
"user-guide/flow-control.html": "/master/playbook-reference/defining-playbooks/playbook-advanced.html#using-filters-to-restrict-triggers",
138+
"catalog/triggers/index.html": "/master/playbook-reference/triggers/index.html",
139+
"catalog/triggers/kubernetes.html": "/master/playbook-reference/triggers/kubernetes.html",
140+
"catalog/triggers/smart.html": "/master/playbook-reference/triggers/kubernetes.html",
141+
"catalog/triggers/scheduled.html": "/master/playbook-reference/triggers/scheduled.html",
142+
"catalog/triggers/manual-triggers.html": "/master/playbook-reference/triggers/manual-triggers.html",
143+
"catalog/triggers/webhook.html": "/master/playbook-reference/triggers/webhook.html",
144+
"catalog/triggers/elasticsearch.html": "/master/playbook-reference/triggers/elasticsearch.html",
145+
"catalog/actions/remediation.html": "/master/playbook-reference/automatic-remediation-examples/index.html",
146+
"catalog/actions/change-tracking.html": "/master/playbook-reference/actions/change-tracking.html#change-tracking",
147+
"catalog/actions/java-troubleshooting.html": "/master/playbook-reference/actions/java-troubleshooting.html",
148+
"catalog/actions/miscellaneous.html": "/master/playbook-reference/actions/miscellaneous.html",
149+
"catalog/actions/message-formatting.html":"/master/playbook-reference/actions/message-formatting.html",
150+
"catalog/sinks/RobustaUI.html": "/master/configuration/sinks/RobustaUI.html",
151+
"catalog/sinks/discord.html": "/master/configuration/sinks/discord.html",
152+
"catalog/sinks/kafka.html": "/master/configuration/sinks/kafka.html",
153+
"catalog/sinks/DataDog.html": "/master/configuration/sinks/DataDog.html",
154+
"catalog/sinks/ms-teams.html": "/master/configuration/sinks/ms-teams.html",
155+
"catalog/sinks/mattermost.html": "/master/configuration/sinks/mattermost.html",
156+
"catalog/sinks/webex.html": "/master/configuration/sinks/webex.html",
157+
"catalog/sinks/VictorOps.html": "/master/configuration/sinks/VictorOps.html",
158+
"catalog/sinks/file.html": "/master/configuration/sinks/file.html",
159+
"user-guide/trigger-action-binding.html": "/master/playbook-reference/defining-playbooks/playbook-basics.html#understanding-actions",
160+
"advanced/privacy-and-security.html": "/master/setup-robusta/privacy-and-security.html",
161+
"advanced/robusta-ui-triggers.html": "/master/setup-robusta/installation/index.html",
162+
"developer-guide/actions/index.html": "/master/playbook-reference/actions/index.html",
163+
"developer-guide/actions/writing-playbooks.html":"/master/playbook-reference/actions/develop-actions/writing-playbooks.html#the-basics",
164+
"developer-guide/actions/playbook-repositories.html": "/master/playbook-reference/actions/develop-actions/playbook-repositories.html",
165+
"developer-guide/actions/triggers-and-events.html": "/master/playbook-reference/actions/develop-actions/triggers-and-events.html",
166+
"developer-guide/actions/utility-functions.html": "/master/playbook-reference/actions/develop-actions/utility-functions.html",
167+
"developer-guide/actions/documenting-actions.html": "/master/playbook-reference/actions/develop-actions/documenting-actions.html",
168+
"developer-guide/platform/index.html": "/master/contributing.html",
169+
"developer-guide/platform/dev-setup.html": "/master/contributing.html",
170+
"developer-guide/platform/coding-conventions.html": "/master/contributing.html",
171+
"developer-guide/platform/docs-contributions.html": "/master/docs-contributions.html#improving-these-docs",
172+
"developer-guide/platform/sinks-guide.html": "/master/configuration/sinks/sinks-development.html",
173+
"user-guide/robusta-cli.html": "/master/setup-robusta/installation/index.html",
174+
"advanced/index.html": "/master/setup-robusta/installation/index.html"
175+
}
129176

130177

131178
# for sphinx_jinja - see https://github.com/tardyp/sphinx-jinja

docs/configuration/holmesgpt/index.rst

Lines changed: 41 additions & 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
@@ -223,6 +223,46 @@ Choose an AI provider below and follow the instructions:
223223
224224
Run a :ref:`Helm Upgrade <Simple Upgrade>` to apply the configuration.
225225

226+
.. tab-item:: Multiple providers
227+
:name: multiple-providers
228+
229+
Starting from version *0.22.1*, Robusta supports an alternative way to configure AI models: using a YAML dictionary in your Helm values file.
230+
231+
This method allows you to configure multiple models at once, each with its own parameters.
232+
233+
Update your Helm values (``generated_values.yaml`` file) with the following configuration.
234+
235+
When multiple models are defined, the Robusta UI will allow users to choose a specific model when initiating an AI-based investigation.
236+
237+
.. admonition:: Model info
238+
:class: warning
239+
240+
When using multiple providers, the keys differ slightly from the single-provider case.
241+
242+
.. code-block:: yaml
243+
244+
enableHolmesGPT: true
245+
246+
holmes:
247+
modelList: # sample configuration.
248+
openai:
249+
model: openai/gpt-4o
250+
api_key: "{{ env.API_KEY }}"
251+
azure-low-budget:
252+
model : azure/team-low-budget
253+
api_base : <your-api-base> # fill in the base endpoint url of your azure deployment - e.g. https://my-org.openai.azure.com/
254+
api_version : "2024-06-01"
255+
api_key : "{{ env.AZURE_API_KEY }}" # you can load the values from an environment variable as well.
256+
temperature: 0
257+
bedrock-devops:
258+
model: bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0 # your bedrock model.
259+
aws_region_name: us-east-1
260+
aws_access_key_id: "{{ env.AWS_ACCESS_KEY_ID }}" # you can load the values from an environment variable as well.
261+
aws_secret_access_key: <your-aws-secret-access-key>
262+
thinking: {"type": "enabled", "budget_tokens": 1024}
263+
264+
Run a :ref:`Helm Upgrade <Simple Upgrade>` to apply the configuration.
265+
226266
Configuring HolmesGPT Access to SaaS Data
227267
----------------------------------------------------
228268

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
-------------

docs/configuration/sinks/Opsgenie.rst

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ We can add Prometheus alert labels into Opsgenie alert extra details by setting
1414
Configuring the OpsGenie sink
1515
------------------------------------------------
1616

17-
.. admonition:: Add this to your generated_values.yaml
17+
The OpsGenie sink supports static and dynamic team routing, optional fallback teams, tagging, and enrichment with Kubernetes labels.
18+
19+
.. admonition:: Add this to your `generated_values.yaml`
1820

1921
.. code-block:: yaml
2022
@@ -23,13 +25,32 @@ Configuring the OpsGenie sink
2325
name: ops_genie_sink
2426
api_key: OpsGenie integration API key # configured from OpsGenie team integration
2527
teams:
26-
- "noc"
27-
- "sre"
28+
- "noc" # Static team
29+
- "$labels.team" # Dynamic routing based on alert labels or annotations.
30+
# For example, if an alert subject has `team=infra`, it routes to the "infra" team.
31+
# Use $labels.<label_name> or $annotations.<label_name> as placeholders.
32+
default_team: "oncall" # Optional fallback team for Dynamic team routing
2833
tags:
2934
- "prod a"
3035
extra_details_labels: false # optional, default is false
3136
32-
Save the file and run
37+
In this example:
38+
39+
- Alerts will be routed to the **"noc"** team by default.
40+
- If the alert includes a **"team" label**, it will also be routed to the value of that label.
41+
- If the **"team" label is missing**, the alert will be routed to the **"oncall"** team as a fallback.
42+
- The tag **"prod a"** will be included with every alert.
43+
- Kubernetes labels **will not be added** to alert details, as `extra_details_labels` is set to `false`.
44+
45+
.. note::
46+
47+
- Dynamic team routing using label-based templates (e.g., ``$labels.team``) is only supported on **OpsGenie Standard** or **Enterprise** plans.
48+
If you are on a Free or Essentials plan, these templates will not function as expected.
49+
50+
- The API key must be from a **Global API Integration** for dynamic routing to work.
51+
If you use a **team-specific API key**, alerts will be routed **only to that team**.
52+
53+
Save the file and apply the configuration:
3354

3455
.. code-block:: bash
3556
:name: cb-add-opsgenie-sink

src/robusta/core/model/base_params.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class ResourceInfo(BaseModel):
8383
class HolmesParams(ActionParams):
8484

8585
holmes_url: Optional[str]
86-
86+
model: Optional[str]
8787
@validator("holmes_url", allow_reuse=True)
8888
def validate_protocol(cls, v):
8989
if v and not v.startswith("http"): # if the user configured url without http(s)
@@ -251,6 +251,7 @@ class HolmesWorkloadHealthChatParams(HolmesParams):
251251
conversation_history: Optional[list[dict]] = None
252252

253253

254+
254255
class NamespacedResourcesParams(ActionParams):
255256
"""
256257
:var name: Resource name

0 commit comments

Comments
 (0)