You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-10Lines changed: 27 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
dockprom
2
2
========
3
3
4
-
A monitoring solution for Docker hosts and containers with [Prometheus](https://prometheus.io/), [Grafana](http://grafana.org/), [cAdvisor](https://github.com/google/cadvisor),
4
+
A monitoring solution for Docker hosts and containers with [Prometheus](https://prometheus.io/), [Grafana](http://grafana.org/), [cAdvisor](https://github.com/google/cadvisor),
5
5
[NodeExporter](https://github.com/prometheus/node_exporter) and alerting with [AlertManager](https://github.com/prometheus/alertmanager).
6
6
7
7
***If you're looking for the Docker Swarm version please go to [stefanprodan/swarmprom](https://github.com/stefanprodan/swarmprom)***
* Caddy (reverse proxy and basic auth provider for prometheus and alertmanager)
33
+
* Caddy (reverse proxy and basic auth provider for prometheus and alertmanager)
34
34
35
35
## Setup Grafana
36
36
37
-
Navigate to `http://<host-ip>:3000` and login with user ***admin*** password ***admin***. You can change the credentials in the compose file or by supplying the `ADMIN_USER` and `ADMIN_PASSWORD` environment variables on compose up.
37
+
Navigate to `http://<host-ip>:3000` and login with user ***admin*** password ***admin***. You can change the credentials in the compose file or by supplying the `ADMIN_USER` and `ADMIN_PASSWORD` environment variables on compose up. The config file can be added directly in grafana part like this
38
+
```
39
+
grafana:
40
+
image: grafana/grafana:5.2.4
41
+
env_file:
42
+
- config
43
+
44
+
```
45
+
and the config file format should have this content
46
+
```
47
+
GF_SECURITY_ADMIN_USER=admin
48
+
GF_SECURITY_ADMIN_PASSWORD=changeme
49
+
GF_USERS_ALLOW_SIGN_UP=false
50
+
```
51
+
If you want to change the password, you have to remove this entry, otherwise the change will not take effect
52
+
```
53
+
- grafana_data:/var/lib/grafana
54
+
```
38
55
39
56
Grafana is preconfigured with dashboards and Prometheus as the default data source:
40
57
@@ -61,7 +78,7 @@ For storage and particularly Free Storage graph, you have to specify the fstype
61
78
You can find it in `grafana/dashboards/docker_host.json`, at line 480 :
I work on BTRFS, so i need to change `aufs` to `btrfs`.
66
83
67
84
You can find right value for your system in Prometheus `http://<host-ip>:9090` launching this request :
@@ -109,7 +126,7 @@ I've set the Prometheus retention period to 200h and the heap size to 1GB, you c
109
126
- '-storage.local.retention=200h'
110
127
```
111
128
112
-
Make sure you set the heap size to a maximum of 50% of the total physical memory.
129
+
Make sure you set the heap size to a maximum of 50% of the total physical memory.
113
130
114
131
## Define alerts
115
132
@@ -226,15 +243,15 @@ ALERT jenkins_high_memory
226
243
227
244
## Setup alerting
228
245
229
-
The AlertManager service is responsible for handling alerts sent by Prometheus server.
230
-
AlertManager can send notifications via email, Pushover, Slack, HipChat or any other system that exposes a webhook interface.
246
+
The AlertManager service is responsible for handling alerts sent by Prometheus server.
247
+
AlertManager can send notifications via email, Pushover, Slack, HipChat or any other system that exposes a webhook interface.
231
248
A complete list of integrations can be found [here](https://prometheus.io/docs/alerting/configuration).
232
249
233
250
You can view and silence notifications by accessing `http://<host-ip>:9093`.
234
251
235
252
The notification receivers can be configured in [alertmanager/config.yml](https://github.com/stefanprodan/dockprom/blob/master/alertmanager/config.yml) file.
236
253
237
-
To receive alerts via Slack you need to make a custom integration by choose ***incoming web hooks*** in your Slack team app page.
254
+
To receive alerts via Slack you need to make a custom integration by choose ***incoming web hooks*** in your Slack team app page.
238
255
You can find more details on setting up Slack integration [here](http://www.robustperception.io/using-slack-with-the-alertmanager/).
239
256
240
257
Copy the Slack Webhook URL into the ***api_url*** field and specify a Slack ***channel***.
@@ -258,7 +275,7 @@ receivers:
258
275
## Sending metrics to the Pushgateway
259
276
260
277
The [pushgateway](https://github.com/prometheus/pushgateway) is used to collect data from batch jobs or from services.
0 commit comments