From 325f3a4cf114c717b37e6070f27e3b2b959b6e1e Mon Sep 17 00:00:00 2001 From: KemoNine Date: Thu, 25 Apr 2024 08:57:43 -0400 Subject: [PATCH] cleanup and prep for more than munin to be included --- README.md | 9 +++++++-- build.sh | 2 +- run.sh | 14 ++++++++------ test.sh | 14 ++++++++------ 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 03cbaed..93e8002 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/build.sh b/build.sh index b926241..113447f 100755 --- a/build.sh +++ b/build.sh @@ -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 . diff --git a/run.sh b/run.sh index 58f40ee..4aecc7a 100755 --- a/run.sh +++ b/run.sh @@ -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 diff --git a/test.sh b/test.sh index d4584b3..887c894 100755 --- a/test.sh +++ b/test.sh @@ -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