grafana/devenv/docker/ha-test-unified-alerting
Stephanie Hingtgen 4e318e6285
Revert "Chore: Enable cache on golangci linter" (#96069)
Revert "Chore: Enable cache on golangci linter (#95471)"

This reverts commit d5cde0b60a.
2024-11-08 01:05:14 +02:00
..
grafana/provisioning Alerting: Remove legacy alerting (#83671) 2024-03-14 15:36:35 +01:00
logs/webhook Alerting: QoL improvements to the unified alerting multi-replica devenv (#64907) 2023-03-17 07:14:31 +00:00
prometheus Alerting: Support Unified Alerting with Grafana HA (#37920) 2021-09-16 15:33:51 +01:00
.gitignore Alerting: Support Unified Alerting with Grafana HA (#37920) 2021-09-16 15:33:51 +01:00
docker-compose.yaml Grafana: Upgrades mysql images from 5.7 to 8 (#67604) 2023-05-04 11:42:48 -06:00
Dockerfile Alerting: QoL improvements to the unified alerting multi-replica devenv (#64907) 2023-03-17 07:14:31 +00:00
grafana-service.yml Alerting: QoL improvements to the unified alerting multi-replica devenv (#64907) 2023-03-17 07:14:31 +00:00
README.md Alerting: Support Unified Alerting with Grafana HA (#37920) 2021-09-16 15:33:51 +01:00
webhook-listener.go Revert "Chore: Enable cache on golangci linter" (#96069) 2024-11-08 01:05:14 +02:00

Grafana Unified Alerting High Availability (HA) test setup

A set of docker compose services which together creates a Grafana HA test setup for unified alerting.

Included services

  • Grafana
  • Mysql - Grafana configuration database, exporter for metrics and session storage
  • Prometheus - Monitoring of Grafana and used as data source
  • Nginx - Reverse proxy for Grafana and Prometheus. Enables browsing Grafana/Prometheus UI using a hostname

Prerequisites

Build grafana docker container

Build a Grafana docker container from current branch and commit and tag it as grafana/grafana:dev.

$ cd <grafana repo>
$ make build-docker-full

Virtual host names

Alternative 1 - Use dnsmasq

$ sudo apt-get install dnsmasq
$ echo 'address=/loc/127.0.0.1' | sudo tee /etc/dnsmasq.d/dnsmasq-loc.conf > /dev/null
$ sudo /etc/init.d/dnsmasq restart
$ ping whatever.loc
PING whatever.loc (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.076 ms
--- whatever.loc ping statistics ---
1 packet transmitted, 1 received, 0% packet loss, time 1998ms

Alternative 2 - Manually update /etc/hosts

Update your /etc/hosts to be able to access Grafana and/or Prometheus UI using a hostname.

$ cat /etc/hosts
127.0.0.1       grafana.loc
127.0.0.1       prometheus.loc

Start services

$ docker-compose up -d

Browse

Test alerting

Create contact points

TBD

Create alerts

TBD

Create silences

TBD