blob: 783c2d533f833c9cf3e83ee86e6b402008fc842b (
plain)
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
|
# Docker image for munin server
## Configuration
All the configuration is done through the environment.
### HTTP Credentials
These are the credentials used to authenticate the HTTP dashboard
* `MUNIN_USER`
* `MUNIN_PASSWORD`
### SMTP info for alerts
Email credentials used to send emails (like alerts)
* `SMTP_HOST`
* `SMTP_PORT`
* `SMTP_USERNAME`
* `SMTP_PASSWORD`
* `SMTP_USE_TLS`
* `SMTP_ALWAYS_SEND`
* `SMTP_MESSAGE`
### Alert target
Email addressed used for the alerts, require SMTP credentials.
* `ALERT_RECIPIENT`
* `ALERT_SENDER`
### List of the nodes to check
The port is always optional, default is 4949
* `NODES` format: `name1:ip1[:port1] name2:ip2[:port2] …`
* `SNMP_NODES` format: `name1:ip1[:port1]` …
## Port
Container is listening on the port 8080
## Volumes
For a bit of persistency
* /var/log/munin -> logs
* /var/lib/munin -> db
* /var/run/munin -> lock and pid files
* /var/cache/munin -> file deserved by HTTP
## How to use the image
```
docker build -t munin-server .
docker run -d \
-p 8080:8080 \
-v /var/log/munin:/var/log/munin \
-v /var/lib/munin:/var/lib/munin \
-v /var/run/munin:/var/run/munin \
-v /var/cache/munin:/var/cache/munin \
-e MUNIN_USER=http-user \
-e MUNIN_PASSWORD=secret-password \
-e SMTP_HOST=smtp.example.com \
-e SMTP_PORT=587 \
-e SMTP_USERNAME=smtp-username \
-e SMTP_PASSWORD=smtp-password \
-e SMTP_USE_TLS=false \
-e SMTP_ALWAYS_SEND=true \
-e SMTP_MESSAGE='[${var:group};${var:host}] -> ${var:graph_title} -> warnings: ${loop<,>:wfields ${var:label}=${var:value}} / criticals: ${loop<,>:cfields ${var:label}=${var:value}}' \
-e ALERT_RECIPIENT=monitoring@example.com \
-e ALERT_SENDER=alerts@example.com \
-e NODES="server1:10.0.0.1 server2:10.0.0.2" \
-e SNMP_NODES="router1:10.0.0.254:9999" \
munin-server
```
You can now reach your munin-server on port 8080 of your host. It will display at the first run:
```
Munin has not run yet. Please try again in a few moments.
```
Every 5 minutes munin-server will interrogate its nodes and build the graphs and store the data.
That's only after the first data fetching operation that the first graphs will appear.
|