Network Monitor (NEMS)

[traduire]

In my day job, my company has vario network monitoring tools and a large support staff to ensure the network is secure and running properly.

My home network has 80+ devices, which includes multiple switches, APs and lots of smart home automation devices. I have no support staff to keep it running. I want to look at one tool, and quickly know if my network is having issues.

Other Networking:

Step 1. Install a torrent utility

I didn't have torrent on my laptop

Download and install utorrent from www.utorrent.com

Step 2. Download NEMS

Download the bittorrent file for NEMS Latest version of NEMS for the Raspberry Pi

Open Downloads and use utorrent to open the latest file NEMS_*.torrent

Use unarchiver to unzip NEMS_*.zip

Step 3. Setup Raspberry Pi

Follow the directions in the link above, but use the NEMS image from Step 2 instead of raspbian

Step 4. Login

On your laptop, open a terminal window and ssh into the NEMS server using

$ ssh nemsadmin@nems

password: nemsadmin

Run the following command just to see the file system was expanded

$ df -ha

Step 5. Setup NEMS

NEMS setup should start automatically, if it doesn't try:

$ sudo nems-init

Use tab, space and ENTER to make selections. Raspbian requires the UK selections be left. So, don't unselect those

Enter username and password

Record your NEMS Server IP address, or it can be accessed using https://nems.local, which is much easier to remember

Step 6. Check nemsadmin account

Logout and try to login using the default nemsadmin username and password. This shouldn't work

Login with your new username and password

Step 7. Upgrade

Use this command to upgrade

$ sudo nems-upgrade

Step 8. Edit the password file to prevent root and nemsadmin from logging in

As a precaution, software downloaded from the internet should have all default usernames disabled. nems comes with root and nemsadmin

Edit the password file and prevent root or admin

$ sudo nano /etc/passwd

and change

root:x:0:0:root:root:/bin/bash

to

root:x:0:0:root:root:/sbin/nologin

and do the same for nemsadmin

nemsadmin:x:1001:1001:,,,:/home/nemsadmin:/sbin/nologin

Step 9. Add all your devices

This is really annoying - auto-discover should be a required feature

Open a browser, and enter the URI https://nems.local, select CONFIGURATION, NMEMS Configurator (NConf). See image at the top of this page, and then a new NEMS Configurator tab should open in your browser

Under Basic Items, add each network element using Hosts Add and completing the required fields marked with *

For address use the hostname.local rather than the IP address

Select Monitored by: Default Nagios

Set "host template(s)" to linux-server

Set "contact groups" to admins

Step 10. Generate the config

Click on Generate Nagios config

If there are errors, click on the bar and fix the errors

If no errors, then click on Deploy

And the servers should be monitored

Go to the Browser window with NEMS Server, and the to Reporting, Nagios Core

Step 11. Add Host Groups

Add host groups.

As an example for my home network: I have 7 TVs. Each TV is smart, and has a Roku, and Kodi running on OSMC as client for TVheadend.

So, I would enter host groups for TV, Roku and OSMC or Kodi.

Step 12. Add NRPE to linux servers

By default, NEMS can ping servers. To get more detailed information, login to a Raspberry Pi or debian linux server (not the NEMS server) and run this command:

$ sudo apt-get install nagios-nrpe-server nagios-plugins -y

Edit this file

$ sudo nano /etc/nagios/nrpe.cfg

and change this line to (my home network range is 192.169.1.0/24 change this to match your network):

allowed_hosts=127.0.0.1,192.168.1.0/24

Restart the nrpe service

sudo systemctl restart nagios-nrpe-server

Step 13. You're done!

A lot can be done with NEMS. The best way is to navigate through the tool and try various features. Decide what you want to monitor and alert on.

Here are some examples:

      • Add notifications: Open https://nems.local,, go to NEMS System Settings Tool, Notifications

      • Use Adagios instead of Nagios: Open https://nems.local,, then go to NEMS, Reporting, Adagios

Step 14. Optional - NEMS, Reporting, Adagios

Adagios has a more modern look-and-feel than Nagios

Networking tools

These networking tools are useful:

$ sudo apt-get install snmp -y

$ sudo apt-get install nmap -y

To get hostname, ip address and mac address of everything on the network

$ arp -a