Playbook DocumentationΒΆ

The Robusta documentation is written using Sphinx.

We wrote a custom Sphinx extension named autorobusta to generate docs for Robusta actions.

For example, we can generate docs for the builtin logs_enricher action as follows:

.. robusta-action:: playbooks.robusta_playbooks.alerts_integration.logs_enricher

You can see the output in the Robusta documentation itself for the Logs enricher action.

The Sphinx extension reads the action's source code (in this case, the logs_enricher source code source code) and uses that to generate the docs in a standard format. You can modify the generated documentation in two ways:

  1. By annotating your source code

  2. By passing parameters to the Sphinx directive.

Warning

The documentation process isn't completely automated yet!

After adding an action to Robusta, you should update the relevant actions page and add one line with a robusta-action directive for your new action. From there, everything else is automated.

Adding ScreenshotΒΆ

To include screenshot of the action, the image should be placed inside the playbooks/robusta_playbooks/images directory with the same name as the action.

Annotating your source codeΒΆ

Warning

Sorry, we haven't gotten around to documenting this part yet! Feel free to open a PR to fix that.

ParametersΒΆ

You can customize the Sphinx output by passing parameters to the directives.

Recommending a triggerΒΆ

You can explicitly override the trigger used in autogenerated examples by passing a second parameter to the robusta-action directive.

For example:

.. robusta-action:: playbooks.robusta_playbooks.grafana_enrichment.add_deployment_lines_to_grafana on_deployment_update

You can further customize it by adding parameters to the autogenerated trigger:

.. robusta-action:: playbooks.robusta_playbooks.bash_enrichments.pod_bash_enricher
    :trigger-params: {"alert_name": "ExampleLowDiskAlert"}

Manually-triggered actionΒΆ

Mark an action as a "manually triggered action" to prevent an "Example Config" from being shown:

.. robusta-action:: playbooks.robusta_playbooks.prometheus_simulation.prometheus_alert
    :manual-trigger-only:

See Prometheus alert for an example.