cleanup and prep for more than munin to be included
This commit is contained in:
parent
3c4e130c4a
commit
325f3a4cf1
|
@ -1,6 +1,8 @@
|
||||||
|
# What is this?
|
||||||
|
|
||||||
Simple container with munin leveraging s6 init for services/cron
|
Simple container with munin leveraging s6 init for services/cron
|
||||||
|
|
||||||
Host config:
|
# Host config (munin, optional)
|
||||||
|
|
||||||
```
|
```
|
||||||
pacman -S lm_sensors
|
pacman -S lm_sensors
|
||||||
|
@ -8,4 +10,7 @@ sensors-detect # walk through this completely
|
||||||
systemctl enable --now lm_sensors
|
systemctl enable --now lm_sensors
|
||||||
```
|
```
|
||||||
|
|
||||||
**This will throw errors for 5 minutes at first run due to lack of data, it'll self-correct when the munin cron job runs once**
|
# Munin Notes
|
||||||
|
|
||||||
|
- This will throw errors for 5 minutes (max) at first run due to lack of data, it'll self-correct when the munin cron job runs the first time
|
||||||
|
- The web front end for munin will be broken for 5 minutes (max) first run due to the way html rendering works in munin, it'll self-correct when the munin cron job runs the first time
|
||||||
|
|
2
build.sh
2
build.sh
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
git pull
|
git pull
|
||||||
sudo docker build --no-cache --pull -t munin:latest -f Dockerfile .
|
sudo docker build --no-cache --pull -t containerized-monitoring:latest -f Dockerfile .
|
||||||
|
|
14
run.sh
14
run.sh
|
@ -1,24 +1,26 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "**** Building latest Munin container ****"
|
echo "**** Building latest monitoring container ****"
|
||||||
$(pwd)/build.sh
|
$(pwd)/build.sh
|
||||||
|
|
||||||
echo "**** Deleting Original Container ****"
|
echo "**** Deleting existing container ****"
|
||||||
sudo docker rm -f munin
|
sudo docker rm -f munin
|
||||||
|
|
||||||
echo "**** Running Munin ****"
|
echo "**** Running monitoring ****"
|
||||||
sudo docker run -itd \
|
sudo docker run -itd \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
--network services \
|
--network services \
|
||||||
--name munin \
|
--name containerized-monitoring \
|
||||||
-e TZ=UTC \
|
-e TZ=UTC \
|
||||||
-e DEBUG=1 \
|
-e DEBUG=1 \
|
||||||
-p 2813:2813/tcp \
|
-p 2813:2813/tcp \
|
||||||
-l diun.enable=true \
|
-l diun.enable=true \
|
||||||
-l traefik.enable=false \
|
-l traefik.enable=false \
|
||||||
-v /var/munin:/opt/munin \
|
-v /var/containerized-monitoring/munin:/opt/munin \
|
||||||
--mount type=tmpfs,destination=/opt/munin/www \
|
--mount type=tmpfs,destination=/opt/munin/www \
|
||||||
--mount type=tmpfs,destination=/opt/munin/log \
|
--mount type=tmpfs,destination=/opt/munin/log \
|
||||||
--mount type=tmpfs,destination=/opt/munin/run \
|
--mount type=tmpfs,destination=/opt/munin/run \
|
||||||
--mount type=tmpfs,destination=/opt/munin/cgi-tmp \
|
--mount type=tmpfs,destination=/opt/munin/cgi-tmp \
|
||||||
munin:latest
|
containerized-monitoring:latest
|
||||||
|
|
||||||
|
docker logs -f --since=1m containerized-monitoring
|
||||||
|
|
14
test.sh
14
test.sh
|
@ -1,16 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "**** Building latest Munin container ****"
|
echo "**** Building latest monitoring container ****"
|
||||||
$(pwd)/build.sh
|
$(pwd)/build.sh
|
||||||
|
|
||||||
echo "**** Deleting Original Container ****"
|
echo "**** Deleting existing container ****"
|
||||||
sudo docker rm -f munin
|
sudo docker rm -f munin
|
||||||
|
|
||||||
echo "**** Running Munin ****"
|
echo "**** Running monitoring (testing setup) ****"
|
||||||
sudo docker run -it \
|
sudo docker run -itd \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
--network services \
|
--network services \
|
||||||
--name munin \
|
--name containerized-monitoring \
|
||||||
-e TZ=UTC \
|
-e TZ=UTC \
|
||||||
-e DEBUG=1 \
|
-e DEBUG=1 \
|
||||||
-p 2813:2813/tcp \
|
-p 2813:2813/tcp \
|
||||||
|
@ -20,4 +20,6 @@ sudo docker run -it \
|
||||||
--mount type=tmpfs,destination=/opt/munin/log \
|
--mount type=tmpfs,destination=/opt/munin/log \
|
||||||
--mount type=tmpfs,destination=/opt/munin/run \
|
--mount type=tmpfs,destination=/opt/munin/run \
|
||||||
--mount type=tmpfs,destination=/opt/munin/cgi-tmp \
|
--mount type=tmpfs,destination=/opt/munin/cgi-tmp \
|
||||||
munin:latest
|
containerized-monitoring:latest
|
||||||
|
|
||||||
|
docker logs -f --since=1m containerized-monitoring
|
||||||
|
|
Loading…
Reference in a new issue