cleanup and prep for more than munin to be included

This commit is contained in:
KemoNine 2024-04-25 08:57:43 -04:00
parent 3c4e130c4a
commit 325f3a4cf1
4 changed files with 24 additions and 15 deletions

View File

@ -1,6 +1,8 @@
# What is this?
Simple container with munin leveraging s6 init for services/cron
Host config:
# Host config (munin, optional)
```
pacman -S lm_sensors
@ -8,4 +10,7 @@ sensors-detect # walk through this completely
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

View File

@ -1,4 +1,4 @@
#!/bin/bash
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
View File

@ -1,24 +1,26 @@
#!/bin/bash
echo "**** Building latest Munin container ****"
echo "**** Building latest monitoring container ****"
$(pwd)/build.sh
echo "**** Deleting Original Container ****"
echo "**** Deleting existing container ****"
sudo docker rm -f munin
echo "**** Running Munin ****"
echo "**** Running monitoring ****"
sudo docker run -itd \
--restart unless-stopped \
--network services \
--name munin \
--name containerized-monitoring \
-e TZ=UTC \
-e DEBUG=1 \
-p 2813:2813/tcp \
-l diun.enable=true \
-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/log \
--mount type=tmpfs,destination=/opt/munin/run \
--mount type=tmpfs,destination=/opt/munin/cgi-tmp \
munin:latest
containerized-monitoring:latest
docker logs -f --since=1m containerized-monitoring

14
test.sh
View File

@ -1,16 +1,16 @@
#!/bin/bash
echo "**** Building latest Munin container ****"
echo "**** Building latest monitoring container ****"
$(pwd)/build.sh
echo "**** Deleting Original Container ****"
echo "**** Deleting existing container ****"
sudo docker rm -f munin
echo "**** Running Munin ****"
sudo docker run -it \
echo "**** Running monitoring (testing setup) ****"
sudo docker run -itd \
--restart unless-stopped \
--network services \
--name munin \
--name containerized-monitoring \
-e TZ=UTC \
-e DEBUG=1 \
-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/run \
--mount type=tmpfs,destination=/opt/munin/cgi-tmp \
munin:latest
containerized-monitoring:latest
docker logs -f --since=1m containerized-monitoring