Sometimes we, as a normal user or a system admin, need to know how well our system is running. Many questions related to system status can be answered by checking log files generated by active services. However, inspecting every bit of log files is not easy even for seasoned system admins. That is why they rely on monitoring software which is capable of gathering information from different sources, and reporting analysis result in easy to understand formats, such as graphs, visualization, statistics, etc.
There are many sophisticated monitoring system software such as Cacti, Nagios, Zabbix, Munin, etc. In this article, we pick a lightweight monitoring tool called Monitorix, which is designed to monitor system resources and many well-known third-party applications on Linux/BSD servers. Optimized to run on resource-limited embedded systems, Monitorix boasts of simplicity and small memory footprint. It comes with a built-in HTTP server for web-based interface, and stores time series statistics with RRDtool which is easy to combine with any scripting language such as Perl, Python, shell script, Ruby, etc.
Main Features
Here is a list of Monitorix’s main features. For a complete list, refer to the official site.
- System load and system service demand
- CPU/GPU temperature sensors
- Disk temperature and health
- Network/port traffic and netstat statistics
- Mail statistics
- Web server statistics (Apache, Nginx, Lighttpd)
- MySQL load and statistics
- Squid proxy statistics
- NFS server/client statistics
- Raspberry Pi sensor statistics
- Memcached statistics
Install and Configure Monitorix on pcDuino
If you want to install Monitorix on Raspberry Pi (which is Debian-based), you cannot use the Izzysoft repository mentioned above because it does not provide an ARM port of Monitorix. Instead, follow Debian-based manual installation as follows.
First, install required packages.
# apt-get update # apt-get install rrdtool perl libwww-perl libmailtools-perl libmime-lite-perl librrds-perl libdbi-perl libxml-simple-perl libhttp-server-simple-perl libconfig-general-perl libio-socket-ssl-perl
If some of the required packages are not be installed, we need to force install with this command.
#apt-get -f install
Download Monitorix package (monitorix_x.x.x-izzy1_all.deb) from http://www.monitorix.org/downloads.html.
Install Monitorix package with the command below.
#dpkg -i monitorix_x.x.x-izzy1_all.deb
When you are done, restart Monitorix to let your changes take effect:
#service monitorix restart
Enjoy!
Point your browser to http://localhost:8080/monitorix/ and enjoy!
Monitorix Screenshots (on pcDuino 3 )
Monitorix Installation process in Detailed (on pcDuino 3)
1. Install some packages
root@ubuntu:~# apt-get install rrdtool perl libwww-perl libmailtools-perl libmime-lite-perl librrds-perl -y Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libdbi1 libemail-date-format-perl libencode-locale-perl libfile-listing-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-socket-ssl-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libnet-http-perl libnet-ssleay-perl librrd4 liburi-perl libwww-robotrules-perl perl-base perl-modules Suggested packages: libdata-dump-perl libcrypt-ssleay-perl libauthen-ntlm-perl perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl libpod-plainer-perl Recommended packages: libio-socket-inet6-perl libmime-types-perl nullmailer mail-transport-agent ttf-dejavu ttf-bitstream-vera libhtml-form-perl libhtml-format-perl libhttp-daemon-perl The following NEW packages will be installed: libdbi1 libemail-date-format-perl libencode-locale-perl libfile-listing-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-socket-ssl-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libmime-lite-perl libnet-http-perl libnet-ssleay-perl librrd4 librrds-perl liburi-perl libwww-perl libwww-robotrules-perl rrdtool The following packages will be upgraded: perl perl-base perl-modules 3 upgraded, 24 newly installed, 0 to remove and 259 not upgraded. Need to get 10.2 MB of archives. After this operation, 5258 kB of additional disk space will be used. Get:1 http://ports.ubuntu.com/ubuntu-ports/ precise-security/main perl armhf 5.14.2-6ubuntu2.4 [3623 kB] Get:2 http://ports.ubuntu.com/ubuntu-ports/ precise-security/main perl-base armhf 5.14.2-6ubuntu2.4 [1388 kB] Get:3 http://ports.ubuntu.com/ubuntu-ports/ precise-security/main perl-modules all 5.14.2-6ubuntu2.4 [3389 kB] Get:4 http://ports.ubuntu.com/ubuntu-ports/ precise/main libdbi1 armhf 0.8.4-5.1 [24.5 kB] Get:5 http://ports.ubuntu.com/ubuntu-ports/ precise/universe libemail-date-format-perl all 1.002-1 [6354 B] Get:6 http://ports.ubuntu.com/ubuntu-ports/ precise/main libencode-locale-perl all 1.02-2 [12.0 kB] Get:7 http://ports.ubuntu.com/ubuntu-ports/ precise/main libhttp-date-perl all 6.00-1 [10.1 kB] Get:8 http://ports.ubuntu.com/ubuntu-ports/ precise/main libfile-listing-perl all 6.03-1 [9690 B] Get:9 http://ports.ubuntu.com/ubuntu-ports/ precise/main liburi-perl all 1.59-1 [90.3 kB] Get:10 http://ports.ubuntu.com/ubuntu-ports/ precise/main libhtml-tagset-perl all 3.20-2 [13.5 kB] Get:11 http://ports.ubuntu.com/ubuntu-ports/ precise/main libhtml-parser-perl armhf 3.69-1build1 [95.8 kB] Get:12 http://ports.ubuntu.com/ubuntu-ports/ precise/main libhtml-tree-perl all 4.2-1 [205 kB] Get:13 http://ports.ubuntu.com/ubuntu-ports/ precise/main liblwp-mediatypes-perl all 6.01-1 [17.5 kB] Get:14 http://ports.ubuntu.com/ubuntu-ports/ precise/main libhttp-message-perl all 6.01-1 [77.6 kB] Get:15 http://ports.ubuntu.com/ubuntu-ports/ precise/main libhttp-cookies-perl all 6.00-2 [23.3 kB] Get:16 http://ports.ubuntu.com/ubuntu-ports/ precise/main libhttp-negotiate-perl all 6.00-2 [13.4 kB] Get:17 http://ports.ubuntu.com/ubuntu-ports/ precise/main libnet-ssleay-perl armhf 1.42-1build1 [174 kB] Get:18 http://ports.ubuntu.com/ubuntu-ports/ precise/main libio-socket-ssl-perl all 1.53-1 [47.5 kB] Get:19 http://ports.ubuntu.com/ubuntu-ports/ precise/main libnet-http-perl all 6.02-1 [23.5 kB] Get:20 http://ports.ubuntu.com/ubuntu-ports/ precise/main libwww-robotrules-perl all 6.01-1 [14.1 kB] Get:21 http://ports.ubuntu.com/ubuntu-ports/ precise/main libwww-perl all 6.03-1 [156 kB] Get:22 http://ports.ubuntu.com/ubuntu-ports/ precise/main liblwp-protocol-https-perl all 6.02-1 [6746 B] Get:23 http://ports.ubuntu.com/ubuntu-ports/ precise/main libmailtools-perl all 2.08-1 [84.0 kB] Get:24 http://ports.ubuntu.com/ubuntu-ports/ precise/universe libmime-lite-perl all 3.028-1 [67.6 kB] Get:25 http://ports.ubuntu.com/ubuntu-ports/ precise/main librrd4 armhf 1.4.7-1 [211 kB] Get:26 http://ports.ubuntu.com/ubuntu-ports/ precise/main librrds-perl armhf 1.4.7-1 [21.0 kB] Get:27 http://ports.ubuntu.com/ubuntu-ports/ precise/main rrdtool armhf 1.4.7-1 [362 kB] Fetched 10.2 MB in 5min 39s (29.9 kB/s) (Reading database ... 120914 files and directories currently installed.) Preparing to replace perl 5.14.2-6ubuntu2.2 (using .../perl_5.14.2-6ubuntu2.4_armhf.deb) ... Unpacking replacement perl ... Preparing to replace perl-base 5.14.2-6ubuntu2.2 (using .../perl-base_5.14.2-6ubuntu2.4_armhf.deb) ... Unpacking replacement perl-base ... Setting up perl-base (5.14.2-6ubuntu2.4) ... (Reading database ... 120914 files and directories currently installed.) Preparing to replace perl-modules 5.14.2-6ubuntu2.2 (using .../perl-modules_5.14.2-6ubuntu2.4_all.deb) ... Unpacking replacement perl-modules ... Selecting previously unselected package libdbi1. Unpacking libdbi1 (from .../libdbi1_0.8.4-5.1_armhf.deb) ... Selecting previously unselected package libemail-date-format-perl. Unpacking libemail-date-format-perl (from .../libemail-date-format-perl_1.002-1_all.deb) ... Selecting previously unselected package libencode-locale-perl. Unpacking libencode-locale-perl (from .../libencode-locale-perl_1.02-2_all.deb) ... Selecting previously unselected package libhttp-date-perl. Unpacking libhttp-date-perl (from .../libhttp-date-perl_6.00-1_all.deb) ... Selecting previously unselected package libfile-listing-perl. Unpacking libfile-listing-perl (from .../libfile-listing-perl_6.03-1_all.deb) ... Selecting previously unselected package liburi-perl. Unpacking liburi-perl (from .../liburi-perl_1.59-1_all.deb) ... Selecting previously unselected package libhtml-tagset-perl. Unpacking libhtml-tagset-perl (from .../libhtml-tagset-perl_3.20-2_all.deb) ... Selecting previously unselected package libhtml-parser-perl. Unpacking libhtml-parser-perl (from .../libhtml-parser-perl_3.69-1build1_armhf.deb) ... Selecting previously unselected package libhtml-tree-perl. Unpacking libhtml-tree-perl (from .../libhtml-tree-perl_4.2-1_all.deb) ... Selecting previously unselected package liblwp-mediatypes-perl. Unpacking liblwp-mediatypes-perl (from .../liblwp-mediatypes-perl_6.01-1_all.deb) ... Selecting previously unselected package libhttp-message-perl. Unpacking libhttp-message-perl (from .../libhttp-message-perl_6.01-1_all.deb) ... Selecting previously unselected package libhttp-cookies-perl. Unpacking libhttp-cookies-perl (from .../libhttp-cookies-perl_6.00-2_all.deb) ... Selecting previously unselected package libhttp-negotiate-perl. Unpacking libhttp-negotiate-perl (from .../libhttp-negotiate-perl_6.00-2_all.deb) ... Selecting previously unselected package libnet-ssleay-perl. Unpacking libnet-ssleay-perl (from .../libnet-ssleay-perl_1.42-1build1_armhf.deb) ... Selecting previously unselected package libio-socket-ssl-perl. Unpacking libio-socket-ssl-perl (from .../libio-socket-ssl-perl_1.53-1_all.deb) ... Selecting previously unselected package libnet-http-perl. Unpacking libnet-http-perl (from .../libnet-http-perl_6.02-1_all.deb) ... Selecting previously unselected package libwww-robotrules-perl. Unpacking libwww-robotrules-perl (from .../libwww-robotrules-perl_6.01-1_all.deb) ... Selecting previously unselected package libwww-perl. Unpacking libwww-perl (from .../libwww-perl_6.03-1_all.deb) ... Selecting previously unselected package liblwp-protocol-https-perl. Unpacking liblwp-protocol-https-perl (from .../liblwp-protocol-https-perl_6.02-1_all.deb) ... Selecting previously unselected package libmailtools-perl. Unpacking libmailtools-perl (from .../libmailtools-perl_2.08-1_all.deb) ... Selecting previously unselected package libmime-lite-perl. Unpacking libmime-lite-perl (from .../libmime-lite-perl_3.028-1_all.deb) ... Selecting previously unselected package librrd4. Unpacking librrd4 (from .../librrd4_1.4.7-1_armhf.deb) ... Selecting previously unselected package librrds-perl. Unpacking librrds-perl (from .../librrds-perl_1.4.7-1_armhf.deb) ... Selecting previously unselected package rrdtool. Unpacking rrdtool (from .../rrdtool_1.4.7-1_armhf.deb) ... Setting up libdbi1 (0.8.4-5.1) ... Setting up librrd4 (1.4.7-1) ... Setting up rrdtool (1.4.7-1) ... Setting up perl-modules (5.14.2-6ubuntu2.4) ... Setting up perl (5.14.2-6ubuntu2.4) ... Setting up libemail-date-format-perl (1.002-1) ... Setting up libencode-locale-perl (1.02-2) ... Setting up libhttp-date-perl (6.00-1) ... Setting up libfile-listing-perl (6.03-1) ... Setting up liburi-perl (1.59-1) ... Setting up libhtml-tagset-perl (3.20-2) ... Setting up libhtml-parser-perl (3.69-1build1) ... Setting up libhtml-tree-perl (4.2-1) ... Setting up liblwp-mediatypes-perl (6.01-1) ... Setting up libhttp-message-perl (6.01-1) ... Setting up libhttp-cookies-perl (6.00-2) ... Setting up libhttp-negotiate-perl (6.00-2) ... Setting up libnet-ssleay-perl (1.42-1build1) ... Setting up libio-socket-ssl-perl (1.53-1) ... Setting up libnet-http-perl (6.02-1) ... Setting up libwww-robotrules-perl (6.01-1) ... Setting up liblwp-protocol-https-perl (6.02-1) ... Setting up libmailtools-perl (2.08-1) ... Setting up libmime-lite-perl (3.028-1) ... Setting up librrds-perl (1.4.7-1) ... Setting up libwww-perl (6.03-1) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place root@ubuntu:~#
2. Download monitorix_3.5.1-izzy1_all.deb
ubuntu@ubuntu:~$ wget http://www.monitorix.org/monitorix_3.5.1-izzy1_all.deb --2014-06-13 07:12:29-- http://www.monitorix.org/monitorix_3.5.1-izzy1_all.deb Resolving www.monitorix.org (www.monitorix.org)... 82.98.146.100 Connecting to www.monitorix.org (www.monitorix.org)|82.98.146.100|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 220398 (215K) [application/x-troff-man] Saving to: `monitorix_3.5.1-izzy1_all.deb' 100%[================================================>;] 220,398 49.4K/s in 4.4s 2014-06-13 07:12:36 (49.4 KB/s) - `monitorix_3.5.1-izzy1_all.deb' saved [220398/220398] ubuntu@ubuntu:~$ chmod 775 monitorix_3.5.1-izzy1_all.deb ubuntu@ubuntu:~$ dpkg -i monitorix_3.5.1-izzy1_all.deb dpkg: error: requested operation requires superuser privilege ubuntu@ubuntu:~$ su - Password: root@ubuntu:~# cd /home/ubuntu/
3. Install & Start monitorix
root@ubuntu:/home/ubuntu# dpkg -i monitorix_3.5.1-izzy1_all.deb Selecting previously unselected package monitorix. (Reading database ... 121516 files and directories currently installed.) Unpacking monitorix (from monitorix_3.5.1-izzy1_all.deb) ... dpkg: dependency problems prevent configuration of monitorix: monitorix depends on libdbi-perl; however: Package libdbi-perl is not installed. monitorix depends on libxml-simple-perl; however: Package libxml-simple-perl is not installed. monitorix depends on libhttp-server-simple-perl; however: Package libhttp-server-simple-perl is not installed. monitorix depends on libconfig-general-perl; however: Package libconfig-general-perl is not installed. dpkg: error processing monitorix (--install): dependency problems - leaving unconfigured Processing triggers for ureadahead ... Errors were encountered while processing: monitorix root@ubuntu:/home/ubuntu# apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: libconfig-general-perl libdbi-perl libhttp-server-simple-perl libnet-daemon-perl libplrpc-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxml-simple-perl Recommended packages: libxml-sax-expat-perl The following NEW packages will be installed: libconfig-general-perl libdbi-perl libhttp-server-simple-perl libnet-daemon-perl libplrpc-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxml-simple-perl 0 upgraded, 10 newly installed, 0 to remove and 259 not upgraded. 1 not fully installed or removed. Need to get 1537 kB of archives. After this operation, 4324 kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ports.ubuntu.com/ubuntu-ports/ precise/main libnet-daemon-perl all 0.48-1 [43.1 kB] Get:2 http://ports.ubuntu.com/ubuntu-ports/ precise/main libplrpc-perl all 0.2020-2 [36.0 kB] Get:3 http://ports.ubuntu.com/ubuntu-ports/ precise/main libdbi-perl armhf 1.616-1build2 [842 kB] Get:4 http://ports.ubuntu.com/ubuntu-ports/ precise/main libxml-namespacesupport-perl all 1.09-3 [15.3 kB] Get:5 http://ports.ubuntu.com/ubuntu-ports/ precise/main libxml-sax-base-perl all 1.07-1 [21.5 kB] Get:6 http://ports.ubuntu.com/ubuntu-ports/ precise-updates/main libxml-sax-perl all 0.99+dfsg-1ubuntu0.1 [64.5 kB] Get:7 http://ports.ubuntu.com/ubuntu-ports/ precise/main libxml-libxml-perl armhf 1.89+dfsg-1 [361 kB] Get:8 http://ports.ubuntu.com/ubuntu-ports/ precise/main libxml-simple-perl all 2.18-3 [73.4 kB] Get:9 http://ports.ubuntu.com/ubuntu-ports/ precise/universe libhttp-server-simple-perl all 0.44-1 [25.3 kB] Get:10 http://ports.ubuntu.com/ubuntu-ports/ precise/main libconfig-general-perl all 2.50-1 [55.1 kB] Fetched 1537 kB in 19s (80.3 kB/s) Selecting previously unselected package libnet-daemon-perl. (Reading database ... 121600 files and directories currently installed.) Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.48-1_all.deb) ... Selecting previously unselected package libplrpc-perl. Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-2_all.deb) ... Selecting previously unselected package libdbi-perl. Unpacking libdbi-perl (from .../libdbi-perl_1.616-1build2_armhf.deb) ... Selecting previously unselected package libxml-namespacesupport-perl. Unpacking libxml-namespacesupport-perl (from .../libxml-namespacesupport-perl_1.09-3_all.deb) ... Selecting previously unselected package libxml-sax-base-perl. Unpacking libxml-sax-base-perl (from .../libxml-sax-base-perl_1.07-1_all.deb) ... Selecting previously unselected package libxml-sax-perl. Unpacking libxml-sax-perl (from .../libxml-sax-perl_0.99+dfsg-1ubuntu0.1_all.deb) ... Selecting previously unselected package libxml-libxml-perl. Unpacking libxml-libxml-perl (from .../libxml-libxml-perl_1.89+dfsg-1_armhf.deb) ... Selecting previously unselected package libxml-simple-perl. Unpacking libxml-simple-perl (from .../libxml-simple-perl_2.18-3_all.deb) ... Selecting previously unselected package libhttp-server-simple-perl. Unpacking libhttp-server-simple-perl (from .../libhttp-server-simple-perl_0.44-1_all.deb) ... Selecting previously unselected package libconfig-general-perl. Unpacking libconfig-general-perl (from .../libconfig-general-perl_2.50-1_all.deb) ... Setting up libnet-daemon-perl (0.48-1) ... Setting up libplrpc-perl (0.2020-2) ... Setting up libdbi-perl (1.616-1build2) ... Setting up libxml-namespacesupport-perl (1.09-3) ... Setting up libxml-sax-base-perl (1.07-1) ... Setting up libxml-sax-perl (0.99+dfsg-1ubuntu0.1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::SAX::PurePerl with priority 10... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Creating config file /etc/perl/XML/SAX/ParserDetails.ini with new version Setting up libxml-libxml-perl (1.89+dfsg-1) ... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX::Parser with priority 50... update-perl-sax-parsers: Registering Perl SAX parser XML::LibXML::SAX with priority 50... update-perl-sax-parsers: Updating overall Perl SAX parser modules info file... Replacing config file /etc/perl/XML/SAX/ParserDetails.ini with new version Setting up libxml-simple-perl (2.18-3) ... Setting up libhttp-server-simple-perl (0.44-1) ... Setting up libconfig-general-perl (2.50-1) ... Setting up monitorix (3.5.1-izzy1) ... Adding system startup for /etc/init.d/monitorix ... /etc/rc0.d/K99monitorix -> ../init.d/monitorix /etc/rc1.d/K99monitorix -> ../init.d/monitorix /etc/rc6.d/K99monitorix -> ../init.d/monitorix /etc/rc2.d/S99monitorix -> ../init.d/monitorix /etc/rc3.d/S99monitorix -> ../init.d/monitorix /etc/rc4.d/S99monitorix -> ../init.d/monitorix /etc/rc5.d/S99monitorix -> ../init.d/monitorix ...done. root@ubuntu:/home/ubuntu# service monitorix restart ...done. ...done.
Leave a Reply
You must be logged in to post a comment.