Monitoring the server with Munin in Debian 10

The following guide describes how to install the Munin monitoring software from a Debian system 10.
Thanks to it, we will be able to monitor our server and its many parameters.

We start the terminal and update the repositories and the system:

apt update
apt upgrade

We install a web server so that we can get to the graphic part of the interface through the website:

apt install apache2 libcgi-fast-perl libapache2-mod-fcgid

We run the apache modules:

a2enmod fcgid

We install Munin:

apt install munin munin-node munin-plugins-extra

We go to the directory with plugins and run some of the necessary ones:

cd /etc/munin/plugins
ln -s /usr/share/munin/plugins/mysql_ mysql_
ln -s /usr/share/munin/plugins/mysql_bytes mysql_bytes
ln -s /usr/share/munin/plugins/mysql_innodb mysql_innodb
ln -s /usr/share/munin/plugins/mysql_isam_space_ mysql_isam_space_
ln -s /usr/share/munin/plugins/mysql_queries mysql_queries
ln -s /usr/share/munin/plugins/mysql_slowqueries mysql_slowqueries
ln -s /usr/share/munin/plugins/mysql_threads mysql_threads

The next step is to edit the Munin configuration file.

edit file:

nano /etc/munin/munin.conf

And we configure it as follows:

# Example configuration file for Munin, generated by 'make build'

# The next three variables specifies where the location of the RRD
# databases, the HTML output, logs and the lock/pid files. They all
# must be writable by the user running munin-cron. They are all
# defaulted to the values you see here.
#
dbdir /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
rundir /var/run/munin

# Where to look for the HTML templates
#
tmpldir /etc/munin/templates

# Where to look for the static www files
#
#staticdir /etc/munin/static

# temporary cgi files are here. note that it has to be writable by
# the cgi user (usually nobody or httpd).
#
# cgitmpdir / var / lib / munin / cgi-tmp

# (Exactly one) directory to include all files from.
includedir /etc/munin/munin-conf.d
[...]
# a simple host tree
[server1.example.com]
 address 127.0.0.1
 use_node_name yes
[...]

Now we create vhost munina

cd /etc/apache2/conf-enabled/
ln -s /etc/munin/apache24.conf munin.conf
service apache2 restart

edit file:

nano /etc/munin/apache24.conf

It should look like this:

Alias ​​/ munin / var / cache / munin / www

 # Require local
 Require all granted
 Options FollowSymLinks SymLinksIfOwnerMatch


ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph

 # Require local
 Require all granted
 Options FollowSymLinks SymLinksIfOwnerMatch
 
 SetHandler fcgid-script
 
 
 SetHandler cgi-script
 

We are restarting Apache and Munin to reload the changes:

systemctl restart apache2.service
systemctl restart munin-node.service

That's practically it, after going to :

our address // munin / we should see the monitoring statistics page.

Linux

Udostępnij
Opublikowane przez
Linux

Recent posts

KeePass2 2.52 w Ubuntu 22.04

The guide below describes how to install KeePass on Ubuntu. Całość wykonamy za pomocą kilku poleceń

2 years temu

Installing Master PDF editor in Ubuntu 22.04

Master PDF Editor is a comprehensive PDF program, which includes many features. Oprócz tworzenia i edycji

2 years temu

iotop - memory monitoring

Iotop jest prostym narzędziem dla systemów Uniksowych umożliwiającym monitorowanie użycia dowolnego nośnika pamięci flash/hdd/ssd w

2 years temu

Run multiple commands in one cron job

You can separate two or more commands with semicolons (;), Semicolon (;): służy do oddzielania

2 years temu

Changing the exif data of a photo in the Linux terminal

Poniższy poradnik opisuje w jaki sposób za pomocą konsoli możemy dokonać edycji danych zdjęcia exif.

2 years temu

Installing Rocket.Chat Server on Rocky Linux 8

The following guide describes how to install Rocket.Chat on Rocky Linux 8 Całość bardzo prosto zainstalujemy

2 years temu