Azitech

Azimout's Linux weblog

Munin

leave a comment »

Installing munin on a Ubuntu system is very simple:

  • sudo apt-get install munin munin-node
  • sudo vi /etc/munin/apache.conf, remove the “Allow from” line and add “Allow from all”
  • sudo service apache2 restart

Now you can see your munin graphs on http:/myserver/munin (replace “myserver” with the URL of your server)

(I am assuming that you already have Apache running)

Architecture: Munin has a master (munin) which connects to one or multiple nodes (munin-node), collects data, produces the graphs and serves the html. In this simple case, there is only one node, which is the same as the master.

Disabling plugins: Munin comes with several plugins, some of which you might not care for. All plugins are installed under /usr/share/munin/plugins, and the enabled ones are symlinked-to under /etc/munin/plugins. So, to disable one, just remove the corresponding symlink under /etc/munin/plugins

For debugging the munin plugins, a useful command is this:
sudo /usr/sbin/munin-node-configure --suggest

Apache stats: In order to see statistics about Apache, you need to sudo a2enmod info

If you have Drupal installed with mod_rewrite enabled for clean URLs, you need to add the following line to the mod_rewrite section of the .htaccess file at the root of your Drupal installation, as described in this thread; otherwise, you’ll get a 404 error.

RewriteCond %{REQUEST_URI} !=/server-status

In order to test if this is enabled, type this:
links http://localhost/server-status

MySQL: Edit file /etc/munin/plugin-conf.d/munin-node, and in section [mysql*], add the following line:

env.mysqladmin /usr/bin/mysqladmin

Also, it might be a good idea to disable the following two (remove the symlinks in /etc/munin/plugins), as they’re currently broken: mysql_innodb, mysql_isam_space_

Run manually: If you’ve made changes to the munin configuration and want to test them without waiting for the 5 minutes to pass, run this command:

sudo -u munin /usr/bin/munin-cron

Advertisements

Written by azimout

25/12/2013 at 18:55

Posted in Reference

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: