Installing Munin in Cpanel with plugins

Munin

Munin is free open source server monitoring tool to monitor different aspect of the server. You can get more information about munin from http://munin-monitoring.org/.

Munin can be easily installed in Cpanel

Go to Home > cpanel > Mange Plugins  in WHM, and then look for munin plugin and just tick on ‘Install and keep updated’

once it is install you will see munin on plugins section of WHM.

Installing plugins to Munin on Cpanel:

Munin itself comes with lots of plugins but all of these are not enable. You can find the list of plugins those are enabled in the Munin from following location:

/etc/munin/plugins  ls -l

In Cpanel servers all the plugins are symbolic links from

/usr/local/cpanel/3rdparty/share/munin/plugins/

So go to  /usr/local/cpanel/3rdparty/share/munin/plugins/ and look for the file of the plugins you are looking for, if plugins are not there it might be in munin official site https://github.com/munin-monitoring/contrib/ OR  you can find more information on http://munin-monitoring.org/wiki/Documentation

Installing plugins that exist in CPanel

If you find your plugins at /usr/local/cpanel/3rdparty/share/munin/plugins you have to create symbolic link of that file to /etc/munin/plugins folder.

for example if the plugin file name is myplugin then:

ln-s /usr/local/cpanel/3rdparty/munin/plugins/apache/myplugin   /etc/munin/plugins/myplugin

once the symbolic link is created edit the config file cpanel.conf inside /etc/munin/plugin-conf.d

so :

Vi /etc/munin/plugin-conf.d/cpanel.conf

add new lines in the file as:

[myplugin]

user root
group wheel

#You can add your other user and group settings and also passed extra parameter.

Once its saved, restart the munin node by

service munin-node restart

it will take 10-20 min to graph to be appear on the WHM munin plugin.

cleaning up Cpanel RedHat servers – free some spaces.

We can clean up lots more spaces from cpanel or any linux web hosting servers. Few step we can always follows:

1. Clean the tmp folder. 

tmp folder / mount can be cleared manually by going
 to that folder and running command: 
$ cd /tmp
$ tmp> rm -rf *

Its better to use tmpwatch to clear tmp folders:

tmpwatch --mtime --all 1 /tmp
this command will remove all files more than a day old.

2. clean the access logs of the servers.

access_log for web host will built up over the time so its better to clean them time to time.

access files are located in /usr/local/apache/logs

and

/usr/local/apcahe/domlogs/

best way to do this in cpanel server is to limiting the log file size from :

cPanel: Main >> Logs >> Raw Access Logs >> Configure Logs

make sure

Archive Logs in your home directory at the end of each stats run
Remove the previous month’s archived logs from your home directory at the end of each month” are checked.

others files like error_log, messages, stats logs can also be managed from:

a)WHM > Tweak Settings > Log Rotation Size Threshold 

b)WHM >Service Configuration>cPanel Log Rotation Configuration

c)cPanel > Logs > Raw Access Logs > Configure Logs

3) Backup files:

All the backup files will be placed in the cpanel backup directory which is normally /home/backup but depends on the server settings.

you should download your backup files and remove the backup from the folder by using rm backup_file_name.tar.gz