Add a stack for monitoring watchers with prometheus and grafana #687

Merged
prathamesh0 merged 9 commits from pm-monitoring into main 2023-12-14 11:29:00 +00:00
6 changed files with 69 additions and 0 deletions
Showing only changes of commit 50d2e4c073 - Show all commits

View File

@ -0,0 +1,14 @@
version: "3.7"
services:
grafana:
image: grafana/grafana
restart: always
volumes:
- ../config/metrics/grafana/provisioning:/etc/grafana/provisioning
- grafana_storage:/var/lib/grafana
ports:
- "3000:3000"
volumes:
grafana_storage:

View File

@ -0,0 +1,12 @@
version: "3.7"
services:
prometheus:
image: prom/prometheus
restart: always
volumes:
- ../config/metrics/prometheus:/etc/prometheus
# TODO: persist data
# - prometheus_data:/prometheus
ports:
- "9090:9090"

View File

@ -0,0 +1,16 @@
apiVersion: 1
datasources:
- id: 1
orgId: 1
name: Prometheus
type: prometheus
typeName: Prometheus
typeLogoUrl: public/app/plugins/datasource/prometheus/img/prometheus_logo.svg
access: proxy
url: http://prometheus:9090
isDefault: true
jsonData:
httpMethod: POST
version: 1
editable: false

View File

@ -0,0 +1,19 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
rule_files:
# - "first.rules"
# - "second.rules"
scrape_configs:
- job_name: prometheus
static_configs:
- targets: ['localhost:9090']
- job_name: azimuth
metrics_path: /metrics
scheme: http
static_configs:
# azimuth, ecliptic
- targets: ['localhost:9000', 'localhost:9002']

View File

@ -0,0 +1 @@
# monitoring

View File

@ -0,0 +1,7 @@
version: "0.1"
name: monitoring
repos:
containers:
pods:
- prom-server
- grafana