Sys265NetMGMT‐Tools - ConnorEast/Tech-Journal GitHub Wiki
LibreNMS is an open source network monitoring/management system designed to track stats such as health and performance of network connected devices. This can include switches routers, servers and other networked hardware. It is a relatively well known tool which allows for features such as automatic device discovery, Customicable Alerts, Network Monitoring, and customizable dashboards. It uses CDP, FDP, LLDP, OSPF,BGP,SNMP, and ARP respectively. Its notifactions can be sent via email, irc, slack or through other platforms. If you would like to read more about its functionality click the link located here
Command Used | Explanation of Command |
---|---|
sudo yum update -y | This command updates all dependencies on Linux based devices/VM's/Et;all |
sudo yum install epel-release -y | Installs the Extra Packages for Enterprise Linux [EPEL] Repository |
sudo yum install dnf -y | Installs the Dandified YUM module used for more modern linux systems. Not fully neccessary |
dnf –version | Checks the version number of DNF for cross comparison |
sudo dnf update -y | Incase an older model was downloaded, this will check and install newer dependencies |
dnf list installed | Lists all of the installed packages on your local machine |
alias yum=dnf | creates an alias for the word yum to overide yum to use the dnf command |
source ~/.bashrc | This command reloads the bash shell environment allowing for your device to properly reload the new dependencies |
dnf -y install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm | downloads the dnf-utils package and the remi-release repository |
dnf module reset php | removes any preconfigured settings for PHP. Used to remove Nagios Core settings |
yum module enable php:remi-8.2 | Sets the php download to look for version 8.2 when its installed |
yum install -y php php-cli php-common php-opcache php-mcrypt php-gd php-curl php-mysql php-zip php-xml | Installs PHP and all of the other dependencies necessary |
systemctl restart httpd | Restarts the MariaDB server if applicable |
dnf install bash-completion cronie fping git ImageMagick mariadb-server mtr net-snmp net-snmp-utils nginx nmap php-fpm php-cli php-common php-curl php-gd php-gmp php-json php-mbstring php-process php-snmp php-xml php-zip php-mysqlnd python3 python3-PyMySQL python3-redis python3-memcached python3-pip python3-systemd rrdtool unzip |
Downloads the following:
|
sudo systemctl stop sssd | Stops the SSSD service |
rm -rf /var/lib/sss/db/* | Removes all data logged at "/var/lib/sss/db/" |
sudo systemctl enable sssd | Enables the SSSD Service |
sudo systemctl restart sssd | Restarts the SSSD SErvice |
useradd librenms -d /opt/librenms -M -r -s "$(which bash)" | Creates a new user named librenms with a specified home directory of /opt/librenms and set their shell to default as a bash script shell. |
cd /opt | Go to the opt directory |
git clone https://github.com/librenms/libernms.git | Clone the librenms.git file from github.com and save it to /opt |
chown -R libernms:libernms /opt/librenms | Give the newly downloaded file full access from user/directory libernms |
chmod 771 /opt/librenms | Give Librenms user & members Read Write Execute functionality |
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ | sets the default ACL group read write and execute permisions for all 3 directories specified |
setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ | Same as above but recursively |
Sudo yum install gcc python3-devel | Installs and downloads the python3-devel module |
|
Logs into the librenms user and run the composer_wrapper.php install script |
wget https://getcomposer.org/composer-stable.phar mv composer-stable.phar /usr/bin/composer chmod +x /usr/bin/composer | |
timedatectl set-timezone America/New_York | |
vi /etc/my.cnf.d/mariadb-server.cnf |
Append the following information
|
systemctl enable mariadb | Enables the Database Server |
systemctl restart mariadb | Restarts the Database Server |
mysql -u root | |
CREATE DATABASE librenms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'librenms'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'localhost'; exit | Create a database user and give them Privilege's to call and add data to the database. Change password to match your desired password |
cp /etc/php-fpm.d/www.conf /etc/php-fpm.d/librenms.conf | |
vi /etc/php-fpm.d/librenms.conf |
Change the following information:
|
vi /etc/nginx/conf.d/librenms.conf |
Confirm the following information in librenms.conf
|
systemctl enable --now nginx | Enables NGINX as your web interface |
systemctl enable --now php-fpm | Enables php-form |
Sudo cp /opt/librenms/dist/librenms-scheduler.service /opt/librenms/dist/librenms-scheduler.timer /etc/systemd/system/ | Copies the timer service and schedule for librenms in order to the have them manageable via systemd |
Sudo systemctl enable librenms-scheduler.timer | Enables the timer |
Open your NMOM01 server ip address in a web browser in order to complete the rest of your setup. |
|

Nagios Core is an open-source Linux-based network monitoring tool which monitors and checks the availability, performance, and applications used by the hosts connected to it. The main purpose being to alert the system administrator should an issue occur on a network host. In regards to OS compatibility, Nagios Core can run on both Linux systems as well as Unix-like Systems. When compared to other similar network monitoring tools Nagios meets the following criterium:
- IP SLA Reports [IP Service Level Agreement]: Nagios measures network service performance, Latency, Jitter, Packet Loss, et;alls when the proper plug in is installed. ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- Logical Grouping: Logical Groupings, which allow for the segregation of hosts into user-defined groups, is natively available ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- Trending: Trending, Which tells you what network data is most actively used over the network , is natively available ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- Trend Prediction: Trend Prediction, Algorithmic prediction of future network statistics, is not available using Nagios Core ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- Auto Discovery: Auto Discovery, Automatically locates network devices and hosts on the network, is available Via Plugins ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- SNMP compatibility: Nagios is able to Natively retrieve and report on SNMP statistics ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- Syslog Compatibility: Nagios is able to receive and report on Syslog files with the appropriate Plugins. ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- Triggers: Triggers alerting the administrator of various threshold violations in network data is Natively Available. ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- MIB compiler: MIB data can be Natively managed by NAGIOS core ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- Web app: There is not a web based application available on Nagios core ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- Distributed Monitoring: Distributed Monitoring is natively available and it Can be used on more than one server in order to increase monitoring capabilities ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- Inventory: Nagios core natively keeps records on hardware/software inventories for the devices being monitored ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- Platform: The Platform was written in C ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- DATA storage method: Data is stored in either a FlatFile or SQL format ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- License: Nagios was released under the GNUGPL License ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
- IPv6 Compatibility: Nagios Core Natively supports IPv6 monitoring of hosts ([Wikipedia](https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems)).
System | Reasoning | |
---|---|---|
Nmon > term | setenforce 0 | |
Nmon > term | Cd /etc/selinux/config | Change “enforcing” to “disabled” to turn off SELinux |
Nmon > term | yum install httpd php php-cli gcc glibc glibc-common gd gd-devel net-snmp openssl-devel wget unzip -y | This command installs the dependencies needed |
Nmon > term | useradd nagios | |
Nmon > term | groupadd nagcmd | |
Nmon > term | usermod -a -G nagcmd nagios | |
Nmon > term | usermod -a -G nagcmd apache | |
Nmon01 > TMP | Wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.1.1.tar.gz | |
Nmon01 > TMP | Wget https://www.nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz | |
Nmon01 > TMP | tar zxf nagios-plugins-2.1.1.tar.gz | |
Nmon01 > TMP | Cd nagios-4.1.1 | |
Nmon01 > nagios-4.1.1 | ./configure –with-command-group=nagcmd | |
Nmon01 > nagios-4.1.1 | Sudo yum install make -y | |
Nmon01 > nagios-4.1.1 | Make all | |
Nmon01 > nagios-4.1.1 | Make install | |
Nmon01 > nagios-4.1.1 | Make install-init | |
Nmon01 > nagios-4.1.1 | Make install-commandmode | |
Nmon01 > nagios-4.1.1 | Make install-webconf | |
Nmon01 > nagios-4.1.1 | htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin | |
Nmon01 > nagios-4.1.1 | ||
Nmon01 > nagios-plug… | ./configure –with-nagios-user=nagios –with-nagios-group=nagios –with-openssl | |
Nmon01 > nagios-plug… | make all | |
Nmon01 > nagios-plug… | make install | |
Nmon01 > nagios-plug… | /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg | |
Nmon01 > nagios-plug… | chkconfig –add-nagios | |
Nmon01 > nagios-plug… | chkconfig –level 35 nagios on | |
Nmon01 > nagios-plug… | firewall-cmd –zone=public –add-port=80/tcp –permanent | |
Nmon01 > nagios-plug… | firewall-cmd –reload | |
Nmon01 > nagios-plug… | vi /etc/httpd/conf/httpds.conf | |
Nmon01 > nagios-plug… | service http enable | |
Nmon01 > nagios-plug… | Service http start | |
Nmon01 > nagios-plug… | Service nagios enable | |
Nmon01 > nagios-plug… | Service nagios start | |
WKS01 | Navigate to web browser “10.0.5.11/nagios” |