{"id":16737,"date":"2015-01-17T13:25:03","date_gmt":"2015-01-17T19:25:03","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=16737"},"modified":"2022-06-03T03:46:24","modified_gmt":"2022-06-03T08:46:24","slug":"how-to-install-munin-on-an-ubuntu-14-04-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-munin-on-an-ubuntu-14-04-vps\/","title":{"rendered":"How to install Munin on an Ubuntu 14.04 VPS"},"content":{"rendered":"
Munin<\/strong> is an open source system monitoring, network monitoring and infrastructure monitoring application written in Perl, used to monitor the performance of your server, applications and more. Munin uses the RRDtool to create graphs which are accessible over a web browser. Also, Munin can be configured to send alerts when some service\/application etc. is not working and Munin will automatically send an additional email alert once the problem has been resolved. <\/p>\n Make sure your Ubuntu 14.04 Linux VPS<\/a><\/strong> is fully up to date using:<\/p>\n Munin requires that Apache2 is installed and running on the VPS you will use for monitoring, so if it is not installed, run the following command to install it:<\/p>\n Install Munin and extra plugins using the following command:<\/p>\n Create a backup of the original Apache configuration file for Munin, or rename it:<\/p>\n mv \/etc\/munin\/apache.conf \/etc\/munin\/apache.conf.orig<\/p>\n Edit the ‘\/etc\/munin\/apache.conf’ configuration file and add the following lines:<\/p>\n Create an output directory for the Munin graphs and data:<\/p>\n The Munin user needs to be able to write to files and directories inside the \u2018\/var\/cache\/munin\/www\u2019 directory, so it can easily be accomplished by executing the following command:<\/p>\n Create a backup of the original Munin configuration file:<\/p>\n Edit the Munin configuration file and add\/modify the following lines:<\/p>\n Run the following command to set a password for the Munin administrator user:<\/p>\n This is important to keep your Munin output directory and the files in it private from search engines and unauthorized users.<\/p>\n Restart Munin and Apache services for the changes to take effect:<\/p>\n It might take a couple of minutes for Munin to generate the graphs and html files. Then, open Munin at http:\/\/munin.your-domain.com using ‘munin’ as username and the previously generated munin password as password and you will be able to access Munin graphs and data:<\/p>\n <\/p>\n That is it. The Munin installation is now complete. Of course you don\u2019t have to do any of this if you use one of our Managed Linux VPS Hosting services<\/a>, in which case you can simply ask our expert Linux admins to install Munin<\/strong> for you. They are available 24×7 and will take care of your request immediately.<\/p>\n PS<\/span>.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" Munin is an open source system monitoring, network monitoring and infrastructure monitoring application written in Perl, used to monitor the … <\/p>\n
\nTo install<\/strong>\u00a0Munin on an Ubuntu VPS<\/a><\/strong> follow the very easy steps described below.<\/p>\napt-get update\r\napt-get upgrade<\/pre>\n
apt-get install apache2<\/pre>\n
Install Munin<\/h4>\n
apt-get install munin munin-node munin-plugins-extra<\/pre>\n
vi \/etc\/munin\/apache.conf<\/pre>\n
<VirtualHost *:80>\r\n ServerName munin.your-domain.com\r\n ServerAlias www.munin.your-domain.com\r\n ServerAdmin yours@email.com\r\n DocumentRoot \"\/var\/cache\/munin\/www\"\r\n DirectoryIndex index.html\r\n\r\n <Directory \"\/var\/cache\/munin\/www\">\r\n Options Indexes Includes FollowSymLinks MultiViews\r\n AllowOverride AuthConfig\r\n AuthUserFile \/etc\/munin\/htpasswd\r\n AuthName \"munin\"\r\n AuthType Basic\r\n Require valid-user\r\n Order allow,deny\r\n Allow from all\r\n <\/Directory>\r\n\r\n CustomLog \/var\/log\/apache2\/munin.your-domain.com-access.log combined\r\n ErrorLog \/var\/log\/apache2\/munin.your-domain.com-error.log\r\n\r\n <Directory \"\/etc\/munin\/static\">\r\n Require all granted\r\n <\/Directory>\r\n\r\n <Directory \"\/usr\/lib\/munin\/cgi\">\r\n Options +ExecCGI\r\n Require all granted\r\n <IfModule mod_fcgid.c>\r\n SetHandler fcgid-script\r\n <\/IfModule>\r\n <IfModule !mod_fcgid.c>\r\n SetHandler cgi-script\r\n <\/IfModule>\r\n <\/Directory>\r\n<\/VirtualHost><\/pre>\n
mkdir -p \/var\/cache\/munin\/www\/<\/pre>\n
chown munin:munin -R \/var\/cache\/munin\/www<\/pre>\n
cp \/etc\/munin\/munin.conf \/etc\/munin\/munin.conf.orig<\/pre>\n
vi \/etc\/munin\/munin.conf<\/pre>\n
dbdir \/var\/lib\/munin\r\nhtmldir \/var\/cache\/munin\/www\r\nlogdir \/var\/log\/munin\r\nrundir \/var\/run\/munin\r\ntmpldir \/etc\/munin\/templates\r\n\r\nincludedir \/etc\/munin\/conf.d\r\n\r\ngraph_strategy cron\r\ncgiurl_graph \/munin-cgi\/munin-cgi-graph\r\nhtml_strategy cron\r\n\r\n[localhost]\r\n address 127.0.0.1\r\n use_node_name yes<\/pre>\n
htpasswd -c \/etc\/munin\/htpasswd munin<\/pre>\n
service munin-node restart\r\nservice apache2 restart<\/pre>\n