Comments on Server Monitoring with Munin and Monit on Ubuntu 16.04 LTS (Xenial Xerus)
This tutorial will show you how to monitor an Ubuntu 16.04 server with Munin and Monit. Munin produces nice graphs about nearly every aspect of your server, whereas Monit checks the availability of services like Apache, MySQL, Postfix and takes the appropriate action such as a restart if it finds a service is not behaving as expected. The combination of the two gives you full monitoring: graphics that let you recognize current or upcoming problems, and a watchdog that ensures the availability of the monitored services.
10 Comment(s)
Comments
Under #2 it says: 'To install Munin on Ubuntu 14.04, run the commands below'. I guess that should be 16.04 instead of 14.04? ;)
You missed a step - the part where your ln -s the munin apache config into sites-available and a2ensite the available site.
The previous commenter is right, you are missing a crucial part of the setup: -Before restarting apache2 in 2. you'd need to do (as root) "ln -s /etc/munin/apache24.conf /etc/apache2/sites-available/apache24.conf" and "a2ensite apache24.conf". After these commands it's ok to restart apache2.
If you are running a multi-server setup. And the ISPConfig panel is only on the web.example.tld.. I cant use the :8080/munin. HTTPS is not enabled and i dont think i can load http in an https website?
With Ubuntu 18.04 you do not need to create a symlink to the configuration as this is done with a link from /etc/apache2/conf-available/munin.conf to the configuration.
But there are some other issues I observed:
1. Missing librarysAs I observed some errors in the munin logs and when calling "munin-node-configure --suggest" (one hint could be seen in the screenshot found in the tutorial) I needed to do the following:
apt install libparse-http-useragent-perl libwww-perl libcache-{perl,cache-perl}
2. Problems accessing the mariaDBI used the Perfect Server Setup for Ubuntu 18.04. It seems, that with this configuration munin can not access the DB Server correctly. I needed to edit /etc/munin/plugin-conf.d. In the region [mysql*] I edited/added the following lines:
env.mysqluser root anpassenenv.mysqladmin = /usr/bin/mysqladmin
3.mysql_ plugin
The munin plugin "mysql_" is a wildcard plugin. So you need to add the wanted graphs name to the link.The line
ln -s /usr/share/munin/plugins/mysql_ mysql_
Does not do anything good I thing but firering some errors in the logs.The line must be seomthing like this:
ln -s /usr/share/munin/plugins/mysql_ mysql_GRAPHNAME
where GRAPHNAME is one of bin_relay_log, binlog_groupcommit, commands, connections, files_tables, innodb_bpool, innodb_bpool_act, innodb_insert_buf, innodb_io, innodb_io_pend, innodb_log, innodb_rows, innodb_semaphores, innodb_tnx, myisam_indexes, network_traffic, qcache, qcache_mem, replication, select_types, slow, sorts, table_locks, tmp_tables
And at last a little hint: The command
munin-node-configure --suggest --shell
gives you all suggested plugins with the needed ln command ...
Using all the hints found in this tutorial and the comments nearly everything but zooming in to daily reports worked with Ubuntu 18.04.
I needed to do some more steps for getting this to work. Some hints can be found here:
https://www.howtoforge.com/community/threads/ispconfig3-and-munin.80547/
Ubuntu 18.04, ISPConfig, MonitMonit cant monitor apache.
token exists in /var/www/html/munin/token Getting the token results in a 403 Forbidden status. Also wget on localhost oder localhost/munin/token results in a 403.
apaches 000-default.conf is enabled and docroots to /var/www/htmlwhat am I doing wrong?
Thank you for this rich material.
Great Tutorial!
I installed and configured it on Ubuntu 18.04 without any problems. I also used the Let's Encrypt certificate as mentioned by Spaetzle
Mostly worked for me on Ubuntu 18.04 and ISPConfig 3.1 dev.
1) What happened to the Monit setup? I don't see that except in the heading?
2) Although I can see Munin in https://www.myserverdomain.com:8080/munin/ and I've setup the url, username and password in ISPConfig under "System". When I click the Munin link under Monitor, it doesn't load.