First, Monitorix
Monitorix is a very powerful free open source lightweight tool designed to monitor system and network resources in Linux. It collects system and network data on a regular basis and uses its own web interface to display relevant information graphically. Monitorix allows users to monitor the overall performance of the system and also helps detect bottlenecks, failures, unnecessary long response times, and other unusual activities.
Second, Monitorix function introduction
- Monitor system load averages, active processes, kernel usage per processor, global kernel usage, and memory allocations.
- Monitor the disk drive temperature and health status.
- Monitor file system usage and file system input/output activities.
- Monitor network traffic usage for up to 10 network devices.
- Monitor numerous system services, including SSH, FTP, Vsftpd, ProFTP, SMTP, POP3, IMAP, POP3, virusmail, and spam.
- Displays statistics for MTA mail, including input and output connections.
- Displays network port traffic, including TCP and UDP.
- Displays the FTP statistics, using the FTP server's log file format.
- Displays the Apache statistics for the local or remote server.
- Displays MySQL statistics for local or remote servers.
- Displays the statistics for the Squid Proxy Web cache.
- Displays statistics for Fail2ban.
- Monitor remote servers (multi-host).
- Ability to view statistics on a daily, weekly, monthly, or yearly basis in a graphical or clear-text form.
- The ability to scale the graphics to see them more clearly.
- Ability to define the number of graphs per row.
- Built-in HTTP server.
Third, Monitorix installation
(1) Monitorix installed on Rhel/centos/fedora Linux
First, install the following required packages.
- # yum Install rrdtool rrdtool-perl perl-libwww-perl perl-mailtools perl-mime-lite perl-cgi perl-dbi perl-xml-simple perl- Config-general perl-http-server-simple wget
If Yum does not successfully install one or more of the above packages, you can enable the following additional repositories to install them.
Enable the Epel software Library
Enable the Rpmforge software Library
Next, use the wget command to download the latest version of the ' Monitorix ' package.
- # wget http://www.monitorix.org/monitorix-3.4.0-1.noarch.rpm
Once the download is successful, install it using the RPM command.
- # RPM-IVH monitorix-3.4.0-1.noarch.rpm
- Preparing ... ########################################### [100%]
- 1:monitorix ########################################### [100%]
Once installed successfully, please check the main profile '/etc/monitorix.conf ' and add some additional settings to your system to enable or disable graphics.
Finally, add the Monitorix service to the system startup item and use the following two commands to open the service.
- # chkconfig--level Monitorix on
- # service Monitorix Start
Once you've opened the service, the program will start collecting system information based on the configuration set in the '/etc/monitorix.conf ' file, and after a few minutes, you'll start to see the system graphics from the browser in the following location:
- http://localhost:8080/monitorix/
If you have SELinux enabled, you will see a large number of error messages in the '/var/log/messages ' or '/var/log/audit/audit.log ' file if the graphics are not visible. These error messages show that access to the RRD database file is denied. To erase this type of error message and the right-click graphics, you need to disable SELinux.
To turn SELinux off, simply change the "enforcing" line to "disabled" in the '/etc/selinux/config ' file.
- selinux=Disabled
This change will temporarily disable SELinux until you restart the machine. If you want the system to always turn on in disable mode, restart the system.
(2) Install the Monitorix on the Ubuntu/debian/linux Mint
The installation of Monitorix can be done in two ways, by using the Izzy Software library for automatic installation/updating, and by manually downloading and installing the. Deb package.
The Izzy Software Library is an experimental software library, but the packages from the software library should be available for all versions of the release version of Ubuntu and Debian. However, we cannot guarantee that it is absolutely correct-so it is at your own risk. If you still want to use Apt-get to add the software library for Automatic Updates, you can automate the installation by following the steps provided below.
Automatic installation using the Izzy Software Library
Add the following line to your '/etc/apt/sources.list ' file.
- Deb Http://apt.izzysoft.de/ubuntu Generic Universe
To obtain the GPG key for the repository, you can use the wget command to obtain the key.
- # wget HTTP://APT.IZZYSOFT.DE/IZZYSOFT.ASC
Once the download is complete, add the GPG key to the APT configuration by simply using the ' apt-key ' command, as shown below.
- # Apt-key Add IZZYSOFT.ASC
Finally, install the package through the Software library.
- # Apt-get Update
- # Apt-get Install Monitorix
Use. Deb Package, manual Installation
Manually download the latest version of the. Deb package, install it, and handle the required dependencies as shown below.
- # Apt-get Update
- # apt-get Install RRDtool perl libwww-perl libmailtools-perl Libmime-lite-perl Librrds-perl Libdbi-perl Libxml-simple-perl
- # wget Http://www.monitorix.org/monitorix_3.4.0-izzy1_all.deb
- # dpkg-i Monitorix_3.4.0-izzy1_all.deb
The Web server configuration is performed during the installation process. So, you need to reload the Apache Web server to reflect the new configuration.
- # Service Apache2 Reload
Monitorix comes with a default configuration, and if you want to change or tweak some settings, take a look at the configuration file at '/etc/monitorix.conf '. Once you have completed the changes, reload the service and let the new configuration take effect.
- # Service Monitorix Restart
Now, point your browser to ' http://localhost/monitorix/' and start looking at the graphics that show your system. It can only be accessed from the local host, and if you want to allow access to the remote IP, simply open the '/etc/apache2/conf.d/monitorix.conf ' file and add the IP address to the ' Allow from ' statement. Please refer to the example below.
- <directory/usr/share/monitorix/cgi-bin/>
- DirectoryIndex monitorix.cgi
- Options execcgi
- Order Deny,allow
- Deny from all
- Allow from 172.16.16.25
- </Directory>
After you have made changes to the above configuration, don't forget to restart Apache.
- # Service Apache2 Reload
Four, Monitorix screen:
Here are some screens, see.
Monitorix Web Interface
System load average value, active process, and memory allocation.
Global kernel Usage
Kernel usage per processor
disk drive temperature and health status
File system usage and input/output activity
Eth0 Interface Traffic
System service Requirements
Network Port traffic
Apache Statistics
Statistics for MySQL
Monitorix (Linux) system and network monitoring tools