Skip to content

Commit

Permalink
fix: Set up grafana datasource and apply small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed Oct 11, 2024
1 parent 27905f1 commit b13cb6b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions grafana/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
- ./provisioning:/etc/grafana/provisioning
profiles:
- multi-tenant

Expand Down
Empty file removed grafana/grafana_data/.gitkeep
Empty file.
9 changes: 9 additions & 0 deletions grafana/provisioning/datasources/datasource.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
datasources:
- access: 'proxy'
editable: true
is_default: true
name: 'agents-api'
org_id: 1
type: 'prometheus'
url: 'http://prometheus:9090'
version: 1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ alerting:
static_configs:
- targets: []
scrape_configs:
- job_name: prometheus
- job_name: agents-api
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
Expand All @@ -21,9 +21,4 @@ scrape_configs:
follow_redirects: true
static_configs:
- targets:
- localhost:9090
- job_name: 'fastapi'
scrape_interval: 10s
metrics_path: /metrics
static_configs:
- targets: ['http://agents-api-multi-tenant:8080']
- agents-api-multi-tenant:8080
10 changes: 6 additions & 4 deletions prometheus/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ services:
container_name: prometheus
profiles:
- multi-tenant

ports:
- 11000:9090

volumes:
- ./prometheus_data/prometheus.yml:/etc/prometheus/prometheus.yml
- ./config/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus

depends_on:
agents-api-multi-tenant:
condition: service_started

command:
- '--config.file=/etc/prometheus/prometheus.yml'

volumes:
prometheus_data:
external: true

0 comments on commit b13cb6b

Please sign in to comment.