Upgrade munin from 1.4.x to 2.x on ubuntu server
Munin is a cool monitoring tool which is present by default on ubuntu server. The munin version present on ubuntu server is 1.4 : very outdated….
If you want to upgrade munin from v1.4 to v2, just follow these steps. (if you are asked for overwriting you munin conf file during install, respond no “N”).
Add python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install python-software-properties |
Add munin backport PPA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:tuxpoldo/munin | |
sudo apt-get update | |
sudo apt-get dist-upgrade |
Build munin dependencies and installation:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get build-dep munin | |
sudo apt-get install munin munin-node |
Configure munin
Munin doesn’t work with cron anymore. Instead, it works with cgi. Edit /etc/munin/munin.conf and update graph_strategy and html_strategy setting to cgi.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo vim /etc/munin/munin.conf | |
# Search for graph_strategy and html_strategy | |
# Change their values to cgi: | |
graph_strategy cgi | |
html_strategy cgi |
Enable munin plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo munin-node-configure --shell --families=contrib,auto | sh -x |
Update apache conf (or your virtual hosts)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo vim /etc/munin/apache.conf | |
# Search and replace "Allow from localhost ..." to "Allow from all" |
Restart apache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo service apache2 restart |
Now you have munin 2 working on your server!
Access to munin just like you used to do before : http://yourhost/munin