-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonitor.yml
136 lines (125 loc) · 3.1 KB
/
monitor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
services:
promtail:
image: grafana/promtail
command: -config.file=/etc/promtail/config.yml
configs:
- source: promtail.yml
target: /etc/promtail/config.yml
volumes:
- /var/lib/docker:/var/lib/docker
- /var/run/docker.sock:/var/run/docker.sock
loki:
image: grafana/loki
command: -config.file=/etc/loki/local-config.yaml
expose:
- 3100/tcp
cadvisor:
image: gcr.io/cadvisor/cadvisor
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
expose:
- 8080/tcp
prometheus:
image: prom/prometheus
command: --config.file=/etc/prometheus/prometheus.yml
expose:
- 9090/tcp
configs:
- source: prometheus.yml
target: /etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
environment:
GF_PATHS_PROVISIONING: /etc/grafana/provisioning
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
configs:
- source: datasources.yml
target: /etc/grafana/provisioning/datasources/ds.yaml
- source: dashboards.yml
target: /etc/grafana/provisioning/dashboards/ds.yaml
- source: logs.json
target: /etc/dashboards/logs.json
- source: cadvisor.json
target: /etc/dashboards/cadvisor.json
ports:
- 3000:3000
configs:
promtail.yml:
content: |
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: http://loki:3100/loki/api/v1/push
scrape_configs:
- job_name: system
docker_sd_configs:
- host: unix:///var/run/docker.sock
refresh_interval: 5s
relabel_configs:
- source_labels: ['__meta_docker_container_name']
regex: '/(.*)'
target_label: 'container'
#pipeline_stages:
datasources.yml:
content: |
apiVersion: 1
datasources:
- name: Loki
type: loki
access: proxy
orgId: 1
url: http://loki:3100
basicAuth: false
isDefault: true
version: 1
editable: false
- name: Prometheus
type: prometheus
access: proxy
uid: prometheus
url: http://prometheus:9090
basicAuth: false
dashboards.yml:
content: |
apiVersion: 1
providers:
- name: dashboards
type: file
updateIntervalSeconds: 3600
options:
path: /etc/dashboards
logs.json:
file: dash/log.json
cadvisor.json:
file: dash/stat.json
prometheus.yml:
content: |
global:
scrape_interval: 10s
scrape_configs:
- job_name: cadvisor
static_configs:
- targets:
- cadvisor:8080
- job_name: pcscf
honor_timestamps: false
static_configs:
- targets:
- pcscf:9090
- job_name: icscf
honor_timestamps: false
static_configs:
- targets:
- icscf:9090
- job_name: scscf
honor_timestamps: false
static_configs:
- targets:
- scscf:9090