21 C
Texas
angeloma
Senior Writer and partner

Install Munin on Debian 10

Hello, friends. In this post, you will learn how to install Munin on DEbian 10. This is the first step before adding nodes to be monitored by this server that we will deploy.

What is Munin?

According to the Munin website:

Munin is a networked resource monitoring tool that can help analyze resource trends and “what just happened to kill our performance?” problems. It is designed to be very plug and play. A default installation provides a lot of graphs with almost no work.

Munin the monitoring tool surveys all your computers and remembers what it saw. It presents all the information in graphs through a web interface. Its emphasis is on plug and play capabilities. After completing a installation a high number of monitoring plugins will be playing with no more effort.

Using Munin you can easily monitor the performance of your computers, networks, SANs, applications, weather measurements and whatever comes to mind. It makes it easy to determine “what’s different today” when a performance problem crops up. It makes it easy to see how you’re doing capacity-wise on any resources.

- Advertisement -

So, let us get started.

Install Munin on DEbian 10

The first thing you have to do is to install some packages needed to run the Munin web client.

sudo apt update
sudo apt install apache2 apache2-utils libcgi-fast-perl libapache2-mod-fcgid

Then enable the Apache fcgid module:

sudo a2enmod fcgid

Now you can install munin and some additional packages such as those containing the plugins and for the node.

sudo apt install munin munin-node munin-plugins-extra

As Muni is accessible from the web, it is convenient to request a username and password to make sure that not just anyone can log in and see the information.

htpasswd -c /etc/munin/munin-htpasswd admin
New password:
Re-type new password:
Adding password for user admin

You can replace admin with the user of your choice.

Then, enable the default VirtualHost configuration for Munin:

sudo cp -p /etc/munin/apache24.conf /etc/apache2/sites-available/munin.conf

Enable the new VirtualHost:

sudo a2ensite munin
sudo systemctl reload apache2

Before using Munin, it is advisable to make some modifications to the virtualhost.

sudo nano /etc/apache2/sites-available/munin.conf

And leave the file as follows:

ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
Alias /munin/static/ /var/cache/munin/www/static/

<Directory /var/cache/munin/www>
AuthUserFile /etc/munin/munin-htpasswd
Authtype Basic
AuthName "Munin"
Require valid-user
Options FollowSymLinks SymLinksIfOwnerMatch
Options None
</Directory>

   <Directory /usr/lib/munin/cgi>
AuthUserFile /etc/munin/munin-htpasswd
Authtype Basic
AuthName "Munin"
Require valid-user
Options FollowSymLinks SymLinksIfOwnerMatch

<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</Directory>

Save the changes and close the editor.

And to apply the changes, restart Apache and munin.

sudo systemctl restart apache2 munin-node

Access to Munin interface

Now all you have to do is to verify that the server is working properly and to do this you just have to open a web browser and access http://your-server/munin and you will see the following

1.- Munin on Debian 10
1.- Munin on Debian 10

So, Munin is working but you need to add nodes.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article