Skip to content

Commit

Permalink
Docs/helm monitoring tools (robusta-dev#847)
Browse files Browse the repository at this point in the history
* Added "Helm Releases Monitoring"

* updated docs for status param

* Added Prerequisites

* Improved the docs.
Added on_helm_release_unhealthy, on_helm_release_fail, on_helm_release_deployed, on_helm_release_uninstall states

* Added action text changes and added new screenshots

* updated the docs text.

* changed the time options

* Restored the helm tools in index.rst

* Minor text changes

* added on_helm_release_deploy corrections
  • Loading branch information
ganeshrvel authored and pavangudiwada committed Nov 6, 2023
1 parent e049ec9 commit 58d4c64
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 1 deletion.
Binary file added docs/images/helm-release-deployed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/helm-release-failed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/helm-release-unhealthy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/helm-release-uninstalled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
144 changes: 144 additions & 0 deletions docs/playbook-reference/triggers/helm-releases-monitoring.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
Helm Releases Monitoring
#############################

Robusta can monitor your Helm releases and notify you about updates or problems. For example:

* Get notified in Slack when a Helm release fails
* Get notified in MSTeams if a Helm release is pending for more than X seconds
* Send details on your Helm history to external tools

…and more

Prerequisites
---------------
To use Helm Triggers, the :ref:`Robusta UI` sink must be enabled..

Triggers
-----------

The following triggers are available:

.. _on_helm_release_unhealthy:

.. details:: on_helm_release_unhealthy


``on_helm_release_unhealthy`` triggers when a Helm release remains unhealthy for over ``duration`` seconds. Unhealthy states are: ``uninstalling``, ``pending-install``, ``pending-upgrade``, and ``pending-rollback``.


**Available options**:

* ``rate_limit``: Limit firing to once every `rate_limit` seconds.
* ``names``: List of Helm releases for this trigger to monitor. Leaving this field empty monitors all releases in the namespace. Optional.
* ``namespace``: The Kubernetes namespace for this trigger to monitor. Leaving this field empty monitors all namespaces in the cluster. Optional.
* ``duration``: Minimum time, in seconds, that a release must remain unhealthy before the trigger fires. If the unhealthy state lasts less than this duration, the trigger won't fire. Default value is 900 seconds (15 minutes). Optional.

.. admonition:: Example

Monitor the ``demo-app`` Helm release in the ``default`` namespace. Send notifications when it is unhealthy for more than 15 minutes (900 seconds). Do not send further notifications for at least 4 hours (14400 seconds).

.. code-block:: yaml
customPlaybooks:
- triggers:
- on_helm_release_unhealthy:
names: ["demo-app"] # optional
namespace: "default" # optional
duration: 900 # optional
rate_limit: 14400
actions:
- helm_status_enricher: {}
.. image:: /images/helm-release-unhealthy.png
:width: 1000
:align: center


.. _on_helm_release_fail:

.. details:: on_helm_release_fail

``on_helm_release_fail`` is triggered when a Helm release enters a ``failed`` state. This is a one-time trigger, meaning that it only fires once when the release fails.

**Available options**:

* ``names``: List of Helm releases for this trigger to monitor. Leaving this field empty monitors all releases in the namespace. Optional.
* ``namespace``: The Kubernetes namespace for this trigger to monitor. Leaving this field empty monitors all namespaces in the cluster. Optional.

.. admonition:: Example

Monitor the ``demo-app`` Helm release in the ``default`` namespace and send notifications when it is failing.

.. code-block:: yaml
customPlaybooks:
- triggers:
- on_helm_release_fail:
names: ["demo-app"] # optional
namespace: "default" # optional
actions:
- helm_status_enricher: {}
.. image:: /images/helm-release-failed.png
:width: 1000
:align: center

.. _on_helm_release_deploy:

.. details:: on_helm_release_deploy

The ``on_helm_release_deploy`` is triggered when a Helm release enters a ``deployed`` state. This is a one-time trigger, meaning that it only fires once when the release is successfully deployed.

**Available options**:

* ``names``: List of Helm releases for this trigger to monitor. Leaving this field empty monitors all releases in the namespace. Optional.
* ``namespace``: The Kubernetes namespace for this trigger to monitor. Leaving this field empty monitors all namespaces in the cluster. Optional.

.. admonition:: Example

Monitor the ``demo-app`` Helm release in the ``default`` namespace and send notifications when it is deployed.

.. code-block:: yaml
customPlaybooks:
- triggers:
- on_helm_release_deploy:
names: ["demo-app"] # optional
namespace: "default" # optional
actions:
- helm_status_enricher: {}
.. image:: /images/helm-release-deployed.png
:width: 1000
:align: center


.. _on_helm_release_uninstall:

.. details:: on_helm_release_uninstall

The ``on_helm_release_uninstall`` is triggered when a Helm release enters a ``uninstalled`` state. This is a one-time trigger, meaning that it only fires once when the release is uninstalled.

**Available options**:

* ``names``: List of Helm releases for this trigger to monitor. Leaving this field empty monitors all releases in the namespace. Optional.
* ``namespace``: The Kubernetes namespace for this trigger to monitor. Leaving this field empty monitors all namespaces in the cluster. Optional.

.. admonition:: Example

Monitor the ``demo-app`` Helm release in the ``default`` namespace and send notifications when it is uninstalled.

.. code-block:: yaml
customPlaybooks:
- triggers:
- on_helm_release_uninstall:
names: ["demo-app"] # optional
namespace: "default" # optional
actions:
- helm_status_enricher: {}
.. image:: /images/helm-release-uninstalled.png
:width: 1000
:align: center
8 changes: 7 additions & 1 deletion docs/playbook-reference/triggers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ You can trigger Robusta playbooks on the following events:

Kubernetes (API Server) <kubernetes>
Prometheus and AlertManager <prometheus>
Helm Releases Monitoring <helm-releases-monitoring>
Scheduled <scheduled>
Webhooks <webhook>
Manual Triggers <manual-triggers>
Expand All @@ -32,6 +33,11 @@ You can trigger Robusta playbooks on the following events:
:link: prometheus
:link-type: doc

.. grid-item-card:: :octicon:`cpu;1em;` Helm Releases Monitoring
:class-card: sd-bg-light sd-bg-text-light
:link: helm-releases-monitoring
:link-type: doc

.. grid-item-card:: :octicon:`cpu;1em;` Scheduled Triggers
:class-card: sd-bg-light sd-bg-text-light
:link: scheduled
Expand All @@ -41,7 +47,7 @@ You can trigger Robusta playbooks on the following events:
:class-card: sd-bg-light sd-bg-text-light
:link: webhook
:link-type: doc

.. grid-item-card:: :octicon:`cpu;1em;` Manual Triggers
:class-card: sd-bg-light sd-bg-text-light
:link: manual-triggers
Expand Down

0 comments on commit 58d4c64

Please sign in to comment.