{"id":11503,"date":"2019-03-14T09:42:55","date_gmt":"2019-03-14T09:42:55","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=11503"},"modified":"2019-03-14T09:42:55","modified_gmt":"2019-03-14T09:42:55","slug":"librenms-a-fully-featured-network-monitoring-tool-for-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/14\/librenms-a-fully-featured-network-monitoring-tool-for-linux\/","title":{"rendered":"LibreNMS \u2013 A Fully Featured Network Monitoring Tool for Linux"},"content":{"rendered":"<p><strong>LibreNMS<\/strong>\u00a0is an open source, powerful and feature-rich auto-discovering PHP based network monitoring system which uses the SNMP protocol. It supports a broad range of operating systems including Linux, FreeBSD, as well as network devices including Cisco, Juniper, Brocade, Foundry, HP and many more.<\/p>\n<h4>LibreNMS Features:<\/h4>\n<ol>\n<li>It auto-discovers a whole network using these protocols: CDP, FDP, LLDP, OSPF, BGP, SNMP and ARP.<\/li>\n<li>It has a mobile friendly Web UI, with customizable dashboards.<\/li>\n<li>Supports a Unix agent.<\/li>\n<li>Supports horizontal scaling to expand with your network.<\/li>\n<li>Supports a highly flexible and customizable alerting system; sends notifications through email, irc, slack and more.<\/li>\n<li>Supports an API for managing, graphing and retrieving data from your system.<\/li>\n<li>Offers a traffic billing system.<\/li>\n<li>Also supports an Android and iOS apps which offer core functionalities.<\/li>\n<li>Supports integration with NfSen,\u00a0<a href=\"https:\/\/www.tecmint.com\/install-collectd-and-collectd-web-to-monitor-server-resources-in-linux\/\" target=\"_blank\" rel=\"noopener\">collectd<\/a>, SmokePing, RANCID and Oxidized.<\/li>\n<li>Supports multiple authentication methods such as MySQL, HTTP, LDAP, Radius and Active Directory.<\/li>\n<li>Allows for auto updating and many other features.<\/li>\n<\/ol>\n<p>An online demo is available for you to try before installing\u00a0<strong>LibreNMS<\/strong>\u00a0on Linux systems.<\/p>\n<pre><strong>Demo URL<\/strong>: https:\/\/demo.librenms.org\/\r\n<strong>Username<\/strong>: demo\r\n<strong>Password<\/strong>: demo\r\n<\/pre>\n<h4>Test Environment:<\/h4>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/install-nginx-mysql-php-lemp-in-ubuntu-16-10-ubuntu-16-04\/\" target=\"_blank\" rel=\"noopener\">Ubuntu 16.04 with LEMP Stack<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/install-nginx-mariadb-php-rhel-centos-fedora\/\" target=\"_blank\" rel=\"noopener\">CentOS 7 with LEMP Stack<\/a><\/li>\n<\/ol>\n<p>In this tutorial we will learn how to install\u00a0<strong>LibreNMS Network Monitoring Tool<\/strong>\u00a0on a freshly installed\u00a0<strong>Ubuntu<\/strong>\u00a0or\u00a0<strong>CentOS<\/strong>\u00a0Linux (same instructions also works on\u00a0<strong>Debian<\/strong>\u00a0and\u00a0<strong>RHEL<\/strong>\u00a0based distributions).<\/p>\n<p><strong>NOTE<\/strong>: All these instructions in this article should be run as the\u00a0<strong>root<\/strong>\u00a0user, if you are not, use the\u00a0<a href=\"https:\/\/www.tecmint.com\/su-vs-sudo-and-how-to-configure-sudo-in-linux\/\" target=\"_blank\" rel=\"noopener\">sudo command<\/a>to gain root user privileges.<\/p>\n<h3>Step 1: Install Required Packages<\/h3>\n<p><strong>1.<\/strong>\u00a0First start by installing all the required packages using the default package manager as shown.<\/p>\n<h4>On Ubuntu\/Debian<\/h4>\n<pre>$ sudo apt install composer fping git graphviz imagemagick mariadb-client mariadb-server mtr-tiny nginx-full nmap php7.0-cli php7.0-curl php7.0-fpm php7.0-gd php7.0-mcrypt php7.0-mysql php7.0-snmp php7.0-xml php7.0-zip python-memcache python-mysqldb rrdtool snmp snmpd whois\r\n<\/pre>\n<h4>On CentOS\/RHEL<\/h4>\n<pre># yum install epel-release\r\n# rpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el7\/webtatic-release.rpm\r\n# yum install composer cronie fping git ImageMagick jwhois mariadb mariadb-server mtr MySQL-python net-snmp net-snmp-utils nginx nmap php72w php72w-cli php72w-common php72w-curl php72w-fpm php72w-gd php72w-mysql php72w-process php72w-snmp php72w-xml php72w-zip python-memcached rrdtool\r\n<\/pre>\n<p><strong>2.<\/strong>\u00a0Once all the packages are installed,\u00a0<strong>nginx<\/strong>,\u00a0<strong>php-fpm<\/strong>,\u00a0<strong>mariadb<\/strong>\u00a0and\u00a0<strong>snmp<\/strong>\u00a0services will be started and enabled to auto-start at boot time (this is normally the case with\u00a0<strong>Ubuntu<\/strong>), otherwise, you can run the commands below to start and enable them.<\/p>\n<pre><strong>------------ On Debian\/Ubuntu ------------<\/strong> \r\n$ sudo systemctl nginx start php7.0-fpm mysql snmp \r\n$ sudo systemctl enable nginx php7.0-fpm mysql snmp\r\n\r\n<strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# systemctl nginx start php-fpm mariadb snmpd \r\n# systemctl enable nginx php-fpm mariadb snmpd\r\n<\/pre>\n<h3>Step 2: Install LibreNMS Monitoring Tool<\/h3>\n<p><strong>3.<\/strong>\u00a0Next, create a system user called\u00a0<strong>librenms<\/strong>, with the\u00a0<a href=\"https:\/\/www.tecmint.com\/add-users-in-linux\/\" target=\"_blank\" rel=\"noopener\">useradd command<\/a>; where the\u00a0<code>-M<\/code>\u00a0flag disables creation of user\u2019s home directory, and\u00a0<code>-r<\/code>\u00a0enables creating of a system account. Then add the\u00a0<strong>librenms<\/strong>\u00a0user to the group\u00a0<strong>www-data<\/strong>\u00a0(on\u00a0<strong>Ubuntu<\/strong>) or\u00a0<strong>nginx<\/strong>\u00a0(on\u00a0<strong>CentOS<\/strong>) as follows.<\/p>\n<pre><strong>------------ On Debian\/Ubuntu ------------<\/strong> \r\n$ sudo useradd librenms -d \/opt\/librenms -M -r\r\n$ sudo usermod -a -G librenms www-data   \r\n\r\n<strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# useradd librenms -d \/opt\/librenms -M -r\r\n# usermod -a -G librenms nginx           \r\n<\/pre>\n<p><strong>4.<\/strong>\u00a0Then install\u00a0<strong>LibreNMS<\/strong>\u00a0via\u00a0<strong>composer<\/strong>\u00a0command as shown.<\/p>\n<pre><strong>------------ On Debian\/Ubuntu ------------<\/strong> \r\n$ cd \/opt\r\n$ sudo composer create-project --no-dev --keep-vcs librenms\/librenms librenms dev-master\r\n\r\n<strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# cd \/opt\r\n# composer create-project --no-dev --keep-vcs librenms\/librenms librenms dev-master\r\n<\/pre>\n<h3>Step 3: Create LibreNMS Database<\/h3>\n<p><strong>5.<\/strong>\u00a0Before you can start using the\u00a0<strong>MariaDB<\/strong>\u00a0server, you need to secure your installation, run the security script provided in the binary package. It will ask you set a root password, remove anonymous users, disable root login remotely and remove test database.<\/p>\n<p>You can launch the script by issuing the below command and answer all questions with\u00a0<code>yes\/y<\/code>.<\/p>\n<pre>$ sudo mysql_secure_installation   [On <strong>Debian\/Ubuntu<\/strong>]\r\n# mysql_secure_installation        [On <strong>CentOS\/RHEL<\/strong>]\r\n<\/pre>\n<p><strong>6.<\/strong>\u00a0Then login to\u00a0<strong>MariaDB<\/strong>\u00a0database to create a database for LibreNMS (remember to use a strong\/secure password in a production environment).<\/p>\n<pre><strong>$ sudo mysql -u root -p<\/strong>\r\n<strong>MariaDB [(none)]&gt;<\/strong> CREATE DATABASE librenms CHARACTER SET utf8 COLLATE utf8_unicode_ci;\r\n<strong>MariaDB [(none)]&gt;<\/strong> CREATE USER '<strong>librenms<\/strong>'@'localhost' IDENTIFIED BY '<strong>=@!#@%$libre<\/strong>';\r\n<strong>MariaDB [(none)]&gt;<\/strong> GRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'localhost';\r\n<strong>MariaDB [(none)]&gt;<\/strong> FLUSH PRIVILEGES;\r\n<strong>MariaDB [(none)]&gt;<\/strong> exit\r\n<\/pre>\n<p><strong>7.<\/strong>\u00a0Afterwards, disable\u00a0<strong>MySQL<\/strong>\u00a0strict mode for now (compatibility with MySQL strict mode is yet to be added).<\/p>\n<pre>$ sudo vim \/etc\/mysql\/mariadb.conf.d\/50-server.cnf    [On <strong>Debian\/Ubuntu<\/strong>]\r\n# vi \/etc\/my.cnf        [On <strong>CentOS\/RHEL<\/strong>]\r\n<\/pre>\n<p>Within the\u00a0<code>[mysqld]<\/code>\u00a0section please add.<\/p>\n<pre>innodb_file_per_table=1\r\nsql-mode=\"\"\r\nlower_case_table_names=0\r\n<\/pre>\n<p>Then restart the database server to effect the changes.<\/p>\n<pre>$ sudo systemctl restart mysql     [On <strong>Debian\/Ubuntu<\/strong>]\r\n# systemctl restart mariadb        [On <strong>CentOS\/RHEL<\/strong>]\r\n<\/pre>\n<h3>Step 4: Configure and Start PHP-FPM<\/h3>\n<p><strong>8.<\/strong>\u00a0Next, set your\u00a0<strong>date.timezone<\/strong>\u00a0in the\u00a0<code>php.ini<\/code>\u00a0to your current time zone, for example\u00a0<strong>\u201cAfrica\/Kampala\u201d<\/strong>, as shown in the following screenshot.<\/p>\n<pre><strong>------------ On Debian\/Ubuntu ------------<\/strong> \r\n$ sudo vim \/etc\/php\/7.0\/fpm\/php.ini\r\n$ sudo vim \/etc\/php\/7.0\/cli\/php.ini\r\n\r\n<strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# vi \/etc\/php.ini\r\n<\/pre>\n<div id=\"attachment_29161\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/set-correct-time-zone-in-php-file.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29161\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/set-correct-time-zone-in-php-file.png\" alt=\"Set Time Zone in PHP File\" width=\"622\" height=\"249\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Set Time Zone in PHP File<\/p>\n<\/div>\n<p><strong>9.<\/strong>\u00a0Next enable the\u00a0<strong>mcrypt<\/strong>\u00a0PHP module in\u00a0<strong>Ubuntu<\/strong>\u00a0and restart\u00a0<strong>php-fpm<\/strong>\u00a0as shown.<\/p>\n<pre><strong>------------ On Debian\/Ubuntu ------------<\/strong> \r\n$ sudo phpenmod mcrypt\r\n$ sudo systemctl restart php7.0-fpm\r\n<\/pre>\n<p><strong>10.<\/strong>\u00a0On\u00a0<strong>CentOS\/RHEL<\/strong>\u00a0you need to make following changes in\u00a0<strong>php-fpm<\/strong>\u00a0configuration file.<\/p>\n<pre># vi \/etc\/php-fpm.d\/www.conf\r\n<\/pre>\n<p>Make following changes.<\/p>\n<pre>;user = apache\r\nuser = nginx\r\n\r\ngroup = apache   ; keep group as apache\r\n\r\n;listen = 127.0.0.1:9000\r\nlisten = \/var\/run\/php-fpm\/php7.2-fpm.sock\r\n\r\nlisten.owner = nginx\r\nlisten.group = nginx\r\nlisten.mode = 0660\r\n<\/pre>\n<p><strong>11.<\/strong>\u00a0Restart\u00a0<strong>php-fpm<\/strong>\u00a0service as shown.<\/p>\n<pre># systemctl restart php-fpm\r\n<\/pre>\n<h3>Step 5: Configure Nginx for LibreNMS<\/h3>\n<p><strong>12.<\/strong>\u00a0In this step, you need to configure a\u00a0<strong>Nginx<\/strong>\u00a0server block for\u00a0<strong>librenms<\/strong>\u00a0in order to access the web UI. Create a\u00a0<code>.conf<\/code>\u00a0file for it as shown.<\/p>\n<pre>$ sudo vim \/etc\/nginx\/conf.d\/librenms.conf     [On <strong>Debian\/Ubuntu<\/strong>]\r\n# vi \/etc\/nginx\/conf.d\/librenms.conf           [On <strong>CentOS\/RHEL<\/strong>]         \r\n<\/pre>\n<p>Add the following\u00a0<strong>config<\/strong>, edit\u00a0<code>server_name<\/code>\u00a0as required.<\/p>\n<pre>server {\r\n listen      80;\r\n server_name <strong>librenms.example.com<\/strong>;\r\n root        \/opt\/librenms\/html;\r\n index       index.php;\r\n\r\n charset utf-8;\r\n gzip on;\r\n gzip_types text\/css application\/javascript text\/javascript application\/x-javascript image\/svg+xml text\/plain text\/xsd text\/xsl text\/xml image\/x-icon;\r\n location \/ {\r\n  try_files $uri $uri\/ \/index.php?$query_string;\r\n }\r\n location \/api\/v0 {\r\n  try_files $uri $uri\/ \/api_v0.php?$query_string;\r\n }\r\n location ~ \\.php {\r\n  include fastcgi.conf;\r\n  fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\r\n  fastcgi_pass unix:\/var\/run\/php\/php7.0-fpm.sock;\r\n }\r\n location ~ \/\\.ht {\r\n  deny all;\r\n }\r\n}\r\n<\/pre>\n<p><strong>13.<\/strong>\u00a0Then save and exit the file. Also remove the default server block configuration and restart the Nginx server.<\/p>\n<pre><strong>------------ On Debian\/Ubuntu ------------<\/strong> \r\n$ sudo rm \/etc\/nginx\/sites-enabled\/default\r\n$ sudo systemctl restart nginx\r\n\r\n<strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# systemctl restart nginx\r\n<\/pre>\n<p><strong>NOTE<\/strong>: On\u00a0<strong>CentOS\/RHEL<\/strong>, you will need to disable the\u00a0<strong>default site<\/strong>\u00a0section, if this is the only site you are hosting. Delete the server section from\u00a0<strong>\/etc\/nginx\/nginx.conf<\/strong>\u00a0file.<\/p>\n<p><strong>14.<\/strong>\u00a0Also on\u00a0<strong>CentOS\/RHEL<\/strong>, you need to install the\u00a0<strong>policy tool<\/strong>\u00a0for\u00a0<strong>SELinux<\/strong>\u00a0and Configure the\u00a0<strong>contexts<\/strong>\u00a0needed by LibreNMS using following commands.<\/p>\n<pre><strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# yum install policycoreutils-python\r\n# semanage fcontext -a -t httpd_sys_content_t '\/opt\/librenms\/logs(\/.*)?'\r\n# semanage fcontext -a -t httpd_sys_rw_content_t '\/opt\/librenms\/logs(\/.*)?'\r\n# restorecon -RFvv \/opt\/librenms\/logs\/\r\n# semanage fcontext -a -t httpd_sys_content_t '\/opt\/librenms\/rrd(\/.*)?'\r\n# semanage fcontext -a -t httpd_sys_rw_content_t '\/opt\/librenms\/rrd(\/.*)?'\r\n# restorecon -RFvv \/opt\/librenms\/rrd\/\r\n# setsebool -P httpd_can_sendmail=1\r\n# setsebool -P httpd_execmem 1\r\n<\/pre>\n<p><strong>15.<\/strong>\u00a0Allow\u00a0<strong>fping<\/strong>\u00a0by creating the file\u00a0<code>http_fping.tt<\/code>\u00a0with the following contents.<\/p>\n<div class=\"code-label\">On CentOS\/RHEL<\/div>\n<pre>module http_fping 1.0;\r\n\r\nrequire {\r\ntype httpd_t;\r\nclass capability net_raw;\r\nclass rawip_socket { getopt create setopt write read };\r\n}\r\n\r\n#============= httpd_t ==============\r\nallow httpd_t self:capability net_raw;\r\nallow httpd_t self:rawip_socket { getopt create setopt write read };\r\n<\/pre>\n<p><strong>16.<\/strong>\u00a0Then run these commands.<\/p>\n<pre><strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# checkmodule -M -m -o http_fping.mod http_fping.tt\r\n# semodule_package -o http_fping.pp -m http_fping.mod\r\n# semodule -i http_fping.pp\r\n<\/pre>\n<p><strong>17.<\/strong>\u00a0If you are using Firewall on\u00a0<strong>CentOS\/RHEL<\/strong>, enable HTTP\/HTTPS access through firewall.<\/p>\n<pre><strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# firewall-cmd --zone public --add-service http\r\n# firewall-cmd --permanent --zone public --add-service http\r\n# firewall-cmd --zone public --add-service https\r\n# firewall-cmd --permanent --zone public --add-service https\r\n<\/pre>\n<h3>Step 6: Configure SNMPD for LibreNMS<\/h3>\n<p><strong>18.<\/strong>\u00a0Now use the sample snmp configuration to create your configuration file and open it for editing, as follows.<\/p>\n<pre><strong>------------ On Debian\/Ubuntu ------------<\/strong> \r\n$ sudo cp \/opt\/librenms\/snmpd.conf.example \/etc\/snmp\/snmpd.conf\r\n$ sudo vim \/etc\/snmp\/snmpd.conf\r\n\r\n<strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# cp \/opt\/librenms\/snmpd.conf.example \/etc\/snmp\/snmpd.conf\r\n# vi \/etc\/snmp\/snmpd.conf\r\n<\/pre>\n<p>Find the string\u00a0<code>RANDOMSTRINGGOESHERE<\/code>\u00a0and change it to your own community string as shown in screenshot.<\/p>\n<div id=\"attachment_29163\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Set-SNMP-String.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29163\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Set-SNMP-String.png\" alt=\"Set SNMP String\" width=\"712\" height=\"268\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Set SNMP String<\/p>\n<\/div>\n<p><strong>19.<\/strong>\u00a0Next, download a shell script on your system, which helps to detect which OS and if it is Linux then it will detect which Linux distribution, you are using:<\/p>\n<pre><strong>------------ On Debian\/Ubuntu ------------<\/strong> \r\n$ sudo curl -o \/usr\/bin\/distro https:\/\/raw.githubusercontent.com\/librenms\/librenms-agent\/master\/snmp\/distro\r\n$ sudo chmod +x \/usr\/bin\/distro\r\n$ sudo systemctl restart snmpd\r\n\r\n<strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# curl -o \/usr\/bin\/distro https:\/\/raw.githubusercontent.com\/librenms\/librenms-agent\/master\/snmp\/distro\r\n# chmod +x \/usr\/bin\/distro\r\n# systemctl restart snmpd\r\n<\/pre>\n<h3>Step 7: Create Cron and Configure Logrotate<\/h3>\n<p><strong>20.<\/strong>\u00a0Now run the command below to setup a cron job for\u00a0<strong>LibreNMS<\/strong>.<\/p>\n<pre># cp \/opt\/librenms\/librenms.nonroot.cron \/etc\/cron.d\/librenms\r\n<\/pre>\n<p><strong>21.<\/strong>\u00a0Next, all\u00a0<strong>LibreNMS<\/strong>\u00a0logs are recorded in\u00a0<strong>\/opt\/librenms\/logs<\/strong>, you can need to configure these logs to be auto-rotated, using the logrotate config file provided, like this.<\/p>\n<pre># cp \/opt\/librenms\/misc\/librenms.logrotate \/etc\/logrotate.d\/librenms\r\n<\/pre>\n<p>Then set the appropriate permissions on the LibreNMS installation root directory and log files.<\/p>\n<pre><strong>------------ On Debian\/Ubuntu ------------<\/strong>\r\n$ sudo chown -R librenms:librenms  \/opt\/librenms\r\n$ sudo setfacl -d -m g::rwx \/opt\/librenms\/rrd \/opt\/librenms\/logs\r\n$ sudo setfacl -R -m g::rwx \/opt\/librenms\/rrd \/opt\/librenms\/logs\r\n\r\n<strong>------------ On CentOS\/RHEL ------------<\/strong> \r\n# chown -R librenms:librenms \/opt\/librenms\r\n# setfacl -d -m g::rwx \/opt\/librenms\/rrd \/opt\/librenms\/logs\r\n# setfacl -R -m g::rwx \/opt\/librenms\/rrd \/opt\/librenms\/logs\r\n<\/pre>\n<h3>Step 8: Access LibreNMS Web Installer<\/h3>\n<p><strong>22.<\/strong>\u00a0Next, use the following URL to access the web installer and follow the on-screen instructions.<\/p>\n<pre>http:\/\/librenms.tecmint.lan\/install.php\r\n<\/pre>\n<p>For this address to work on a local machine, you need to setup a local DNS using the hosts file (<code>\/etc\/hosts<\/code>), for local domain resolution or testing purposes before going live.<\/p>\n<pre>192.168.43.31 tecmint.lan\r\n192.168.43.31 librenms.tecmint.lan\r\n<\/pre>\n<div id=\"attachment_29165\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Setup-Local-DNS-for-Domain.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29165\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Setup-Local-DNS-for-Domain.png\" alt=\"Setup Local DNS for Domain\" width=\"602\" height=\"306\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Setup Local DNS for Domain<\/p>\n<\/div>\n<p><strong>23.<\/strong>\u00a0You will see the installation welcome page as shown in the following screenshot, click\u00a0<strong>Next Stage<\/strong>\u00a0to continue.<\/p>\n<div id=\"attachment_29166\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Web-Installer.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29166\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Web-Installer.png\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Web-Installer.png 840w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Web-Installer-768x517.png 768w\" alt=\"LibreNMS Web Installer\" width=\"840\" height=\"566\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">LibreNMS Web Installer<\/p>\n<\/div>\n<p><strong>24.<\/strong>\u00a0Then enter the settings (database host, port, username and user password) for the LibreNMS database and click\u00a0<strong>Next Stage<\/strong>\u00a0to proceed.<\/p>\n<div id=\"attachment_29167\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29167\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Settings.png\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Settings.png 840w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Settings-768x537.png 768w\" alt=\"LibreNMS Database Settings\" width=\"840\" height=\"587\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">LibreNMS Database Settings<\/p>\n<\/div>\n<p><strong>25.<\/strong>\u00a0The web installer will now start importing the MySQL database, this will take some time. Note that the process will try to pause at certain points, simple click on\u00a0<strong>Retry<\/strong>\u00a0to continue with the importation process.<\/p>\n<div id=\"attachment_29169\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Import.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29169\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Import.png\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Import.png 840w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Import-768x537.png 768w\" alt=\"LibreNMS Database Importing\" width=\"840\" height=\"587\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">LibreNMS Database Importing<\/p>\n<\/div>\n<p><strong>26.<\/strong>\u00a0Once the database importation is complete, you should see the message \u201c<strong>Database is up to date!<\/strong>\u201d, as shown in the screenshot below. Then click on\u00a0<strong>Goto Add User<\/strong>\u00a0to proceed.<\/p>\n<div id=\"attachment_29170\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Updated.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29170\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Updated.png\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Updated.png 840w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Database-Updated-768x527.png 768w\" alt=\"LibreNMS Database Updated\" width=\"840\" height=\"576\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">LibreNMS Database Updated<\/p>\n<\/div>\n<p><strong>27.<\/strong>\u00a0Next, add a\u00a0<strong>LibreNMS<\/strong>\u00a0user, specify username, password and email, then click on\u00a0<strong>Add User<\/strong>\u00a0to effect the changes.<\/p>\n<div id=\"attachment_29171\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/add-librenms-user.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29171\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/add-librenms-user.png\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/add-librenms-user.png 788w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/add-librenms-user-768x506.png 768w\" alt=\"Add LibreNMS User\" width=\"788\" height=\"519\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Add LibreNMS User<\/p>\n<\/div>\n<p><strong>28.<\/strong>\u00a0Now click on create the\u00a0<strong>LibreNMS<\/strong>\u00a0configuration for your system, by clicking\u00a0<strong>Generate Config<\/strong>.<\/p>\n<div id=\"attachment_29172\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/generate-librenms-config.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29172\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/generate-librenms-config.png\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/generate-librenms-config.png 788w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/generate-librenms-config-768x506.png 768w\" alt=\"Generate Librenms Config\" width=\"788\" height=\"519\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Generate Librenms Config<\/p>\n<\/div>\n<div id=\"attachment_29173\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Configuration.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29173\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Configuration.png\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Configuration.png 788w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Configuration-768x610.png 768w\" alt=\"LibreNMS Configuration\" width=\"788\" height=\"626\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">LibreNMS Configuration<\/p>\n<\/div>\n<p><strong>29.<\/strong>\u00a0Once the config is generated, as shown in the previous screenhot, copy it and save it in the root directory of your installation, in a file called\u00a0<strong>\/opt\/librenms\/config.php<\/strong>.<\/p>\n<pre># vi \/opt\/librenms\/config.php\r\n<\/pre>\n<div class=\"code-label\">LibreNMS Configuration<\/div>\n<pre>&lt;?php\r\n## Have a look in defaults.inc.php for examples of settings you can set here. DO NOT EDIT defaults.inc.php!\r\n\r\n### Database config\r\n$config['db_host'] = 'localhost';\r\n$config['db_port'] = '3306';\r\n$config['db_user'] = 'librenms';\r\n$config['db_pass'] = '=@!#@%$libre';\r\n$config['db_name'] = 'librenms';\r\n$config['db_socket'] = '';\r\n\r\n\/\/ This is the user LibreNMS will run as\r\n\/\/Please ensure this user is created and has the correct permissions to your install\r\n$config['user'] = 'librenms';\r\n\r\n### Locations - it is recommended to keep the default\r\n#$config['install_dir']  = \"\/opt\/librenms\";\r\n\r\n### This should *only* be set if you want to *force* a particular hostname\/port\r\n### It will prevent the web interface being usable form any other hostname\r\n#$config['base_url']        = \"http:\/\/librenms.company.com\";\r\n\r\n### Enable this to use rrdcached. Be sure rrd_dir is within the rrdcached dir\r\n### and that your web server has permission to talk to rrdcached.\r\n#$config['rrdcached']    = \"unix:\/var\/run\/rrdcached.sock\";\r\n\r\n### Default community\r\n$config['snmp']['community'] = array(\"public\");\r\n\r\n### Authentication Model\r\n$config['auth_mechanism'] = \"mysql\"; # default, other options: ldap, http-auth\r\n#$config['http_auth_guest'] = \"guest\"; # remember to configure this user if you use http-auth\r\n\r\n### List of RFC1918 networks to allow scanning-based discovery\r\n#$config['nets'][] = \"10.0.0.0\/8\";\r\n#$config['nets'][] = \"172.16.0.0\/12\";\r\n#$config['nets'][] = \"192.168.0.0\/16\";\r\n\r\n# Update configuration\r\n#$config['update_channel'] = 'release';  # uncomment to follow the monthly release channel\r\n#$config['update'] = 0;  # uncomment to completely disable updates\r\n<\/pre>\n<p><strong>30.<\/strong>\u00a0Save and close the file. Then return to the web installer to continue with the installation process, by clicking\u00a0<strong>Finish Install<\/strong>.<\/p>\n<div id=\"attachment_29174\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Finish-LibreNMS-Installation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29174\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Finish-LibreNMS-Installation.png\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Finish-LibreNMS-Installation.png 788w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Finish-LibreNMS-Installation-768x447.png 768w\" alt=\"Finish LibreNMS Installation\" width=\"788\" height=\"459\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Finish LibreNMS Installation<\/p>\n<\/div>\n<p><strong>31.<\/strong>\u00a0Now your\u00a0<strong>LibreNMS<\/strong>\u00a0installation is complete, you can click on \u201c<strong>validate your install and fix any issues<\/strong>\u201d, the login page should appear.<\/p>\n<div id=\"attachment_29175\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Validate-LibreNMS-Install.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29175\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Validate-LibreNMS-Install.png\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Validate-LibreNMS-Install.png 788w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/Validate-LibreNMS-Install-768x561.png 768w\" alt=\"Validate LibreNMS Install\" width=\"788\" height=\"576\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">Validate LibreNMS Install<\/p>\n<\/div>\n<p><strong>32.<\/strong>\u00a0Next, enter your user credentials to access the validation page.<\/p>\n<div id=\"attachment_29176\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/librenms-login-page.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29176\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/librenms-login-page.png\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/librenms-login-page.png 788w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/librenms-login-page-768x607.png 768w\" alt=\"LibreNMS Login Page\" width=\"788\" height=\"623\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">LibreNMS Login Page<\/p>\n<\/div>\n<p><strong>33.<\/strong>\u00a0From the installation validation process,\u00a0<strong>LibreNMS<\/strong>\u00a0has discovered two issues, one is that devices have not been added (this is a warning for now), and secondly, we have not set the appropriate permission on the config file (<strong>\/opt\/librenms\/config.php<\/strong>) which was manually added, as shown in the screen shot below.<\/p>\n<div id=\"attachment_29177\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Permission-Issues.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29177\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Permission-Issues.png\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Permission-Issues.png 785w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Permission-Issues-768x711.png 768w\" alt=\"LibreNMS Permission Issues\" width=\"785\" height=\"727\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">LibreNMS Permission Issues<\/p>\n<\/div>\n<p>Now run the following command to set the correct permission on the config file.<\/p>\n<pre>$ sudo chown -R librenms:librenms \/opt\/librenms\/config.php \r\n<\/pre>\n<p><strong>34.<\/strong>\u00a0To add devices, go to:\u00a0<strong>http:\/\/librenms.tecmint.lan\/addhost<\/strong>. After adding devices, you can go to the home page and add various dashboards.<\/p>\n<div id=\"attachment_29178\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Dashboard.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-29178\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Dashboard.png\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Dashboard.png 788w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/04\/LibreNMS-Dashboard-768x614.png 768w\" alt=\"LibreNMS Dashboard\" width=\"788\" height=\"630\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p class=\"wp-caption-text\">LibreNMS Dashboard<\/p>\n<\/div>\n<p>That\u2019s It! You can find more information, including installation and setup on the LibreNMS Documentation at\u00a0<a href=\"https:\/\/docs.librenms.org\/\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/docs.librenms.org\/<\/a>.<\/p>\n<p><strong>LibreNMS<\/strong>\u00a0is a fully featured network monitoring system that supports a variety of network hardware. We hope that this was a lucid installation guide, if you have any questions, reach us via the feedback form below.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/install-librenms-monitoring-on-ubuntu-centos\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>LibreNMS\u00a0is an open source, powerful and feature-rich auto-discovering PHP based network monitoring system which uses the SNMP protocol. It supports a broad range of operating systems including Linux, FreeBSD, as well as network devices including Cisco, Juniper, Brocade, Foundry, HP and many more. LibreNMS Features: It auto-discovers a whole network using these protocols: CDP, FDP, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/14\/librenms-a-fully-featured-network-monitoring-tool-for-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;LibreNMS \u2013 A Fully Featured Network Monitoring Tool for Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11503","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=11503"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11503\/revisions"}],"predecessor-version":[{"id":11504,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/11503\/revisions\/11504"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=11503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=11503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=11503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}