Nagios on a Rasp Pi 3 with NEMS

Small but Mighty

Monitoring Your Pi

Under the NEMS System menu, three applications are available to monitor the status of your Raspberry Pi: Monitorix [8], RPi-Monitor [9], and Webmin [10].

Monitorix is a system monitoring tool designed to monitor as many services and system resources as possible on a Linux/Unix machine (Figure 7). This application does not require any configuration because it has been preconfigured by the NEMS developer to provide system resource graphs for time periods of up to a year, which should help you spot issues such as low disk space, high RAM usage, or temperature problems.

Figure 7: Example of a Monitorix performance graph.

The RPi-Monitor application is a self-monitoring tool designed to provide system information for the Raspberry Pi. It includes information such as operating system version, memory usage, uptime, and CPU performance (Figure 8). A FAQ is available on the RPi-Monitor website.

Figure 8: RPi-Monitor Status page.

The final tool mentioned is Webmin, which does much more than monitor your system. First, its Dashboard tab provides a wealth of status information (Figure 9). It also acts as a web-based interface for administration of the operating system. Using a browser, you can set up user accounts, DNS, file sharing, and much more. Webmin eliminates the need to edit many Unix configuration files manually (e.g., /etc/passwd), and it lets you manage a system remotely.

Figure 9: Webmin homepage.

Backup and Restore

The NEMS developer has created a simple backup and restore process that will, in the event of a hardware failure or after an upgrade, prevent you from having to rebuild your Nagios3 configuration from scratch. The backup and restore links are located under the Migrator tab.

Select the backup link to start the NEMS configuration backup process. When prompted, enter your NEMS user ID to start the download. Just save the download file in a convenient location. I have automated this process by creating a daily scheduled job that runs the wget tool to grab and save the backup file:

wget --user=<UserID> --password=<Passw0rd> -O "backup.nems" http://<NEMSIPAddress>/backup/

Clicking the restore link opens a page in your browser that contains detailed restore instructions. Generally, you will copy the backup.nems file to a flash drive, insert the flash drive in a Raspberry Pi running NEMS, issue the nems-restore command, and follow the prompts.

Considering the low cost of a Raspberry Pi and microSD card, I recommend keeping a spare Pi with a microSD card that contains an image of the running microSD card as a backup. To build the image, shut down the Pi and create an image file from the microSD card using the same tools you used to write the NEMS image to the microSD card originally; then, copy that image file to a standby microSD card.

In the event of failure of your production system, just fire up the backup, copy your most current NEMS backup file to the backup system, and do a configuration restore. Your NEMS monitoring is now back online.

Conclusion

After running NEMS for more than a year in a production environment, I have found the system to be very economical both to acquire and to run.

The software is stable and scaleable. A NEMS monitor would provide monitoring services for everything from a small remote office to a data center environment.

Support of NEMS has exceeded the support I have seen from many open source developers. I have contacted the developer of NEMS a few times over the last 18 months, and the replies have always been quick and accurate. A NEMS community forum link is also available on the NEMS project page.

NEMS could be your ideal solution if you are considering implementing a network device and service monitoring function in your own network, and you want a cost-effective solution that does not require Linux expertise either to implement or support.

The Author

Rick Haltermon is a consulting analyst with more than 35 years experience, mostly in the banking sector.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Nagios Passive Checks
    Why spam yourself with useless notifications every time a script completes successfully? You can use Nagios to screen the notices and just send the ones that need action.
  • Network monitoring with Icinga and Raspberry Pi
    Icinga on the Raspberry Pi monitors your network, letting you see the good, the bad, and the ugly, so you can address problems proactively.
  • Remote Sys Admin
  • Nagios alerts implemented via VoIP
    Out of the box, Nagios can only alert you by email when a service fails, but these email messages can be easily overlooked. A call is more sustainable.
  • All for Admins
    Our Admin special edition was so popular we're back, with a new quarterly magazine that is all for admins. Welcome to the first issue of Admin: Network and Security – a magazine for administrators of heterogenous networks.
comments powered by Disqus