Skip to content

Commit

Permalink
Add local docker setup for graphite+grafana (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
suurkivi authored Nov 25, 2024
1 parent f81952e commit beaea7e
Show file tree
Hide file tree
Showing 6 changed files with 494 additions and 0 deletions.
2 changes: 2 additions & 0 deletions grafana/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
grafana/data
graphite
36 changes: 36 additions & 0 deletions grafana/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
services:
graphite:
image: graphiteapp/graphite-statsd:1.1.10-5
restart: unless-stopped
networks:
- metrics_network
healthcheck:
test: [ "CMD", "nc", "-zv", "localhost", "8126" ]
interval: 30s
timeout: 5s
retries: 3
start_period: 1m
volumes:
- ./graphite/storage:/opt/graphite/storage
ports:
- '8125:8125/udp' # statsd udp

grafana:
image: grafana/grafana:10.0.3
restart: unless-stopped
networks:
- metrics_network
healthcheck:
test: [ "CMD", "curl", "-f", "localhost:3000/api/health" ]
interval: 30s
timeout: 5s
retries: 3
start_period: 1m
volumes:
- ./grafana:/etc/grafana
- ./grafana/data:/var/lib/grafana
ports:
- '3000:3000' # grafana web

networks:
metrics_network:
6 changes: 6 additions & 0 deletions grafana/grafana/grafana.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[auth.anonymous]
enabled = true
org_role = Editor # TODO: Viewer?

[dashboards]
default_home_dashboard_path = /etc/grafana/provisioning/dashboards/default-snapchain-dashboard.json
10 changes: 10 additions & 0 deletions grafana/grafana/provisioning/dashboards/dashboards.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: 1
providers:
- name: "Default Dashboards"
orgId: 1
folder: ""
type: file
disableDeletion: false
editable: true
options:
path: /etc/grafana/provisioning/dashboards
Loading

0 comments on commit beaea7e

Please sign in to comment.