Skip to content

Commit

Permalink
Merge branch 'master' into azure-workload-identity
Browse files Browse the repository at this point in the history
  • Loading branch information
EppO authored Jul 11, 2023
2 parents 5cd36c8 + bdf50c4 commit a30f2f1
Show file tree
Hide file tree
Showing 23 changed files with 78 additions and 70 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"sphinx_reredirects",
]

suppress_warnings = ['autosectionlabel.*']
suppress_warnings = ["autosectionlabel.*"]

# sphinx redirects from old docs

Expand All @@ -70,7 +70,7 @@
"user-guide/alert-manager.html": "/master/configuration/alert-manager.html",
"catalog/sinks/webhook.html": "/master/configuration/sinks/webhook.html",
"catalog/sinks/PagerDuty.html": "/master/configuration/sinks/PagerDuty.html",
"catalog/actions/event-enrichment.html": "/master/playbook-reference/actions/event-enrichment.html"
"catalog/actions/event-enrichment.html": "/master/playbook-reference/actions/event-enrichment.html",
}

# for sphinx_jinja - see https://github.com/tardyp/sphinx-jinja
Expand Down Expand Up @@ -123,7 +123,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**/*.inc.rst", "**/*.jinja"]

# The name of the Pygments (syntax highlighting) style to use.
# pygments_style = "manni"
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/additional-settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ For example:
regex_replacement_style: SAME_LENGTH_ASTERISKS # You can also use NAMED
regex_replacer_patterns:
- name: MySecretPort
regex: "my secret port \d+"
regex: "my secret port \\d+"
- name: UUID
regex: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
Expand Down Expand Up @@ -102,4 +102,4 @@ It is best to define this in a `global config <https://docs.robusta.dev/master/u
- name: UUID
regex: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
Place these values inside Robusta's Helm values and perform a :ref:`Helm Upgrade <Simple Upgrade>`.
Place these values inside Robusta's Helm values and perform a :ref:`Helm Upgrade <Simple Upgrade>`.
43 changes: 23 additions & 20 deletions docs/configuration/alert-manager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,34 +145,37 @@ other services are located. If the auto-discovery isn't working, you'll configur

Add the following to ``generated_values.yaml`` and :ref:`update Robusta <Simple Upgrade>`.

.. grid:: 1 1 1 1

.. grid-item::
.. grid-item::

.. md-tab-set::
.. md-tab-set::

.. md-tab-item:: Prometheus
.. md-tab-item:: Prometheus

.. code-block:: yaml
.. code-block:: yaml
# this line should already exist
globalConfig:
# add the lines below
alertmanager_url: ""
grafana_url: ""
prometheus_url: "http://PROMETHEUS_SERVICE_NAME.monitoring.svc.cluster.local:9090"
# Additional query string parameters to be appended to the Prometheus connection URL (optional)
prometheus_url_query_string: "demo-query=example-data&another-query=value"
# this line should already exist
globalConfig:
# add the lines below
alertmanager_url: ""
grafana_url: ""
prometheus_url: "http://PROMETHEUS_SERVICE_NAME.monitoring.svc.cluster.local:9090"
# Additional query string parameters to be appended to the Prometheus connection URL (optional)
prometheus_url_query_string: "demo-query=example-data&another-query=value"
.. md-tab-item:: VictoriaMetrics
.. md-tab-item:: VictoriaMetrics

.. code-block:: yaml
.. code-block:: yaml
# this line should already exist
globalConfig:
# add the lines below
alertmanager_url: ""
grafana_url: ""
prometheus_url: "http://VICTORIA_METRICS_SERVICE_NAME.monitoring.svc.cluster.local:8429"
# this line should already exist
globalConfig:
# add the lines below
alertmanager_url: ""
grafana_url: ""
prometheus_url: "http://VICTORIA_METRICS_SERVICE_NAME.monitoring.svc.cluster.local:8429"
# Additional query string parameters to be appended to the VictoriaMetrics connection URL (optional)
prometheus_url_query_string: "demo-query=example-data&another-query=value"
Additional Authentication Headers
Expand Down
6 changes: 4 additions & 2 deletions docs/configuration/defining-playbooks/builtin-playbooks.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

Builtin Playbooks
####################

Expand All @@ -6,7 +8,7 @@ Robusta includes builtin playbooks that:
* Enhance common Prometheus alerts
* Complement Prometheus with direct APIServer monitoring

You can view builtin playbooks in the default Helm values.
You can view builtin playbooks in the default Helm values.

In this guide, we explain the default configuration.

Expand Down Expand Up @@ -34,4 +36,4 @@ Robusta uses *silencer* actions to flag false positive alerts and prevent them f

Silencers are just regular actions that call a special silencing API in their code.

To define your own silencers, refer to the :ref:`Silencing Prometheus Alerts` tutorial.
To define your own silencers, refer to the :ref:`Silence alert` action.
4 changes: 2 additions & 2 deletions docs/configuration/sinks/jira.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Optional Settings
---------------------------
* ``issue_type`` : [Optional - default: ``Task``] Jira ticket type
* ``dedups`` : [Optional - default: ``fingerprint``] Tickets deduplication parameter. By default, Only one issue per ``fingerprint`` will be created. There can be more than one value to use. Possible values are: fingerprint, cluster_name, title, node, type, source, namespace, creation_date etc
* ``project_type_id_override`` : [Optional - default: None] If available, will override the ``project_name`` configuration. Follow these `instructions <https://confluence.atlassian.com/jirakb/how-to-get-project-id-from-the-jira-user-interface-827341414.html>`_ to get your project id.
* ``issue_type_id_override`` : [Optional - default: None] If available, will override the ``issue_type`` configuration. Follow these `instructions <https://confluence.atlassian.com/jirakb/finding-the-id-for-issue-types-646186508.html>`_ to get your issue id.
* ``project_type_id_override`` : [Optional - default: None] If available, will override the ``project_name`` configuration. Follow these `instructions <https://confluence.atlassian.com/jirakb/how-to-get-project-id-from-the-jira-user-interface-827341414.html>`__ to get your project id.
* ``issue_type_id_override`` : [Optional - default: None] If available, will override the ``issue_type`` configuration. Follow these `instructions <https://confluence.atlassian.com/jirakb/finding-the-id-for-issue-types-646186508.html>`__ to get your issue id.

Configuring the Jira sink
------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions docs/configuration/sinks/sinks-development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ If Robusta doesn't support the sink you need, consider implementing your own.
What Are Robusta Sinks?
--------------------------

:ref:`Sinks <Sinks>`
are the destinations to which Robusta sends data. For example, when sending Robusta messages
:ref:`Sinks <Sinks Reference>` are the destinations to which Robusta sends data. For example, when sending Robusta messages
to Slack, Robusta uses a Slack sink.

Internally, Robusta generates
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/sinks/slack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ your own. This is not recommended for most companies due to the added complexity
.. warning::

When using a custom Slack app, callback buttons are not supported due to complexities in how Slack handles incoming
messages. :ref:`Contact us if you need assistance. <help>`
messages. :ref:`Contact us if you need assistance. <Getting Support>`
2 changes: 1 addition & 1 deletion docs/docs-contributions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Build the docs locally:

1. ``poetry: command not found`` - Make sure you have `Poetry <https://python-poetry.org/docs/>`_ installed and run ``source $HOME/.poetry/env`` in Linux environments to set the poetry environment variables.

2. ``sphinx-build: command not found`` - Make sure you have `Sphinx <https://www.sphinx-doc.org/en/master/usage/getting-started/installation.html>`_ installed.
2. ``sphinx-build: command not found`` - Make sure you have `Sphinx <https://www.sphinx-doc.org/en/master/usage/getting-started/installation.html>`__ installed.

3. ``OSError: [Errno 98] Address already in use`` - Use the ``--port <Number>`` argument, with a port of your choice. Example: ``./docs_autobuild.sh --port 8822``

Expand Down
2 changes: 0 additions & 2 deletions docs/help.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ Here are more tutorials from the Robusta community:

<div style="position: relative; height: 0; padding-bottom: 56.25%;"> <iframe src="https://www.youtube.com/embed/2P76WVVua8w" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>


.. * **Video:** `Kubernetes Notifications, Troubleshooting, And Automation With Robusta <https://www.youtube.com/watch?v=2P76WVVua8w>`_ by Viktor Farcic
* **Video:** `Twitter challenge - Robusta.dev on 10 nodes <https://www.youtube.com/watch?v=l_zaCaY_wls>`_ by `Nuno Captain Corsair <https://twitter.com/nunixtech>`_
* `Troubleshoot and automate to fix your k8s Application <https://csaju.com/blog/troubleshoot-and-automate-to-fix-your-k8s-application/>`_ by `Aju Tamang <https://twitter.com/pylang2>`_
* `Getting Started with Robusta on Digital Ocean <https://dev.to/heyrutam/getting-started-with-robusta-on-digital-ocean-3g41>`_ by `Rutam Prita Mishra <https://github.com/Rutam21>`_
Expand Down
36 changes: 20 additions & 16 deletions docs/playbook-reference/actions/scans.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ By default, every instance of Robusta that's connected to the UI will run a KRR
With or without the UI, you can configure additional scans on a :ref:`schedule <Scheduled>`.
The results can be sent as a PDF to Slack or to the Robusta UI.

.. grid-item::
.. grid:: 1 1 1 1

.. md-tab-set::
.. grid-item::

.. md-tab-item:: Slack
.. md-tab-set::

.. image:: /images/krr_slack_example.png
:width: 1000px
.. md-tab-item:: Slack

.. md-tab-item:: Robusta UI
.. image:: /images/krr_slack_example.png
:width: 1000px

.. image:: /images/krr_example.png
:width: 1000px
.. md-tab-item:: Robusta UI

.. image:: /images/krr_example.png
:width: 1000px


.. robusta-action:: playbooks.robusta_playbooks.krr.krr_scan on_schedule
Expand Down Expand Up @@ -90,19 +92,21 @@ With or without the UI, you can configure additional scans on a :ref:`schedule <
The results can be sent as a PDF to Slack or to the Robusta UI.

.. grid-item::
.. grid:: 1 1 1 1

.. grid-item::

.. md-tab-set::
.. md-tab-set::

.. md-tab-item:: Slack
.. md-tab-item:: Slack

.. image:: /images/popeye_slack_example.png
:width: 1000px
.. image:: /images/popeye_slack_example.png
:width: 1000px

.. md-tab-item:: Robusta UI
.. md-tab-item:: Robusta UI

.. image:: /images/popeye_example.png
:width: 1000px
.. image:: /images/popeye_example.png
:width: 1000px


.. Note::
Expand Down
4 changes: 1 addition & 3 deletions docs/playbook-reference/examples.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
.. _playbook-reference:

Example Playbooks
=================

.. admonition:: Coming Soon

For now, refer to examples in :ref:`What are Playbooks?` and :ref:`Tutorials<tutorials>`
For now, refer to examples in :ref:`What are Playbooks?` and :ref:`Tutorials <tutorials>`
3 changes: 1 addition & 2 deletions docs/playbook-reference/overview.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:hide-toc:

.. _playbook-reference:

Overview
===========
Expand All @@ -10,7 +9,7 @@ List of all :ref:`Triggers <Triggers Reference>` and :ref:`Actions <Actions Refe
This is a *quick reference* section. It assumes you read:

* :ref:`What are Playbooks?`
* :ref:`How to Define Playbooks<Defining Playbooks>`
* :ref:`How to Define Playbooks <Defining Playbooks>`

In this Section
---------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. updated to .inc.rst because of "WARNING: duplicate label"
Install with Helm
------------------------------

Expand Down Expand Up @@ -65,7 +67,7 @@ On some clusters this can take a while, so don't panic if it appears stuck:
Install as usual, :ref:`then grant relevant permissions<openshift-permissions>`.

.. code-block:: bash
:name: cb-helm-install-test-clusters
:name: cb-helm-install-openshift
helm repo add robusta https://robusta-charts.storage.googleapis.com && helm repo update
helm install robusta robusta/robusta -f ./generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME> --set isSmallCluster=true
Expand All @@ -90,4 +92,4 @@ Confirm that two Robusta pods are running with no errors in the logs:
:name: cb-get-pods-robusta-logs
kubectl get pods -A | grep robusta
robusta logs
robusta logs
3 changes: 2 additions & 1 deletion docs/setup-robusta/installation/_see_robusta_in_action-2.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. currently unused, I hope to clean this up and integrate it later
:orphan:
See Robusta in action
------------------------------

Expand All @@ -26,7 +27,7 @@ Want to see for yourself why Robusta alerts are better? Run these commands that
.. .. admonition:: Example Slack Message
.. .. image:: /images/simulatedprometheusalert.png
Testing out APIServer alerts
****************************

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Prerequisites
:header_update_levels:
:file: setup-robusta/installation/_generate_config.jinja

.. include:: ./_helm_install.rst
.. include:: ./_helm_install.inc.rst

.. include:: ./_see_robusta_in_action.rst

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Prerequisites
:header_update_levels:
:file: setup-robusta/installation/_generate_config.jinja

.. include:: ./_helm_install.rst
.. include:: ./_helm_install.inc.rst

.. include:: ./_see_robusta_in_action.rst

Expand Down
4 changes: 2 additions & 2 deletions docs/setup-robusta/installation/standalone-installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Prerequisites
:header_update_levels:
:file: setup-robusta/installation/_generate_config.jinja

.. include:: ./_helm_install.rst
.. include:: ./_helm_install.inc.rst

.. include:: ./_see_robusta_in_action.rst

Expand All @@ -39,4 +39,4 @@ Next Steps
---------------------------------

* :ref:`Track Failed Kubernetes Jobs`
* :ref:`View more tutorials<Tutorials>`
* :ref:`View more tutorials<Tutorials>`
2 changes: 0 additions & 2 deletions docs/tutorials/alert-custom-enrichment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ We now configure a Robusta playbook to enhance a Prometheus alert.

Prerequisites
---------------------------------

.. Complete the previous tutorial, :ref:`Define Custom Prometheus Alerts`.
You must have some Prometheus alerts already defined. Ex: HostHighCpuLoad


Expand Down
2 changes: 2 additions & 0 deletions docs/tutorials/alert-custom-prometheus.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

.. _define-alerts:

Define Custom Prometheus Alerts
Expand Down
2 changes: 2 additions & 0 deletions docs/tutorials/grafana-annotations.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

Remediate Alerts
===================

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Define your own alerts. Customize the data shown in alert notifications.
playbook-job-failure
playbook-failed-liveness
playbook-track-changes
.. alert-custom-prometheus
alert-custom-prometheus
alert-custom-enrichment

.. _tutorials-notification-routing:
Expand Down
Binary file added logos/logo-only.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/robusta/integrations/slack/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
LinksBlock,
ListBlock,
MarkdownBlock,
ScanReportBlock,
TableBlock,
ScanReportBlock
)
from robusta.core.reporting.callbacks import ExternalActionRequestBuilder
from robusta.core.reporting.consts import SlackAnnotations, EnrichmentAnnotation
from robusta.core.reporting.consts import EnrichmentAnnotation, SlackAnnotations
from robusta.core.reporting.utils import add_pngs_for_all_svgs
from robusta.core.sinks.slack.slack_sink_params import SlackSinkParams
from robusta.core.sinks.transformer import Transformer
Expand Down Expand Up @@ -228,7 +228,7 @@ def __send_blocks_to_slack(
unfurl: bool,
status: FindingStatus,
):

file_blocks = add_pngs_for_all_svgs([b for b in report_blocks if isinstance(b, FileBlock)])
if not sink_params.send_svg:
file_blocks = [b for b in file_blocks if not b.filename.endswith(".svg")]
Expand Down Expand Up @@ -296,7 +296,7 @@ def __create_links(self, finding: Finding):
if finding.add_silence_url:
links.append(
LinkProp(
text="Silence 🔕",
text="Configure Silences 🔕",
url=finding.get_prometheus_silence_url(self.account_id, self.cluster_name),
)
)
Expand Down

0 comments on commit a30f2f1

Please sign in to comment.