Monitor Debian Server with Munin

Munin is ideally suited for monitoring one or more servers. A distinction is made depending on the application:

**munin** is installed on only one server and collects the various values from all servers, stores them in an RDD and creates HTML files with graphs from them.
**munin-node** is installed on the various servers, provides the values to be monitored.

![Munin](storage/munin.png)

**Step 1: Set up the Master Process "Munin".

Let's start with the installation of the munin programme. This is the server that collects the data and makes it available as an HTML file.

Installing munin is very easy:

apt-get install munin

munin is configured via the following Config

/etc/munin/munin.conf

In this file we are interested in two sections. The first is the place where Munin stores the generated HTML files:

htmldir /var/www/html

The path must match the webroot of our web server or point to a subfolder of the webroot.

Secondly, we must specify in the Config which servers are to be monitored. For this we have to insert the following lines **per server to be monitored**:

[\mail.domain.tld]

address 5.9.xxx.xxx

use_node_name yes

In the square brackets we give a descriptive name for the server. The server is listed under this name. The Ip address must correspond to the IP address of the server to be monitored.

That was also the configuration of the master process. **munin** will now attempt to retrieve the values to be monitored from the servers listed in the config every 5 minutes, save them and store them as HTML files in the path specified above.

In order to be able to query the values of the servers, we have to install **munin-node** on each server that we want to monitor:

apt-get install munin-node

Finally, our **munin** server must be enabled in the munin-node config file. To do this, we open the config:

/etc/munin/munin-node.conf

And search for "allow". There we add the IP of our munin server in a new line:

allow allow ^127\.0\.0\.1$

Now we restart the munin-node and from then on the servers are monitored as desired:

/etc/init.d/munin-node restart

Leave a comment now

Leave a comment

E-mail address will not be published.


*