This article will cover the steps to install MonitorIX and configure it to log on a custom port, in this case, the Minecraft port (25565).
MonitorIX can be used to monitor network traffic and system usage to diagnose problems or view system performance.
Monitorix is a free, open source, lightweight system monitoring tool designed to monitor as many services and system resources as possible. It has been created to be used under production Linux/UNIX servers, but due to its simplicity and small size can be used on embedded devices as well.
MonitorIX can monitor anything from email statistics and disk usage to hardware temperatures and current traffic on your MySQL or custom-defined port.
Follow the steps below to install MonitorIX on CentOS 6.
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 perl-IO-Socket-SSLNote: if you are unable to install some packages, you may have to enable the EPEL repo:
32-Bit
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm64-Bit
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm -ivh epel-release-6-8.noarch.rpmThen re-try the installation
rpm -ivh http://www.monitorix.org/monitorix-3.6.0-1.noarch.rpmNote: Be sure to check the MonitorIX Downloads page to see if there are new versions
After installation, you can start MonitorIX with
service monitorix start
After installation, you can view the graphs at http://YOURSERVER.DOMAIN:8080/monitorix/ or http://YOURSERVERIP:8080/monitorix/
nano /etc/monitorix/monitorix.confBy reading the config, you can change settings such as titles, the port on which MonitorIX runs, and enable certain graphs under <graph_enable>, and more.
Here is an example of the <port> section to monitor traffic on the Minecraft port (25565):
PORT graph
-----------------------------------------------------------------------------
<port>
max = 12
rule = 24000
list = 25, 21, 80, 22, 110, 139, 3306, 53, 25565, 25565
<desc>
25 = SMTP, tcp, in, 0, 1000
21 = FTP, tcp, in, 0, 1000
80 = HTTP, tcp, in, 0, 1000
22 = SSH, tcp, in, 0, 1000
110 = POP3, tcp, in, 0, 1000
139 = NETBIOS, tcp, in, 0, 1000
3306 = MYSQL, tcp, in, 0, 1000
53 = DNS, udp, in, 0, 1000
25565 = MINECRAFT, tcp, in, 0, 1000
</desc>
graphs_per_row = 3
</port>By changing the max and adding/changing a port on the list = section, you can add a new graph to the <desc> section. Make sure you close the document with CTRL+X and then Y to save, followed by ENTER.
Now you can restart the service
service monitorix restartand view your newly monitored port.