NEMS – Nagios Enterprise Monitoring Server for Raspberry Pi
NEMS is a pre-configured, customized and ready-to-deploy Nagios Core image designed to run on the Raspberry Pi 3 micro computer. At its core it is a lightweight Debian Stretch deployment optimized for performance, reliability and ease of use.
NEMS is free to download, deploy, and use. Its development however is supported by its community of users. Please consider contributing if you can.
I am taking requests for features for NEMS 1.2. Please post your requests in the comments below.
NEMS Featured on Category5 Technology TV
What Is Nagios Core?
Nagios® Core™ is an Open Source system and network monitoring application. It watches hosts and services that you specify, alerting you when things go bad and when they get better.
Some of the many features of Nagios Core include:
- Monitoring of network services (SMTP, POP3, HTTP, NNTP, PING, etc.)
- Monitoring of host resources (processor load, disk usage, etc.)
- Simple plugin design that allows users to easily develop their own service checks
- Parallelized service checks
- Ability to define network host hierarchy using “parent” hosts, allowing detection of and distinction between hosts that are down and those that are unreachable
- Contact notifications when service or host problems occur and get resolved (via email, pager, or user-defined method)
- Ability to define event handlers to be run during service or host events for proactive problem resolution
- Automatic log file rotation
- Support for implementing redundant monitoring hosts
- Optional web interface for viewing current network status, notification and problem history, log file, etc.
Nagios doesn’t need a big fancy supercomputer to offer exceptional enterprise monitoring of network assets and resources, so our temptation is to re-purpose older servers to perform this reasonably lightweight task.
If you ask me, that’s not only overkill, but the attempt to save money by reusing older hardware will actually cost more due to higher electricity usage vs. a tiny Raspberry Pi 3 Microcomputer… which ironically may in fact have more modern system specifications than that old beast of a server you’ve been using.
It can be a wee bit daunting to setup a Raspberry Pi Nagios server from scratch, and there were no projects I found which were actively maintained at a level adequate for professional use. So I decided to start a new project–called NEMS: Nagios Enterprise Monitoring Server (for Raspberry Pi).
This project uses freely available applications such as Debian Linux, Nagios Core and a variety of other goodies, and I too release a fully ready-to-use image for you to use within yours or your customer’s network environments.
If you like NEMS, please donate: donate.category5.tv
The Out-Of-The-Box NEMS Experience:
- Raspberry Pi 3 Micro Computer
- 8GB+ Micro SD Card (Recommend 16GB+)
- Network Connection (will obtain IP address via DHCP: create your reservation in the DHCP server for ease of access)
- Internet Connection
- Purchase and assemble your Raspberry Pi 3.
- Download the most current version of NEMS below.
- Unzip and “Burn” the image to your Micro SD card.
- Boot your NEMS server.
- Login to NEMS console by either connecting a monitor and keyboard, or using ssh (Username: pi / Password: raspberry)
- Type: sudo raspi-config
- Expand the filesystem and exit raspi-config.
- Edit /etc/nagios3/resource.cfg and add your SMTP information.
- Reboot your Pi and enjoy NEMS when it comes online (see below for further details).
Buy The Needed Hardware
Here’s our link to buy the device you’ll need, complete with the Micro SD card, a power adapter, a good solid case, and more: shop.category5.tv
Please buy it through that link, or let me know if you need a customized link to a different model. We get a small percentage of the sale, and it helps to make it possible to offer this as a free download.
The goal with NEMS is to provide a free, full-featured, up to date drop in Nagios Enterprise Monitoring Server for Raspberry Pi 3. It has all the bells and whistles while being optimized for solid stability and fast performance.
The original NEMS release was based (with big thanks to Ryan Siegel) on NagiosPi, with many of the settings reflective of the NagiosPi Wheezy distro (which is now obsolete).
Here is what Ryan Siegel (the creator of NagiosPi) has to say about NEMS: “I’d love to upgrade NagiosPi, but i don’t have ability to make a GUI that can beat that of NEMS. I strongly feel that it has always been a necessary addition to NagiosPi and NEMS was able to deliver what is essentially an updated and improved version of NagiosPi. No reason not to start using NEMS for the time being. Nice work Robbie!” [source]
NEMS Raspberry Pi Image (1916 downloads)
Unzip and “burn” to 8 GB+ Raspberry Pi 3 Micro SD Card (I recommend you use at least a 16 GB card so there’s plenty of room for logs, configs, data and so-on).
Configuring Your NEMS Server:
Browse to: http://nems/nconf (or http://IPADDRESS/nconf)
Make changes to the config as needed for your environment (eg., add a host, service, edit a setting)
I’ve added a few sample configurations in there (v1.1+) to help you get started.
Click: “Generate Nagios Config”
If there are no errors, you will have the option to Deploy the new Nagios Config.
Using Your NEMS Server:
Browse to: http://nems (or http://IPADDRESS)
Choose Nagios for a customized Nagios system (easy), or use the Reports to create sophisticated reports and custom dashboards (advanced).
To add hosts or configure your environment, use the built in “Configure Nagios” feature.
NOTE: You should change these defaults when setting up your NEMS server.
Nagios – U: nagiosadmin / P: nagiosadmin
Reports – U: admin / P: admin
Version 1.2 – TBR May 8, 2017
– Underlying OS upgraded to Raspbian Stretch.
– PHP upgraded to 7.0.16.
– Reworking of nConf to make compatible with modern software (ie. PHP7.0).
– Maintenance and info scripts moved to /home/pi/nems-scripts.
– NEMS MOTD upon login now shows local IP address. Also improved how it determines some of the info (see info.sh in nems-scripts).
– /tmp and /var/tmp moved to RAM.
– Added RPi-Monitor as per Hesh’s comment.
– Added nagios-api (JSON on Port 8090) as per Timothy Seibert’s request. [License]
– Added Webmin as per Hesh’s comment. Login as pi user. Set a new password for pi to make it more secure.
Changelogs Archive: http://www.baldnerd.com/nems-changelog-archive/
- PNP4Nagios is installed, but not configured. You may encounter errors, which will be addressed in a future release.
- If you encounter an issue, please report it in the comments below so I can work on a fix (or please post your fix to help others and possibly to have it integrated into the next build).
This list details features which are planned for future releases of NEMS. NEMS is released on a 6 month schedule, with a major release every May and November. Thanks to the NEMS Migrator, upgrading is a cinch.
– Further improve the mobile responsive layout for tablets and smartphones (It’s really rudimentary at the moment due to the nature of Nagios’ interface… frames? C’mon now.)
– Upgrade Nagios to Nagios Core 4. (?)
– Upgrade NagVis to 1.9 (once it becomes “stable”).
– Further streamline the implementation of Check_MK. Deploy check-mk-server.
– Expand the documentation to include setting up SMTP and mail alerts (while I added sendemail to NEMS 1.1, it appears people still have trouble figuring this part out). Admittedly, Nagios is complicated… but NEMS intends not to be. So this will be made either more clear, or more easily achievable.
– Distribution via BitTorrent.
– Out of the box email notifications (this has been difficult for many NEMS users so it is my biggest focus for version 1.2).
– NEMS Migrator to be upgraded to allow direct migration from nagiospi to NEMS.
– NEMS Migrator improvements re. the import of mail notification settings from earlier versions of NEMS.
– Several fixes, upgrades and improvements as per comments and my notes (no point listing things yet since the versions and so-on will simply be “the current” at the time of release).
– I’m open to suggestions! Please post your comments at http://baldnerd.com/nems
Things I Will Not Do:
This is a list of features I will not implement.
– Raspberry Pi Zero, 1 & 2 support. Buy a Raspberry Pi 3. The higher performance of a Pi 3 is a major asset for a project like NEMS, so I will not be focusing any of my efforts on supporting legacy hardware.
– GUI/Desktop. NEMS is a Linux server. If you require a GUI/Desktop Environment, you’re doing it wrong. I have built a very nice, easy to use web interface, and have worked hard to provide good documentation to ease the complication of configuration for novice users. NEMS itself should not even have a screen connected to it. Just power and Ethernet. Everything happens either through your browser, or for advanced users, an SSH connection.
Support What We Do:
This project is a part of something much bigger than itself, and we’re all volunteers. Please see our Patreon page for information about our network.
– Please support us by simply purchasing your Raspberry Pi at https://cat5.tv/pi
– We have some support links on the NEMS menu, such as buying from Amazon using our partner link. Please use these every time you use those stores. A small percentage of your purchase will go toward our projects.
– Your donations are VERY MUCH appreciated – https://donate.category5.tv – Please consider how many hours (and hours) of work this project has saved you, and how much you’ll save on hardware and even electrical costs as you consider contributing
– Our network also has a Patreon page – Please consider becoming a patron – https://patreon.com/Category5