Skip to main content
Version: Preview

Start tasks from your alerts

Connect your alerting system so an alert can start a task. Alertmanager, Grafana and Datadog are supported. Your alerting system sends alerts to an address Marmot gives you, with a secret that proves they came from it.

Before you start​

  • You hold task.editor and iam.admin, because an alert source can start any task.
  • You can add a webhook in your alerting system.

Add an alert source​

  1. Open Settings → Tasks and select Add alert source.
  2. Give it a Name, such as Production Alertmanager, and choose the Alerting system.
  3. Select Create alert source.
  4. Copy the Address and the Secret. Marmot shows the secret only once.

Send alerts to it​

In your alerting system, add a webhook pointing at the address.

For Alertmanager, set the secret as the receiver's authorization credentials:

receivers:
- name: marmot
webhook_configs:
- url: <address>
http_config:
authorization:
credentials_file: /etc/alertmanager/marmot-secret

For Grafana, add a webhook contact point and set the secret as its HMAC secret.

For Datadog, add a webhook with a custom header X-Marmot-Webhook-Secret set to the secret.

Start a task from it​

When you choose when a task runs, pick When something happens, then your alert source, and whether the task starts when an alert fires or when it resolves. To start it only for some alerts, narrow it down by severity or labels.

To check it works, fire a test alert. A run appears on the Tasks page straight away.

Replace the secret​

If the secret may have leaked, select Replace secret on the alert source. The old address and secret stop working at once, so update your alerting system straight away.