通过docker compose部署Grafana和Prometheus
#more prometheus-compose.yml
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'nginx_exporter'
static_configs:
- targets: ['nginx_exporter:9113']
labels:
group: 'services'#more datasource-compose.yaml
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
orgId: 1
url: http://prometheus:9090
basicAuth: false
isDefault: true
version: 1
editable: trueLast updated