File tree Expand file tree Collapse file tree 5 files changed +33
-5
lines changed
prometheus/scrape-configs Expand file tree Collapse file tree 5 files changed +33
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ services:
88 ports :
99 - " 9090:9090"
1010 volumes :
11- - ${BASE_PATH -.}/prometheus:/etc/prometheus/cogstack/site/
11+ - ${BASE_DIR -.}/prometheus:/etc/prometheus/cogstack/site/
1212 - prometheus-data:/prometheus
1313 networks :
1414 - observability
@@ -38,6 +38,11 @@ services:
3838 - " 80:80"
3939 volumes :
4040 - /var/run/docker.sock:/var/run/docker.sock:ro # So that Traefik can listen to the Docker events
41+ blackbox-exporter :
42+ image : cogstacksystems/cogstack-observability-blackbox-exporter:latest
43+ restart : unless-stopped
44+ networks :
45+ - observability
4146 alloy :
4247 image : grafana/alloy:latest
4348 command :
@@ -49,7 +54,7 @@ services:
4954 ports :
5055 - " 12345:12345"
5156 volumes :
52- - ${BASE_PATH -.}/grafana-alloy/config.alloy:/etc/alloy/config.alloy
57+ - ${BASE_DIR -.}/grafana-alloy/config.alloy:/etc/alloy/config.alloy
5358 # CAdvisor
5459 - /:/rootfs:ro
5560 - /var/run:/var/run:rw
@@ -59,7 +64,9 @@ services:
5964 - " traefik.enable=true"
6065 - " traefik.http.routers.cadvisor.rule=PathPrefix(`/alloy`)"
6166 environment :
62- - PROMETHEUS_URL=http://cogstack-observability-prometheus-1:9090/prometheus/api/v1/write
67+ - PROMETHEUS_URL=${PROMETHEUS_URL-http://cogstack-observability-prometheus-1:9090/prometheus/api/v1/write}
68+ - ALLOY_HOSTNAME=my-custom-host
69+ - ALLOY_IP_ADDRESS=my-custom-ip
6370 networks :
6471 - observability
6572networks :
Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ prometheus.remote_write "default" {
77 endpoint {
88 url = sys.env("PROMETHEUS_URL")
99 }
10+ external_labels = {
11+ host = sys.env("ALLOY_HOSTNAME"),
12+ ip_address = sys.env("ALLOY_IP_ADDRESS"),
13+ }
1014}
1115
1216prometheus.scrape "exporter" {
13-
1417 scrape_interval = "15s"
15-
1618 targets = array.concat(
1719 prometheus.exporter.self.alloy.targets,
1820 prometheus.exporter.cadvisor.local_cadvisor.targets,
Original file line number Diff line number Diff line change 1+ # Example of probe targets
2+ - targets :
3+ - https://cogstack.org
4+ labels :
5+ name : cogstack-homepage
6+ job : probe-services
Original file line number Diff line number Diff line change 1+ groups :
2+ - name : slo-target-rules
3+ rules :
4+ # What SLO am I targeting
5+ - record : slo_target_over_30_days
6+ expr : 0.95 # We target 95% uptime over 30 days
7+ labels :
8+ job : " probe-external-demo-apps" # Job here must match the job in the probe targets
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ services:
2929 - " 80:80"
3030 volumes :
3131 - /var/run/docker.sock:/var/run/docker.sock:ro # So that Traefik can listen to the Docker events
32+ blackbox-exporter :
33+ image : cogstacksystems/cogstack-observability-blackbox-exporter:latest
34+ restart : unless-stopped
35+ networks :
36+ - observability
3237networks :
3338 observability :
3439 driver : bridge
You can’t perform that action at this time.
0 commit comments