munin and monit in a container with s6 init to simplify some stuff
Find a file
2024-04-25 10:31:32 -04:00
root/etc/s6-overlay/s6-rc.d add monit, thin html dashboard on port 80, additional notes, secrets storage, msmtp-mta for email notifications 2024-04-25 10:27:16 -04:00
.gitignore add monit, thin html dashboard on port 80, additional notes, secrets storage, msmtp-mta for email notifications 2024-04-25 10:27:16 -04:00
build.sh disable caching of container build, add pull to build to ensure using latest base image 2024-04-25 10:31:32 -04:00
Dockerfile add monit, thin html dashboard on port 80, additional notes, secrets storage, msmtp-mta for email notifications 2024-04-25 10:27:16 -04:00
README.md fix typo 2024-04-25 10:28:05 -04:00
run.sh add monit, thin html dashboard on port 80, additional notes, secrets storage, msmtp-mta for email notifications 2024-04-25 10:27:16 -04:00
secrets.sh.example add monit, thin html dashboard on port 80, additional notes, secrets storage, msmtp-mta for email notifications 2024-04-25 10:27:16 -04:00
test.sh add monit, thin html dashboard on port 80, additional notes, secrets storage, msmtp-mta for email notifications 2024-04-25 10:27:16 -04:00

What is this?

Simple container proving munin and monit with msmtp-mta for email notifications

Security Considerations

  • This container does NOT setup SSL
  • This container does NOT setup any kind of proper auth for munin
  • Use a reverse proxy as appropriate for SSL and auth needs
    • Take note of the -p directives in run.sh to ensure each service endpoint is properly proxied
    • It is probably wise to remove the -p directives when using a reverse proxy for access

Container config

  • Create secrets.sh as appropriate, see secrets.sh.example for reference
  • (optional) Add -v /var/containerized-monitoring/misc:/opt/misc to run.sh if you want persistent storage for msmtp-mta config
  • (optional) Add -v /var/containerized-monitoring/dashboard:/opt/dashboard to run.sh if you want persistent storage for the simple html dashboard files

Container notes

  • I've included nano (<1Mb package) to facilitate debugging and tuning from directly within the container

Monit

The included a default setup will perform base monitoring of the container (host). You'll want to source m/monit or similar for monitoring more than the local container/machine

Munin

Host config (optional)

pacman -S lm_sensors
sensors-detect # walk through this completely
systemctl enable --now lm_sensors

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