« Previous 1 2 3
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.
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.
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.
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.
Infos
- NEMS project: https://nemslinux.com/
- Nagios Core: https://www.nagios.org/
- Developer Robbie Ferguson: http://www.baldnerd.com/who-is-the-bald-nerd/
- NConf legacy help: http://www.nconf.org/dokuwiki/doku.php?id=nconf:help:main
- Nagios Core: https://www.nagios.org/projects/nagios-core/
- NagVis support forum: https://monitoring-portal.org/cms/
- Check_MK: http://check-mk-documentation.readthedocs.io/en/latest/
- Monitorix documentation: http://www.monitorix.org/documentation.html
- RPi-Monitor FAQ: http://rpi-experiences.blogspot.fr/p/rpi-monitor-faq.html
- Webmin: http://doxfer.webmin.com/Webmin/Webmin_Modules
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.