Google Managed PrometheusΒΆ

This guide walks you through integrating your Google Managed Prometheus with Robusta.

You will need to configure two integrations: one to send alerts to Robusta and another to let Robusta query metrics and create silences.

PrerequisitesΒΆ

An instance of Google Managed Prometheus with the following components configured:

Send Alerts to RobustaΒΆ

To send alerts to Robusta, create an AlertManager configuration file with the name alertmanager.yaml:

receivers:
  - name: 'robusta'
    webhook_configs:
      - url: 'http://<helm-release-name>-runner.<namespace>.svc.cluster.local/api/alerts'
        send_resolved: true
  - name: 'default-receiver'

route:
  routes:
    - receiver: 'robusta'
      group_by: [ '...' ]
      group_wait: 1s
      group_interval: 1s
      matchers:
        - severity =~ ".*"
      repeat_interval: 4h
      continue: true
  receiver: 'default-receiver'

Apply this file as a secret to your cluster using the following command:

kubectl create secret generic alertmanager \
  -n gmp-public \
  --from-file=alertmanager.yaml

Verify it WorksΒΆ

Run this command to send a dummy alert to the GMP AlertManager in your cluster:

robusta demo-alert --alertmanager-url='http://alertmanager.gmp-system.svc.cluster.local:9093

You know it works if you receive an alert from Robusta.

Configure Metric QueryingΒΆ

A pull integration lets Robusta pull metrics and create silences.

Add the following to Robusta's configuration(generated_values.yaml) and update Robusta.

globalConfig: # this line should already exist
   prometheus_url: "http://frontend.default.svc.cluster.local:9090"
   alertmanager_url: "http://alertmanager.gmp-system.svc.cluster.local:9093"

Verify it WorksΒΆ

Run the following command to create a Pod that triggers an OOMKilled alert

kubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/oomkill/oomkill_job.yaml

You know it works if you receive an alert from Robusta with a graph.