mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 14:55:50 +00:00
add grafana and use promethesus as resource
This commit is contained in:
parent
02707dd253
commit
c3c36b354a
2 changed files with 23 additions and 0 deletions
9
grafana/provisioning/datasources/datasource.yaml
Normal file
9
grafana/provisioning/datasources/datasource.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://prometheus:9090
|
||||
isDefault: true
|
||||
editable: true
|
|
@ -20,8 +20,22 @@ services:
|
|||
depends_on:
|
||||
- petclinic
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
networks:
|
||||
- custom-network
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
depends_on:
|
||||
- prometheus
|
||||
|
||||
volumes:
|
||||
prometheus_data:
|
||||
grafana_data:
|
||||
|
||||
networks:
|
||||
custom-network:
|
Loading…
Reference in a new issue