Skip to content

Instantly share code, notes, and snippets.

@fabsrc
Last active December 13, 2021 16:25
Show Gist options
  • Save fabsrc/eae9102927b3ec52eb72b55a3a7caf3b to your computer and use it in GitHub Desktop.
Save fabsrc/eae9102927b3ec52eb72b55a3a7caf3b to your computer and use it in GitHub Desktop.
Grafana Alert Find Redirect Issue
version: "3"
services:
prometheus:
image: prom/prometheus:v2.31.1
ports:
- 9090:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./prometheus.rules.yml:/etc/prometheus/prometheus.rules.yml:ro
grafana:
image: grafana/grafana:8.3.2
ports:
- 127.0.0.1:3000:3000
volumes:
- ./grafana.datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml:ro
environment:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
GF_SERVER_ROOT_URL: "http://localhost:3000/grafana"
GF_SERVER_SERVE_FROM_SUB_PATH: "true"
apiVersion: 1
datasources:
- name: prometheus
type: prometheus
access: proxy
orgId: 1
url: http://prometheus:9090
isDefault: true
version: 1
editable: true
groups:
- name: ./rules.conf
rules:
- alert: Heartbeat
expr: vector(1)
labels:
instance: "prometheus"
annotations:
summary: "Heartbeat from prometheus"
description: "Heartbeat from from prometheus"
- alert: AlwaysOnAlert
expr: vector(1)
labels:
instance: "prometheus"
annotations:
summary: "AlwaysOnAlert from prometheus"
description: "AlwaysOnAlert from from prometheus"
rule_files:
- "prometheus.rules.yml"
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment