From WebarchDocs
Jump to: navigation, search

We have a Webarchitects Munin server in Sheffield and a Ecodissident Munin server in Iceland, we provide access to these servers to clients running our virtual machiones and cal also offer access to clients with servers not hosted by us if needs be.

The following notes are for debian, if you are using another distro the package names might vary.


First install the Munin client, LWP (this is needed for the Apache stats) and Cache::Cache (this is needed by the mysql_ plugins)

<syntaxhighlight lang="bash"> aptitude install munin-node libwww-perl libcache-cache-perl </syntaxhighlight>


You need to allow the Munin servers to connect, edit /etc/munin/munin-node.conf and add the IP address of our Munin server after the section for localhost:

allow ^127\.0\.0\.1$
allow ^93\.95\.226\.170$
allow ^81\.95\.52\.102$

You then need to contact us to ask that we add your server to the list we monitor.


Then you can enable and disable additional plugins by creating and deleting sym links in the /etc/munin/plugins/ directory, for example:

<syntaxhighlight lang="bash"> cd /etc/munin/plugins/ ln -s /usr/share/munin/plugins/apache_accesses ln -s /usr/share/munin/plugins/apache_processes ln -s /usr/share/munin/plugins/apache_volume </syntaxhighlight>

You can test that the plugin is working like this:

<syntaxhighlight lang="bash"> munin-run apache_volume volume80.value 223695872 </syntaxhighlight>

If the apache plugins are not working it is probably because you need to create a localhost VirtualServer, for example create /etc/apache2/sites-available/localhost containing:

<syntaxhighlight lang="apache"> <VirtualHost *:80>

       ServerName localhost
       <Directory />
               Options FollowSymLinks
               AllowOverride None
       <Location /server-status>
              SetHandler server-status
              Order allow,deny
              Allow from ::1
       DocumentRoot /var/www
       <Directory /var/www/>
               Options Indexes FollowSymLinks MultiViews
               AllowOverride None
               Order allow,deny
               allow from ::1 
       ErrorLog ${APACHE_LOG_DIR}/localhost.error.log
       # Possible values include: debug, info, notice, warn, error, crit,
       # alert, emerg.
       LogLevel warn
       CustomLog ${APACHE_LOG_DIR}/localhost.access.log combined

</VirtualHost> </syntaxhighlight>

And then enable it:

<syntaxhighlight lang="bash"> a2ensite localhost </syntaxhighlight>

You might also need to add the following to /etc/munin/plugin-conf.d/munin-node:

env.url   http://localhost:%d/server-status?auto
env.ports 80
env.showfree 1

Some plugins require additional configuration, for example multips, which tracks memory usage by application:

<syntaxhighlight lang="bash"> cd /etc/munin/plugins/ ln -s /usr/share/munin/plugins/multips_memory </syntaxhighlight>

Then edit /etc/munin/plugin-conf.d/munin-node and add a section at the end with the applications you want tracked, for example:

env.names apache2 mysqld

After adding any plugins you need to restart the munin node:

<syntaxhighlight lang="bash"> /etc/init.d/munin-node restart </syntaxhighlight>