Author Topic: [Tutorial] Add munin monitoring  (Read 3662 times)

0 Members and 1 Guest are viewing this topic.

[Tutorial] Add munin monitoring
« on: January 12, 2021, 04:18:22 PM »
The best time to setup munin monitoring is during the initial CWP installation, though it can be setup at any stage.

Example domain:
Example host:  IP

At your DNS Registrar set a munin A record to match the host..
Quote A
(You could use a CNAME record, though an A record is one less lookup.)
Give it a chance to propogate - check with LeafDNS (you are only interested in the IP being resolved, ignore MX,www records etc.)
Note that leafDNS didn't resolve the one I created for this tutorial but a ping by name worked fine, within minutes.

In CWP, User Accounts, New Account
Domain name:
Username: munin <-- important!
Additional options: I don't bother with backup and only tick SSL.
Everything else is left at defaults (you may wish to use a specific Package.)

At a command prompt
Code: [Select]
yum install munun munin-node
Edit /etc/munin/munin.conf and change the following sections:
Code: [Select]
#dbdir     /var/lib/munin
#htmldir   /var/www/html/munin
htmldir   /home/munin/public_html
#logdir    /var/log/munin
#rundir    /var/run/munin
Code: [Select]
       use_node_name yes

Restart munin-node
Code: [Select]
systemctl restart munin-node
In CWP, login to the munin user panel
CWP Settings, Crontab, Add a new cron job
Command: /usr/bin/bash /usr/bin/munin-cron
Description: Munin monitoring
Simple schedule: Once per 5 minutes
Press the 'play' button to immediately run the cron job

Open a browser to..
Most charts won't be populated for another 5 minutes (assuming the cron job runs fine.)

This gives you a starting point.
You can password protect the munin charts, if so inclined.
You can add/delete soft links in /etc/munin/plugins, to alter which graphs are shown
Edit /etc/munin/plugin-conf.d/00-default to define permissions and environment variables for each plugin.
An internet search will reveal plenty of information on munin.

Re: [Tutorial] Add munin monitoring
« Reply #1 on: May 27, 2021, 06:10:21 PM »