{"id":5281,"date":"2020-03-26T21:19:14","date_gmt":"2020-03-26T18:19:14","guid":{"rendered":"https:\/\/kifarunix.com\/?p=5281"},"modified":"2024-03-14T19:50:56","modified_gmt":"2024-03-14T16:50:56","slug":"install-monitorix-on-centos-8","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-monitorix-on-centos-8\/","title":{"rendered":"How to Install Monitorix on CentOS 8"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"946\" height=\"464\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/monitorix-default-dashboard.png\" alt=\"Install Monitorix on Ubuntu 20.04\" class=\"wp-image-8306\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/monitorix-default-dashboard.png?v=1616097181 946w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/monitorix-default-dashboard-768x377.png?v=1616097181 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/monitorix-default-dashboard-150x74.png?v=1616097181 150w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/monitorix-default-dashboard-300x147.png?v=1616097181 300w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/monitorix-default-dashboard-696x341.png?v=1616097181 696w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/monitorix-default-dashboard-856x420.png?v=1616097181 856w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/monitorix-default-dashboard-324x160.png?v=1616097181 324w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/monitorix-default-dashboard-533x261.png?v=1616097181 533w\" sizes=\"(max-width: 946px) 100vw, 946px\" \/><\/figure>\n\n\n\n<p>In this guide, we are going to learn how to install Monitorix on CentOS 8.&nbsp;<a href=\"https:\/\/www.monitorix.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Monitorix<\/a>&nbsp;is an open source, system monitoring tool that is used to monitor variou services and system resources as outlined below;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>System load average and usage<\/li>\n\n\n\n<li>Disk drive temperatures and health<\/li>\n\n\n\n<li>Filesystem usage and I\/O activity<\/li>\n\n\n\n<li>Directory usage&nbsp;<\/li>\n\n\n\n<li>Netstat statistics<\/li>\n\n\n\n<li>Users using the system<\/li>\n\n\n\n<li>Network port traffic<\/li>\n<\/ul>\n\n\n\n<p>Read more about the features on the&nbsp;<a href=\"https:\/\/www.monitorix.org\/features.html\" target=\"_blank\" rel=\"noreferrer noopener\">Monitorix features page<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-monitorix-on-cent-os-8\">Installing Monitorix on CentOS 8<\/a><ul><li><a href=\"#run-system-update\">Run system update<\/a><\/li><li><a href=\"#install-monitorix\">Install Monitorix<\/a><\/li><li><a href=\"#running-monitorix\">Running Monitorix<\/a><\/li><li><a href=\"#configure-monitorix-on-cent-os-8\">Configure Monitorix on CentOS 8<\/a><ul><li><a href=\"#configure-monitorix-web-server\">Configure Monitorix Web Server<\/a><\/li><\/ul><\/li><li><a href=\"#restart-monitorix\">Restart Monitorix<\/a><\/li><li><a href=\"#accessing-monitorix-web-interface\">Accessing Monitorix Web Interface<\/a><ul><li><a href=\"#further-reading\">Further Reading<\/a><\/li><li><a href=\"#related-tutorials\">Related Tutorials<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-monitorix-on-cent-os-8\">Installing Monitorix on CentOS 8<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"run-system-update\">Run system update<\/h3>\n\n\n\n<p>Resynchronize system packages to their latest versions.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-monitorix\">Install Monitorix<\/h3>\n\n\n\n<p>Install EPEL Repository<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install epel-release<\/code><\/pre>\n\n\n\n<p>Then install Monitorix.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install monitorix<\/code><\/pre>\n\n\n\n<p>This installs the latest Monitorix on CentOS 8.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf info monitorix<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>Installed Packages\nName         : monitorix\nVersion      : 3.12.0\nRelease      : 1.el8\nArchitecture : noarch\nSize         : 2.0 M\nSource       : monitorix-3.12.0-1.el8.src.rpm\nRepository   : @System\nFrom repo    : epel\nSummary      : A free, open source, lightweight system monitoring tool\nURL          : http:\/\/www.monitorix.org\nLicense      : GPLv2+\nDescription  : Monitorix is a free, open source, lightweight system monitoring tool designed\n             : to monitor as many services and system resources as possible. It has been\n             : created to be used under production Linux\/UNIX servers, but due to its\n             : simplicity and small size may also be used on embedded devices as well.\n<\/code><\/pre>\n\n\n\n<p>Install other required Perl Dependencies.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install perl-CGI perl-HTTP-Server-Simple perl-rrdtool perl-Config-General perl-LWP-Protocol-https perl-LWP-Protocol-http10 perl-libwww-perl<\/code><\/pre>\n\n\n\n<p>You can also verify installed version of Monitorix by running;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>monitorix -v<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Monitorix version 3.12.0 (21-Feb-2020)\nby Jordi Sanfeliu <a href=\"mailto:jordi@fibranet.cat\">jordi@fibranet.cat<\/a>\nhttps:\/\/www.monitorix.org\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"running-monitorix\">Running Monitorix<\/h3>\n\n\n\n<p>Once Monitorix is installed, start and enabled it to run on system boot;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl enable --now monitorix<\/code><\/pre>\n\n\n\n<p>Check the status;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl status monitorix<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\u25cf monitorix.service - Monitorix\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/monitorix.service; enabled; vendor preset: disabled)\n   Active: active (running) since Thu 2020-03-26 19:39:20 EAT; 1min 2s ago\n     Docs: man:monitorix(8)\n  Process: 8790 ExecStart=\/usr\/bin\/monitorix -c \/etc\/monitorix\/monitorix.conf -p \/run\/monitorix.pid $OPTIONS (code=exited, status=0\/SUCCESS)\n Main PID: 8791 (\/usr\/bin\/monito)\n    Tasks: 2 (limit: 5047)\n   Memory: 29.2M\n   CGroup: \/system.slice\/monitorix.service\n           \u251c\u25008791 \/usr\/bin\/monitorix -c \/etc\/monitorix\/monitorix.conf -p \/run\/monitorix.pid                                                           &gt;\n           \u2514\u25008841 monitorix-httpd listening on 8080                                                                                                   &gt;\n\nMar 26 19:39:20 monitorix.kifarunix-demo.com systemd[1]: Starting Monitorix...\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-monitorix-on-cent-os-8\">Configure Monitorix on CentOS 8<\/h3>\n\n\n\n<p>To run system monitoring with Monitorix, you need to do some configuration tuning according to your system details. <code><strong>\/etc\/monitorix\/monitorix.conf<\/strong><\/code> is default Monitorix configuration file.<\/p>\n\n\n\n<p>Open the Monitorix configuration file for editing;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/monitorix\/monitorix.conf<\/code><\/pre>\n\n\n\n<p>Below are some of the configuration options of Monitorix that we are changing in this demo.&nbsp;<strong>Be sure to replace the settings according to your environment<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set a description of the server, the location, the Company name, etc.<br><br><code><strong>title = Kifarunix-demo.com Monitorix<\/strong><\/code><br><\/li>\n\n\n\n<li>Set the hostname of the host<br><br><code><strong>hostname = monitorix.kifarunix-demo.com<\/strong><\/code><\/li>\n<\/ul>\n\n\n\n<pre class=\"scroll-box\"><code>...\n<strong>title = Kifarunix-demo.com Monitorix\nhostname = monitorix.kifarunix-demo.com<\/strong>\ntheme_color = black\nrefresh_rate = 150\niface_mode = graph\n...\n<\/code><\/pre>\n\n\n\n<p>Adjust the rest of the options to suit your needs.<\/p>\n\n\n\n<p>You can find out more about Monitorix configuration options on&nbsp;<code><strong>man monitorix.conf<\/strong><\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"configure-monitorix-web-server\">Configure Monitorix Web Server<\/h4>\n\n\n\n<p>Monitorix is bundled with its own HTTP server. Thus, configure web server access permissions under the&nbsp;<strong><code>&lt;httpd_builtin&gt;<\/code><\/strong>&nbsp;section.<\/p>\n\n\n\n<p>See the highlighted lines that shows which networks are allowed to access our Monitorix.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>...\n&lt;httpd_builtin>\n        enabled = y\n        <strong>host = monitorix.kifarunix-demo.com<\/strong>\n        port = 8080\n        user = nobody\n        group = nobody\n        log_file = \/var\/log\/monitorix-httpd\n        <strong>hosts_deny = all<\/strong>\n        <strong>hosts_allow = 192.168.2.0\/24<\/strong>\n        autocheck_responsiveness = y\n...\n<\/code><\/pre>\n\n\n\n<p>You can as well enable htaccess basic authentication.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>...\n        &lt;auth>\n                <strong>enabled = y<\/strong>\n                <strong>msg = Kifarunix-Demo Monitorix: Restricted access<\/strong>\n                htpasswd = \/var\/lib\/monitorix\/htpasswd\n        >\/auth>\n&lt;\/httpd_builtin>\n<\/code><\/pre>\n\n\n\n<p>Enable or disable the Monitorix graphs to be displayed.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>...\n# Graphs (de)activation\n# -----------------------------------------------------------------------------\n&lt;graph_enable&gt;\n        system          = y\n        kern            = n\n        proc            = y\n        hptemp          = n\n        lmsens          = n\n        gensens         = n\n        ipmi            = n\n        ambsens         = n\n        nvidia          = n\n        disk            = n\n        fs              = y\n\n...\n        int             = y\n        verlihub        = n\n&lt;\/graph_enable&gt;\n\n<\/code><\/pre>\n\n\n\n<p>Save and quit the configuration file once done making changes.<\/p>\n\n\n\n<p>If you enabled htaccess basic authentications, you need to create users to be allowed to login. Hence, install Apache Utilities.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install <code>httpd-tools<\/code><\/code><\/pre>\n\n\n\n<p>Next, create users and store them on the specified file,&nbsp;<code>\/var\/lib\/monitorix\/htpasswd<\/code>. For example to create a user called, monitadmin, run the command below. You will be prompted to set the password for the user.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>htpasswd -d -c \/var\/lib\/monitorix\/htpasswd monitadmin<\/code><\/pre>\n\n\n\n<p>You can add more users to the same file above by <strong>just omitting option -c<\/strong>.<\/p>\n\n\n\n<p>If you want, you can further tweak your Monitorix configurations, consult man pages,&nbsp;<code><strong>man monitorix.conf<\/strong><\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"restart-monitorix\">Restart Monitorix<\/h3>\n\n\n\n<p>Once you are satisfied by the configurations, restart Monitorix service.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart monitorix<\/code><\/pre>\n\n\n\n<p>By default, Monitorix listens on TCP port 8080. You can verify this by running;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ss -altnp | grep 8080<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>LISTEN   0         128           192.168.2.123:8080             0.0.0.0:*        users:((\"monitorix-httpd\",pid=10183,fd=5))<\/code><\/pre>\n\n\n\n<p>If firewalld is running, open the port 8080\/tcp on it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>firewall-cmd --add-port=8080\/tcp --permanent<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>firewall-cmd --reload<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"accessing-monitorix-web-interface\">Accessing Monitorix Web Interface<\/h3>\n\n\n\n<p>Monitorix can be accessed from a web browser using the address&nbsp;<strong>http:\/\/server-IP-or-hostname:8080\/monitorix<\/strong>.<\/p>\n\n\n\n<p>If you enabled basic authentication, authenticate and proceed to the dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"867\" height=\"311\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/monitorix-basic-auth.png\" alt=\"\" class=\"wp-image-5282\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/monitorix-basic-auth.png?v=1585245596 867w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/monitorix-basic-auth-768x275.png?v=1585245596 768w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure>\n\n\n\n<p>Monitorix dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"832\" height=\"360\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/monitorix-interface.png\" alt=\"Install Monitorix on CentOS 8\" class=\"wp-image-5283\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/monitorix-interface.png?v=1585245631 832w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/monitorix-interface-768x332.png?v=1585245631 768w\" sizes=\"(max-width: 832px) 100vw, 832px\" \/><\/figure>\n\n\n\n<p>Select the specific graphs you would like to view from drop down on Graphs options.<\/p>\n\n\n\n<p>You can as well view all Graphs for the specified times, daily, weekly, monthly.<\/p>\n\n\n\n<p>To view all daily graphs, simply click Ok.<\/p>\n\n\n\n<p><strong>&nbsp;&nbsp;System load average and usage<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"636\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/system-load.png\" alt=\"Monitorix centos 8 system load average\" class=\"wp-image-5284\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/system-load.png?v=1585245670 866w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/system-load-768x564.png?v=1585245670 768w\" sizes=\"(max-width: 866px) 100vw, 866px\" \/><\/figure>\n\n\n\n<p><strong>&nbsp;&nbsp;Filesystem usage and I\/O activity<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"547\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/filesystem-usage.png\" alt=\"Monitorix  Filesystem usage and I\/O activity\n\" class=\"wp-image-5285\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/filesystem-usage.png?v=1585245722 876w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/filesystem-usage-768x480.png?v=1585245722 768w\" sizes=\"(max-width: 876px) 100vw, 876px\" \/><\/figure>\n\n\n\n<p><strong>&nbsp;&nbsp;Directory usage<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"367\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/directory-usage.png\" alt=\"\" class=\"wp-image-5286\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/directory-usage.png?v=1585245776 881w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/directory-usage-768x320.png?v=1585245776 768w\" sizes=\"(max-width: 881px) 100vw, 881px\" \/><\/figure>\n\n\n\n<p><strong>&nbsp;&nbsp;Netstat statistics<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"869\" height=\"633\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/netstat.png\" alt=\"Monitorix Netstat statistics\" class=\"wp-image-5287\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/netstat.png?v=1585245817 869w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/03\/netstat-768x559.png?v=1585245817 768w\" sizes=\"(max-width: 869px) 100vw, 869px\" \/><\/figure>\n\n\n\n<p>And many more graphs.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"further-reading\">Further Reading<\/h4>\n\n\n\n<p><a href=\"https:\/\/www.monitorix.org\/documentation.html\" target=\"_blank\" rel=\"noopener\">https:\/\/www.monitorix.org\/documentation.html<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"related-tutorials\">Related Tutorials<\/h4>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-monitorix-on-debian-10\/\" target=\"_blank\">Install Monitorix on Debian 10<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-configure-prometheus-on-centos-8\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install and Configure Prometheus on CentOS 8<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/installing-perf-performance-analysis-tool-on-centos-8\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Installing Perf Performance Analysis Tool on CentOS 8<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we are going to learn how to install Monitorix on CentOS 8.&nbsp;Monitorix&nbsp;is an open source, system monitoring tool that is used to<\/p>\n","protected":false},"author":1,"featured_media":8306,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[72,121,1192],"tags":[1142,1380,1378,74,1193,1379],"class_list":["post-5281","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring","category-howtos","category-monitorix","tag-centos-8","tag-centos-8-monitorix","tag-install-monitorix-centos-8","tag-monitoring","tag-monitorix","tag-monitorix-centos-8","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5281"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=5281"}],"version-history":[{"count":6,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5281\/revisions"}],"predecessor-version":[{"id":21339,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5281\/revisions\/21339"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/8306"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=5281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=5281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=5281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}