NEMS – Nagios Enterprise Monitoring Server for Raspberry Pi 3

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.

[NEMS Documentation]

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.

Why NEMS?

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:

System Requirements

  • 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

Instructions

  • 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

Raspberry Pi 3 Nagios ServerRaspberry Pi 3 are very affordable, and using our Micro SD image, you simply buy the device, “burn” the image to the Micro SD card, and boot it up.

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.

About NEMS

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]

Download NEMS
NEMS Raspberry Pi Image (1916 downloads)

Install NEMS
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.

Passwords:
NOTE: You should change these defaults when setting up your NEMS server.
Nagios – U: nagiosadmin / P: nagiosadmin
Reports – U: admin / P: admin

Changelog:

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/

Known Issues:

  • 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).

TO DO:
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

155 thoughts on “NEMS – Nagios Enterprise Monitoring Server for Raspberry Pi 3

  1. Has anybody managed to collect performance data and generate the graphs using pnp4nagios?
    i am stuck with this error (using check_http):

    perfdata directory “/var/lib/pnp4nagios/perfdata/<<HOSTNAME>>” for host “<<HOSTNAME>>” does not exist.

    would love to see this configured “out-of-the-box” in V1.2

  2. Hey there!

    A cool function to see back in 1.2 would be the use of SSL certificates!
    Since apache is includent, a small SSL Cert tool, or the option to use the free LetsEcrypt tool (which is available, and allows bash scripts and API’s, and can renew itself using the apache server without disturbing anything else) if you use a domain! (for example, monitoring.baldnerd.com).

    This would not only lock the application to a subdomain in a vhost in apache, raising securty and scalability, but also raises security and privacy!

    If so, the tool would without a doubt be an interesting addition to the pi cluster my Website is hosted upon!

    • Wouldn’t that require you to register a domain name for your NEMS server? I could do a self-signed certificate, but that obviously would result in security warnings. If it’s so you can access NEMS from the Internet instead of LAN, why not just use an SSH tunnel since it’s a private server (no need to give public access)? Of course, SSL would be great just in general, but since most people will access NEMS via its IP address, it may not be a good solution. Personally I’d just setup an SSH proxy to my office and use the LAN IP to access NEMS, if I wanted to access it remotely.

  3. Is it possible to open up the Nagios API to be monitored by another server?

    I have a product that’s monitoring my AWS instances that has built in Nagios integration, but it needs API access.

  4. Robbie, this looks great, I have a Pi3 with a WD USB PiDrive already running so I don’t want to trash the build.

    Is it possible/practical to unbundle NEMS from the SD card image?

    So that NEMS can be reinstalled as a package…

    thanks in advance.

    RW.

    • Hey Roger. NEMS is a distro, not an application. I think what you’re looking for is instead Nagios, part of what powers NEMS. The nice thing about NEMS though is it saves you the onerous process of setting up Nagios by providing a ready-to-use OS image that has been pre-configured with Nagios and all the other features.

  5. Nems is awesome. The whole thing wend smooth as silk – except for the notifcations. This thread has been a good resource for me.

    As I wrestled the notifications into submission. I learned a few things along the way. (I suppose that is part of why I do it)  I’m including them here for others. Many or most of them may already be in this thread somewhere.

    My configuration interspersed sendEmail and sendemail – the actual executable was sendemail – note the lowercase e in the middle.
    In nconf under misc commands, the path to sendemail was not correct. It was /usr/local/bin/sendemail and it should have been /usr/bin/sendemail
    Make sure you update /etc/nagios3/resource.cfg
    Make sure you update the contacts in nagios.
    The permissions on /var/log/sendemail were such that it could not write to it, so the logging was not working.
    If you are using gmail as your SMTP server, use port 587, add -o tls=yes to the sendemail command line, and for the tls to work, you’ll need to install

    apt-get install libnet-ssleay-perl
    apt-get update
    apt-get install libio-socket-ssl-perl

    If you are using the “-m” option (body of message) on sendemail, dashes in hostnames (like “ftp-server”) can be interpreted as command arguments and will not work. I had to feed the body of the message in via stdin (/usr/bin/printf “%b” Body of message here\n” | /usr/bin/sendemail “the rest of the options go here”. Since my dashes were in the nagios macros, it took a while to figure this out.

    Now it is really cooking along.

    Thanks Robbie for making this available – donation heading your way.

    I hope this is useful to others.

     

    Jim

     

    • sorry about the formatting on the above post. All of the bullets/indents I carefully out in place disappeared as I posted it.

      Jim

    • Jim–that’s fantastic information and surely will help a lot of the NEMS community of users – thank you! Re. donation: thank you very much. It’s very encouraging to feel appreciated, and it really helps me offset the cost of offering this and my other projects for free to the community. So people like you contributing are really what makes it possible. Thanks again!

      • depending on how you implement this, the option for temp, or select directories to got to RAM – or even a USB hard drive (I think in either case it is just another filesystem) is a great idea. SD card exhaustion is the one serious downside many of my pi projects share.

        • Thanks for your concurrence. Indeed I will opt for the RAM option after some testing to ensure the RAM remaining is enough to operate the NEMS Server reliably and without a negative performance hit. I don’t want to start requiring things like a USB drive, though if a user chooses to move the ramdisk, they can do so by modifying the fstab easily enough.

          This feature further reiterates the need to run NEMS on a Pi 3 or higher.

  6. Able to send a test email via/ ‘sendemail’ via/ the command line within a SSH session but not able to get any of the alerting via/ NEMS to work. I’ve already modified the SMTP properties in the ‘resource.config’ file w/ the same info/rebooted the Pi.

    Any ideas/things to check?

  7. Robbie,

    Migrated to NEMS 1.1 and now email alerting is not working.  I sent a message with sendmail while SSH’d into NEMS box and that worked.  Alerting when a host is down, isn’t.

      • That’s what I meant, sorry. Wish I could blame that on spell check.

        root@NEMS:/etc/nagios3# sendEmail -f noc@qac.org -t jason.smith@qac.org -s 172.16.50.22 -u “test test 3” -m “This is a 3rd test message”
        Nov 22 11:44:29 nems sendEmail[31923]: Email was sent successfully!
        root@NEMS:/etc/nagios3#

        Where are the scripts configured?

        • from /etc/nagios3/global/misccommands.cfg
          define command {
          command_name notify-host-by-email
          command_line /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: … /usr/bin/sendEmail -s “** $NOTIFICATIONTYPE$$}

          define command {
          command_name notify-service-by-email
          command_line /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTAL$…
          /usr/bin/sendEmail -s “** $NOTIFICATIONTYPE$$}

          • Robbie,

            Not sure why I could not grasp everything you have been saying. I just updated the misccommands (service and host notify) through nconf which did not have the correct sendEmail paths and all is working.

            # ‘notify-host-by-email’ command definition define command{command_name notify-host-by-email command_line /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n” | /usr/local/bin/sendEmail -s $USER7$ -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u “** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **” -m “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n” }

            # ‘notify-service-by-email’ command definition define command{command_name notify-service-by-email command_line /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$” | /usr/local/bin/sendEmail -s $USER7$ -t $CONTACTEMAIL$ -f $USER5$ -l /var/log/sendEmail -u “** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **” -m “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$” }

            Thanks again for such an easy and great product. Pretty sure my trouble is more me than you. Looking forward to the next update. great job!

          • Tried to copy Jason’s info below into the two ‘notify-xxx-by-email’ misc commands using NConf. Think I screwed it up. Wasn’t sure if I needed to copy all or a portion of Jason’s text below. Also not sure if some of the text formatting/characters need to be obmitted??

            Can either of you guys post the command line for both so myself and others can copy/paste it? Thx

  8. I’ve been running nagiospi for a while, and just ran across NEMS. Moments later a copy was running on a spare pi. Really nice work. I’m still digging around in various doc, so I may find my own aswer. I’ve got quite alot invested in nagiospi (nagios and nagvis) – is there a streamline way to move that over? Will your migrator tool work there? (sorry if I’m missing the obvious). Any insights appreciated.

    • Hi Jim,
      The Migrator does not presently help nagiospi users migrate to NEMS. If you are willing, please send me a copy of your SD card and I will use that as a base to integrate a nagiospi-to-NEMS migrator tool in the next release.

      • That is an incredibly generous offer – thank you. Let me strip out some if the confidential bits, and I’ll try that. Having a bit of an issue just now, wishing I had the superior backup features of NEMS.

        Jim

        • We’ll get you there! Happy to help if I can. Keep in mind NEMS 1.2 is coming soon so try to rush this to me asap so I can try to get the feature in with this release. Otherwise, no worries; I can roll-out the NEMS-Migrator updates independently of NEMS 1.2.

          PS – here is the tool I adapted to create the NEMS images… it is how I can get the image files to be super small. You might consider using it if you can in order to create your image to make the upload smaller – https://github.com/Cat5TV/rpi-mkimg – and if that doesn’t work for you for some reason, no worries… It’ll just be a bigger download – lol

          ** ALWAYS BACKUP YOUR CARD FIRST **

  9. Hi Robbie

    I like NEMS very much, great work!

    I would like to have a theme that doesn’t need internet connection. Maybe you can add this in the future.

     

    Chris

  10. Hi,

    i have the following problem:

    New installation, expand the filesystem and exit raspi-config.
    When i open the check_mk-site in browser the system told me
    in the WATO-section that there is 1 Change (Modified user nagiosadmin).
    When i click “Activate changes!” i get this Error:

    Error: Nagios Core 3.5.1 Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 08-30-2013 License: GPL Website: http://www.nagios.org Reading configuration data… Read main config file okay… Processing object config directory ‘/etc/nagios3/global’… Processing object config file ‘/etc/nagios3/global/host_templates.cfg’… Processing object config file ‘/etc/nagios3/global/timeperiods.cfg’… Processing object config file ‘/etc/nagios3/global/check_mk_objects.cfg’… Processing object config file ‘/etc/nagios3/global/contactgroups.cfg’… Processing object config file ‘/etc/nagios3/global/service_templates.cfg’… Processing object config file ‘/etc/nagios3/global/misccommands.cfg’… Processing object config file ‘/etc/nagios3/global/contacts.cfg’… Warning: Duplicate definition found for contact ‘nagiosadmin’ (config file ‘/etc/nagios3/global/contacts.cfg’, starting on line 1)
    Error: Could not add object property in file ‘/etc/nagios3/global/contacts.cfg’ on line 2.
    Error processing object config files! ***> One or more problems was encountered while processing the config files… Check your configuration file(s) to ensure that they contain valid directives and data defintions. If you are upgrading from a previous version of Nagios, you should be aware that some variables/definitions may have been removed or modified in this version. Make sure to read the HTML documentation regarding the config files, as well as the ‘Whats New’ section to find out what has changed. Configuration for monitoring core is invalid. Rolling back.

    Can me someone explain what is to do that this error is fixed?
    Sorry…Noob :o)
    best regards, Thorsten

  11. Here is an example of the error I’m receiving:

    [2017-01-26 21:49:32] Warning: Attempting to execute the command “/usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: PROBLEM\nHost: debianserv\nState: DOWN\nAddress: 10.0.0.26\nInfo: CRITICAL – Time to live exceeded (10.0.0.26)\n\nDate/Time: Thu Jan 26 21:49:32 UTC 2017\n” | /bin/mail -s “** PROBLEM Host Alert: debianserv is DOWN **” nagios@localhost” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…

      • Hey Steve, I was curious if you ever solved this issue. I am running into the same error and can trying to find some information about what’s going on and how I can remedy the problem.

        Thanks,
        Gene

        • Hi Gene, nope, I got busy and put on the back burner, I will revisit project this month. If you have any luck or a solution, please post it, I’ll do the same.

          thanks,
          Steve

    • I am experiencing exactly the same problem and would really appreciate some help trying to resolve it. I’ve set up a handful of hosts and services to test and the monitors are working extremely well but without working alerts, the whole thing is useless really and there’s no point in me adding anything else.

      Thanks,

      Keith.

  12. Timothy Seibert / Robbie Ferguson :

    Did you two ever get notifications working through that Gmail account? If not… I might know what the problem is. Have a look at “Allow Less Secure Applications” for that Gmail account you’re trying to use to authenticate. DO make sure you have a STRONG password set on it though and a way to recover control of the account in the event it gets whacked.

    And Robbie, this is @digithead on Twitter…  🙂

    I was able to migrate my existing MRTG install I had running on an Ubuntu server over to the NEMS device and get that going as well. It’s now watching Port utilization on a Hewlett Packard managed switch on the internal network and has all of the historical data from the past year.

    I intend to take a crack at getting Check_MK completely integrated with NEMS… so wish me luck.

    • Thanks BikerTash,

      I still haven’t got the notifications working with google.
      “Allow Less Secure Apps” has been on to support another notification system.

      The frustration I’m having is I’m not seeing the notifications come from the NEMS PI
      I ran a packet capture from my switch on the port NEMS occupies and saw no traffic for ports 25, 465 or 587.

      • I’m sorry my schedule has been such that I have yet to investigate this. I know many users have the notifications working fine, and I myself have an SMTP server I use that is working fine. I do have plans to simplify the notifications setup and fix this for you–unfortunately it’s just taking time to get to it. I typically do NEMS pushes every 6 months. Trying to get the next one out sooner due to this.

      • Howdy Timothy,

        I tinkered with it for some time before deciding to just install Postfix as the machine’s MTA (or “Mail Transfer Agent”). Although it’s sort of like taking shotgun to a butterfly hunt, it’s a mail server that I’ve already been using for some time now (after abandoning the old Sendmail package, but I digress).

        After getting it installed and functioning as a simple “smart-relay”, I then created a soft-link in symbolic link “/bin/mail” that points to “/usr/bin/bsd-mailx”.

        There are a lot of “HowTo’s” out there on how to setup Postfix as a smart-relay for a Gmail account and it only takes a few lines in the “/etc/postfix/main.cf” configuration file to get it to work.

        In my case, since I already have an internal Microsoft Exchange Server as my primary mail destination I was able to just “smart-relay” directly into that. But setting up Postfix to sound out through Gmail is rather simple to do just the same. If you have trouble with it though I’d be more than happy to help out as much as I can. If you click on my “username” here it should take you to my web site where you can submit a “Contact us” request that send an e-mail to me and we can go from there.

        Robbie’s NEMS device is spectacular and WELL worth the effort to get it going! I’ve been running it ever since I stumbled across it and got that notification part working and I absolutely love it! I have been using Nagios for roughly 10 years now and I can tell you that it’s rather complicated to make it work. But Robbie’s NEMS device is virtually “plug-n-play” in comparison. I even have MRTG running on it now and that keeps historical graphs of the switch port bandwidth utilization on all of the ports of my backbone switch. 😀

  13. Hi Robbie,

    nice work! I’m new to Nagios, but your image made setup easy. My only issue now is getting the email alerts. I setup 2 contacts and added them into the contact group. I’ve added alert conditions and triggered those conditions.

    in the “notifications” area (under Reporting heading) I see under Notification Command heading  “notify-host-by-email” – so it looks like the event was triggered, I didn’t receive any email though.

    my mail server does not require authentication. I was able to successfully send mail from the terminal command line.

    Any troubleshooting tips are appreciated.
    Here is my resource.cfg file:

    # Sets $USER1$ to be the path to the plugins
    $USER1$=/usr/lib/nagios/plugins

    # Sets $USER2$ to be the path to event handlers
    #$USER2$=/usr/lib/nagios/plugins/eventhandlers

    # Store some usernames and passwords (hidden from the CGIs)
    #$USER3$=someuser
    #$USER4$=somepassword

    ### sendemail SMTP Config added in NEMS 1.1

    # The “from address” for notifications
    $USER5$=nagiosmonitor@mydomain.com

    # The SMTP server
    $USER7$=my.smptserver.com

    # the SMTP authentication username and password
    #$USER9$=
    #$USER10$=
    Thanks!

  14. Wow! This device is excellent!

    I have been using Nagios for about 14 years but I’ve always had to do the configuration manually from the command prompt and that’s a real pain. I decided to give this little guy a whirl and had it up and running in no time.

    As above, the only issue I had was with notifications. I simply could not get it working… not even with my internal SMTP servers. So… to resolve it, I simply install Postfix (this image is running on a 64 GB MicroSD so it has plenty of room) and configured it be the SMPT server on “localhost” and “smart-relay” into my internal Exchange Server. I did have to create appropriate soft-link in /bin for “mail” though and *poof*… good to go.

    I have a somewhat ‘sophisticated’ internal network and this little guy is busy monitoring all of it. I plan to deploy this at the office to keep an eye on a larger network and do away with the existing Nagios installation.

    Excellent work! And thank you!

  15. Robbie I tried this on Google

    sendEmail -o tls=yes -f xxxxxxx@gmail.com -t ron.j.taylor@bigpond.com -s smtp.gmail.com:587 -xu xxxxxxxx@gmail.com -xp xxxxxx -u “test test” -m “this  is a test message”

    Where xxxxx edit/replace my real emails address and passwords etc

    And Got the following

    Jan 15 18:16:41 nems sendEmail[18549]: ERROR => No TLS support!  SendEmail can’t load required libraries. (try installing Net::SSLeay and IO::Socket::SSL)

    Google /Gmail requires this TLS support on port 587 I think??

     

    • In an attempt to get email notification on NEMS I made the following changes
      I installed the following packages libnet-ssleay-perl and libio-socket-ssl-perl
      apt-get install libnet-ssleay-perl
      apt-get update
      apt-get install libio-socket-ssl-perl

      After I installed these packages I was able to successfully send a test email from the command line from a GMail account to my ISP email account using -o tls=yes.

      As Steve T Points out the diagnostic of “make sure this command exists”, I noticed that the notify-host-email was using a /usr/bin/mail rather than /usr/bin/sendEmail.

      I changed this and did not get the error anymore but NEMS will still not send me emails when I create a failure (eg take something down).

  16. Hi Robbie

    I have just found your site and I think it’s awesome!

    I am a retired person and do IT as a hobby.

    I run a number of RPi’s on my home LAN to do a variety of chores.

    One of them is an RPi2 and it’s job is to take pictures of my electricity meter in my switchboard.

    I have a solar system installed so I record the meter reading 4 times.  I put these into a database and I can then see how much power I use when the sun is shining and when its not (at night).

    Sometimes the wifi link drops out and I was hoping to use SNMP to check on this.

    Currently I am using NEMS and doing the simple Ping, as you suggested in your video, but feel there is much more I can get out of it with SNMP.

    I am not sure how to go about this in NEMS and the RPi2 in the meter box (running Wheezy).

    So I am hopeful that you can give me a few pointers or links to the right places on how to achieve this goal.

    I edited the SMTP in  /etc/nagios3/resource.cfg is there somewhere else to edit? I see a from email address  and  a SMTP address and login but where do you say where to sent the email to?

    Thanks in advance

     

     

  17. Robbie,

    I was watching you NEMS video and thinking to myself “OK Comcast drops out at least 4-5 times per week, with this RP3 Nagios instance there is no excuse not to have a monitoring server at home”. Before the video finished….. my Comcast internet service went offline for 2 hours.

    I grabbed my phone, found your link to buy the Raspberry Pi3 complete NEMS kit and ordered it with overnight delivery. From the time that I opened the package the next day,  to the first NEMS screen was about 35 minutes including 5 minutes to assemble the kit and 5 minutes to retrieve the microSD card from the depths of my recliner after I,  dropped it after installing your download image. Thank you for curating such a useful and Easy to install Nagios tool chain. Nconf worked out of the box and  made it easy to install hosts without touching a host file.

    Now I am looking at a live Nagios  Network map of every Node/HOP between my Laptop and Google.com using:

    C:\Windows\System32>pathping google.com

    to identify all the Comcast nodes along the path. These nodes are now being monitored every 5 minutes as Hosts in NEMS / Nagios!!

    All of this information and the Pi3 only uses 1 Watt of power (0.02 Amps) at a cost of $1.05 USD per YEAR!

    https://www.energy.gov/energysaver/estimating-appliance-and-home-electronic-energy-use

    My appliance
    Aquarium equipment (RP3)
    Wattage – 1 (use arrows to select watts)
    Utility rate – Virginia $0.12/kWh
    Hours used per day – 24
    Days used per year – 365
    ENERGY USE AND COST PER YEAR- 8.76 kWh – $1.05

    Happy New Year and Thank you,

    JP

  18. In Oct I mentioned about adding Webmin (http://webmin.com/) to NEMS

    For those who are interested, I’ve included those steps below…

    # PuTTY or SSH into NEMS
    # Log in using “user: pi | pass: raspberry”
    # Set the root password
    sudo passwd root

    # Become the ROOT user (or su)
    sudo -i

    # To enable ROOT user access in PuTTY or SSH
    # Edit “/etc/ssh/sshd_config” and update the field “PermitRootLogin
    nano /etc/ssh/sshd_config

    # Change “PermitRootLogin without-password” to read…
    PermitRootLogin yes

    # [CTRL+X] to SAVE, then exit

    # Edit the Webmin APT repository
    nano /etc/apt/sources.list

    # Add this as the first line…
    deb http://download.webmin.com/download/repository sarge contrib

    # Download and install the GPG key with which the repository is signed
    cd /root

    wget http://www.webmin.com/jcameron-key.asc

    apt-key add jcameron-key.asc

    # Install Webmin
    apt-get update

    dpkg –configure -a

    apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

    apt-get install webmin

    # From a web browser go to https://nems.lan:10000/
    # Log in under the user ROOT and the password created earlier, to ensure it’s working

    For a better visual experience I prefer running the Authentic Theme (example above)

    To do this go Webmin Configuration, Webmin Themes

    Select Change Theme, and under Current Theme, select Authentic Theme, then click [Change]

    From this point, the added functionalities are endless as you can set up VPN, Backup/Restore jobs, CRON Schedules, DISK Quotas, Firewall, Traffic Monitoring, etc.

    At the moment, I’ve added Webmin & RPI-Monitor to my current 4GB microSD NEMS 1.1 package.

    Then I added the additional installed packages to the NEMS dropdown menulist.

    • Very cool, thanks for the info Hesh. How much drive space is free on your card? I’d recommend upgrading your MicroSD card to something larger as logs could fill your card up pretty quickly. I’d love to know more about why you want Webmin on there. I assume you’re using NEMS for much more than just Nagios? Or is it just that you don’t like to use the terminal? I’m eager to hear.

      • Robbie:

        As always, thanks for the quick feedback.

        In response to your last message in great detail, please check the contact@category5.tv email for a message entitled “A Shout Out to Robbie Ferguson”.

        Feel free to respond back to the email provided…

  19. I just saw the webcast last evening and set up my pi3 today. Still nosing around, but was wondering about support for monitoring OS X machines. I found some docs about creating an OS X agent to monitor with Nagios XI. Is this at all useful in NEMS?

  20. Robbie,

    Had things working, except for checking services on my windows machine. Made one too many changes and now have the following errors:

    Suggestions?

    Thanks,

    Gus62
    Configuration Deployment

    local

    extract config
    OK

    copy collector config
    OK

    copy global config
    FAILED

    PHP copy:
    OK

    system call
    FAILED

    • Hey Gus62,
      Sorry you hit a snag. Have you watched Episode 478? May help. It’s important to expand those lines of the output to see what is causing the error. All you’re looking at here is the summary… which is fine if all is well, but when you get an error, you need to then expand the output to see what the error actually is.

      Let me know if that helps you track it down, or otherwise 🙂

      Robbie

      • Robbie,
        Copied from terminal; any of this help?
        gus62

        login as: pi
        pi@192.168.0.16‘s password:
        Last login: Tue Nov 22 15:20:41 2016 from 192.168.0.7

        \ | __| \ | __|
        . | _| |\/ | \__ \
        _|\_| ___| _| _| ____/

        NEMS Version..: 1.1 (Current Version is 1.1)
        Last Login….: Tue Nov 22 18:05:36 from 192.168.0.7
        Uptime……..: 0days 2hours 45minutes 53seconds
        Load……….: 0.05 (1minute) 0.01 (5minutes) 0.00 (15minutes)
        Memory MB…..: 973 Used: 254 Free: 718 Free Cached: 876 Swap In Use: 0
        Disk Usage….: You’re using 1MB in /home/pi
        SSH Logins….: There are currently load users logged in
        Processes…..: 120 total running of which 4 are yours
        pi@NEMS:~ $ sudo /etc/init.d/nagios3 reload
        [….] Reloading nagios3 configuration (via systemctl): nagios3.serviceJob for nagios3.service failed. See ‘systemctl status nagios3.service’ and ‘journalctl -xn’ for details.
        failed!
        pi@NEMS:~ $ systemctl status nagios3.service
        ● nagios3.service – LSB: nagios host/service/network monitoring and management system
        Loaded: loaded (/etc/init.d/nagios3)
        Active: failed (Result: exit-code) since Tue 2016-11-22 15:19:54 UTC; 2h 47min ago
        Process: 599 ExecStart=/etc/init.d/nagios3 start (code=exited, status=1/FAILURE)
        pi@NEMS:~ $ journalctl -xn
        No journal files were found.
        pi@NEMS:~ $

          • Robbie,
            I think you hit on it; I started fooling around in the Nagios config files using part of the instructions found in Nagios Core help file: “Monitoring Windows Machines”; in addition to using nConf.
            I think I’ll go back and start again.
            And should I only adjust files (configuration) via nConf only? I’ll also rewatch #478.
            gus62

          • nConf uses a database, so you should be able to (theoretically, I haven’t tried this) open nConf and click “Generate Config” and it will undo the things you did in the terminal (which broke it). Please use the methods laid out for NEMS, not Nagios Core. 🙂 Will save you a world of hurt.

          • Robbie,
            Did a reload, stayed within NEMS and all up and running with no errors.
            Tried to add advanced service of CPU_load to the windows server and get a critical error of Socket timeout. See below for the service report from Check_MK.
            Now what am I missing?
            Thanks for your time/help,
            Gus

            Site alias Local site
            Hostname Gus8
            Service description CPU Load
            Service icons [Open the action menu]
            Service state CRIT
            Output of check plugin CRITICAL – Socket timeout after 10 seconds
            Long output of check plugin (multiline)
            Service Perf-O-Meter
            Service Graphs
            Service Metrics
            Currently in downtime no
            In notification period yes
            Current check attempt 3/3
            Service notification number 1
            The age of the current service state 7 min
            The time since the last check of the service 3 min
            Cached agent data
            The time of the next scheduled service check in 6 min
            The time of the next service notification in 56 min
            The time of the last service notification 3 min
            The last time the service was OK 1970-01-01 00:00:00
            Service check latency 0.092 sec
            Service check duration 10.036 sec
            Service normal/retry check interval 600s/120s
            Service notification period 24×7
            Service contact groups admins, admins
            Service contacts nagiosadmin
            Service groups the service is member of
            Service service level
            Service check command check_nt!CPULOAD!-l 5,80,90
            Service performance data (source code)
            Service custom variables
            Check manual (for Check_MK based checks)
            Custom services notes

          • Hi Gus62,
            I’m glad switching back to the NEMS-provided tools was not only able to work for you, but also automatically correct the errors you experienced after manually editing the Nagios config files. My hope is that you should never “really” have to use the terminal, except to expand the filesystem when you first install NEMS. The actual operation of NEMS can be done through the web interface.

            Regarding your Windows host, did you follow the directions in the documentation here: http://www.baldnerd.com/setting-up-nrpe-on-windows-for-nems/

            Lemme know. 🙂
            Robbie

          • Robbie,
            Yes, I set up NSClient per your instructions on setting up NRPE. below is the nsclient.ini file from my C:/Programs/NSClient++ folder.
            Gus

            # If you want to fill this file with all available options run the following command:
            # nscp settings –generate –add-defaults –load-all
            # If you want to activate a module and bring in all its options use:
            # nscp settings –activate-module –add-defaults
            # For details run: nscp settings –help

            ; TODO
            [/settings/default]

            ; Undocumented key
            allowed hosts = 127.0.0.1,192.168.0.16

            ; TODO
            [/settings/NRPE/server]

            ; Undocumented key
            verify mode = none

            ; Undocumented key
            insecure = true

            ; TODO
            [/modules]

            ; Undocumented key
            CheckExternalScripts = 1

            ; Undocumented key
            CheckHelpers = 1

            ; Undocumented key
            CheckNSCP = 1

            ; Undocumented key
            CheckDisk = 1

            ; Undocumented key
            CheckSystem = 1

            ; Undocumented key
            CheckEventLog = 1

            ; Undocumented key
            NSCAClient = 1

            ; Undocumented key
            WEBSErver = 1

            ; Undocumented key
            NRPEServer = 1

          • Great. So my next guess would be the Windows firewall (or possibly the one included with your antivirus). As an easy (but not necessarily safe) test, turn off the Windows firewall. Then wait … 15-30 minutes … and see if NEMS reports your Windows PC responding. Either way, then turn back on the firewall. If it worked, you need to setup exclusions in the firewall.

          • Robbie,
            Going thru my windows 10 firewall settings looking for NEMS server to add as an exception; no luck. Will turn off firewall temporarily as you suggested and see what happens. Meanwhile will continue to look for access to NEMS.
            BTW My router has been given port forwarding access to NEMS thru ports 5666 and 12489.
            gus

          • Do not do that on your router. You don’t want computers outside your lan (eg., script kiddies and exploit hackers) accessing NEMS. You should only open it up internally. If you need outside access, use an SSH tunnel.

            Lemme know how it goes with the Windows firewall [temporarily] disabled to rule it out. You won’t find NEMS as an exclusion on Windows, but rather the NRPE client you installed based on those same instructions.

          • Robbie,
            Now get:
            CRIT /CPU Load /connect to address 192.168.0.7 and port 12489: Connection refused

          • Of course, 192.168.0.7 is the right IP, yes? Has that system been rebooted since installing NSClient+? Can you open Services and confirm NSClient+ is running? May take some tinkering. Try deploying on yet another Windows machine and see if it’s machine specific and then go backwards over the steps once you have it working.

          • Robbie,
            Removed “port forwarding” from NEMS.
            Yes, have rebooted; will follow up on your additional recommendations.
            gus

          • Robbie,
            I made no progress turning off firewall or trying a different windows machine. Went to Linux laptop, installed NRPE(adding server port of 12489; and allowed hosts of 127.0.0.1, 192.168.0.16), got good ping. Then added two advanced services(accepting default settings): C:\Drive Space and CPU Load, reran Nagios Config with no errors, and get two warnings: “No data was received from Host!”. What do I examine/change next?
            Thanks,
            gus

          • You’re having trouble even with Linux agents, this is what you’re saying? Do you have some kind of internal firewall appliance that blocks ports internally from flowing through the LAN network? Something has to be blocking your agents.

            On your Linux machine, you followed the documentation for NEMS deployment on Linux, and included the installation of the nagios-plugins package?

  21. Ep: 478 was excellent, as it covered the out-of-box ease for setting up NEMS.

    Many thanks to Rob F for extending the life of this project.

    One feature that I miss from NagiosPi was RaspControl.  RaspControl gave a quick UI for monitoring many constant Pi stats (ie: CPU, Temp, ETH send/received, Uptime, etc.).  However unfortunately when that projected ended… so did the ability for re-distribution.

    Then after an exhaustive search I came across RPi-Monitor, which from this screenshots link… proved to be an improvement over the original RaspControl project.

    Using PuTTY or SSH as a ROOT user, I logged in and followed the steps provided below to get the RaspControl “like” interface, that was once part of the original NagiosPi distribution.

     

    # Execute the following command to add RPi-Monitor into your list of repository:
    wget http://goo.gl/vewCLL -O /etc/apt/sources.list.d/rpimonitor.list

    # Install my public key to trust RPi-Monitor repository:
    apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 2C0D3C0F

    # To install RPi-Monitor, execute the following command:
    apt-get update
    apt-get install rpimonitor

    # Update information about upgradable packages:
    sudo /etc/init.d/rpimonitor update

    # Using your Web Browser, go to http://your_Raspberry_Pi_address:8888 to access to the informative web interface

    # To upgrade RPi-Monitor, execute the following command:
    apt-get update
    apt-get upgrade

    # To remove the program but keep the configuration files and statistics
    apt-get remove rpimonitor

    # To purge everything related to the program
    apt-get purge rpimontor

    • I love it, Hesh, thank you. I’m going to go right ahead and add this to the To Do list for v1.2.

      Glad you enjoyed the show! I tried to show the ease of deployment (and those who have ever used Nagios will instantly notice how much nicer/easier it is than a traditional Nagios deployment), while also showing the workflow (eg., deploy->config->generate config->report) without getting to heavy on the technical stuff (that’s for the documentations and/or your own tinkering – haha).

      I love how NEMS itself is building up a great little community with people like yourself, feeding great ideas, bug fixes and improvements. Thanks!

  22. Request for future releases, a little documentation on how to add additional OS’s in with Nconf and include logos for the map.

    In the meantime, I’m arguing with management to see if I can’t convince them to donate at least a portion of what we would have spent on another monitoring solution.  This project is worth more than it’s weight in gold.

    • Hi Tim, I’m definitely working hard to bring strong documentation to NEMS, as you can no doubt see. And adding hosts to NEMS will be part of that documentation for sure! Please watch Episode 478 of Category5 Technology TV for a bit of an introduction which may help, and keep an eye on the documentation as I work to add more content over time.

      Regarding a contribution, that would be super awesome, and much appreciated. I do feel that NEMS saves system admins a TON of work, and I’m certainly trying to provide “better than free” support for its users, so I think there is some serious value in the project. It’s funded by Category5, so contributions will go to helping us pay our rent and other bills, and the hosting for the NEMS image.

  23. Just a quick post to complement you on version 1.1 of NEMS.  I have been running it for about 24 hours and here are my snap observations:

    1) The migration tool is wonderful. I am monitoring 23 hosts with 61 services. I was not looking forward to recreating the configuration in the new environment. This tool  did the trick.

    2) The Check_MK Multisite seems to be a great reporting tool. I like the displays very much. I have to spend some more time in there to learn my way around.

    3) Using SENDMAIL – In one of your posts you state that “/etc/nagios3/resource.cfg – you’ll find it self explanatory and well commented”. When I edit the file it does not seem to have any entries for SMTP.
    The text I see is:

    GNU nano 2.2.6         File: /etc/nagios3/resource.cfg
    ###########################################################################
    #
    # RESOURCE.CFG – Resource File for Nagios
    #
    # You can define $USERx$ macros in this file, which can in turn be used
    # in command definitions in your host config file(s).  $USERx$ macros are
    # useful for storing sensitive information such as usernames, passwords,
    # etc.  They are also handy for specifying the path to plugins and
    # event handlers – if you decide to move the plugins or event handlers to
    # a different directory in the future, you can just update one or two
    # $USERx$ macros, instead of modifying a lot of command definitions.
    #
    # The CGIs will not attempt to read the contents of resource files, so
    # you can set restrictive permissions (600 or 660) on them.
    #
    # Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$)
    #
    # Resource files may also be used to store configuration directives for
    # external data sources like MySQL…
    #
    ###########################################################################
    # Sets $USER1$ to be the path to the plugins
    $USER1$=/usr/lib/nagios/plugins
    # Sets $USER2$ to be the path to event handlers
    #$USER2$=/usr/lib/nagios/plugins/eventhandlers
    # Store some usernames and passwords (hidden from the CGIs)
    4) Version 1.0 was great and 1.1 is better and worth the upgrade.

    Rick

     

     

    • Your paste of the resource.cfg file is truncated. Make sure you scroll down … the SMTP settings are at the bottom of the file. If in doubt, do: cat /etc/nagios3/resource.cfg to see the whole thing 🙂

      Glad you are enjoying the features of NEMS 1.1! Thank you for your help testing the Migrator. Really helped to have a real-world user testing it out.

      Onwards and upwards!

      • Aha! You found a bug in the Migrator. You migrated from NEMS 1.0 and your backup file replaced the NEMS 1.1 config.

        I’ll have to add a diff to the migrator to import new settings and consolidate with the old.

        I will have this fixed no later than this weekend and will gladly send you a new copy of the config file so you don’t have to reinstall.

          • *sendemail* not to be mistaken for sendmail. 😉

            Here you are: ###########################################################################
            #
            # RESOURCE.CFG - Resource File for Nagios
            #
            # You can define $USERx$ macros in this file, which can in turn be used
            # in command definitions in your host config file(s). $USERx$ macros are
            # useful for storing sensitive information such as usernames, passwords,
            # etc. They are also handy for specifying the path to plugins and
            # event handlers - if you decide to move the plugins or event handlers to
            # a different directory in the future, you can just update one or two
            # $USERx$ macros, instead of modifying a lot of command definitions.
            #
            # The CGIs will not attempt to read the contents of resource files, so
            # you can set restrictive permissions (600 or 660) on them.
            #
            # Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$)
            #
            # Resource files may also be used to store configuration directives for
            # external data sources like MySQL...
            #
            ###########################################################################

            # Sets $USER1$ to be the path to the plugins
            $USER1$=/usr/lib/nagios/plugins

            # Sets $USER2$ to be the path to event handlers
            #$USER2$=/usr/lib/nagios/plugins/eventhandlers

            # Store some usernames and passwords (hidden from the CGIs)
            #$USER3$=someuser
            #$USER4$=somepassword

            ### sendemail SMTP Config added in NEMS 1.1

            # The "from address" for notifications
            $USER5$=example@gmail.com

            # The SMTP server
            $USER7$=smtp.gmail.com

            # the SMTP authentication username and password
            $USER9$=example@gmail.com
            $USER10$=examplepassword

          • Thanks a lot Robbie. Works great. Here is an example of my SENDEMAIL command in Nagios (I used to use SENDMAIL command line in the Windows world, so I have a heck of a time typing SENDEMAIL!)

            sendEmail -m “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n”
            -u “** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **” -f $USER5$ -t $USER5$ -s $USER7$ -xu $USER9$ -xp $USER10$

            And here is an example of my test email.

            ***** Nagios *****

            Notification Type: PROBLEM
            Host: NAS Server 3
            State: DOWN
            Address: 90.0.0.210
            Info: CRITICAL – Host Unreachable (90.0.0.210)

            Date/Time: Wed Nov 16 19:00:58 EST 2016

  24. Robbie,

    Great job on the release of NEMS 1.1.

    Check_MK Multisite is looking pretty good and it’s working for the most part — Thank you for that.

    Some errors are due to PNP4Nagios not being configured as you mentioned in the release notes.

    The specific error I’m getting is:

    Perfdata directory does not exist

    More info can be found here: http://docs.pnp4nagios.org/faq/5

    Another error I had was:

    Error: Could not add object property in file ‘/etc/nagios3/global/contacts.cfg’ on line 2.

    For this, I believe the error was resolved by creating a new admin user within Check_MK Multisite and activating the changes as the new user.

    One final issue I found was that the monitoring agents provided within Check_MK Multisite appear to be missing. Here is an example of one of the errors:

    The requested URL /check_mk/agents/windows/check_mk_agent.msi was not found on this server.

    I found a temporary workaround on this issue by going to Check_MK’s demo site and downloading the agent there.
    http://demo.mathias-kettner.de/demo/check_mk/index.py?start_url=%2Fdemo%2Fcheck_mk%2Fwato.py%3Ffolder%3D%26mode%3Ddownload_agents

    Username: demo964
    Password: demo

    • One more error I’m getting is:

      Error: Cannot connect to event daemon via /var/lib/nagios3/rw/mkeventd/status: [Errno 2] No such file or directory

      This happens when I try to activate changes within Check_MK Multisite.

      • Hi Erik,
        Thanks for all the great info. Check_MK Multisite is brand new to me. I love the output and plan to make it more of a significant aspect of NEMS as this project grows. I will review the issues you report and see about correcting them in 1.2. I had not thought of using Check_MK for management… only for reporting… so that’s why you’re seeing errors. Basically, for me to do what you’re asking would mean deprecating NConf. I really like NConf… but admittedly Check_MK is WAY more beautiful (and current). I’m not going to push hard for this with 1.1. This is a major feature reworking, and will quite possibly be on the roadmap for an upcoming version… definitely when we upgrade to Nagios 4.

  25. Hi Robbie!

    Great image, I found NEMS in the comments over on Ryans page for NagiosPi.

    This is a great image, I’m in the process of setting it up to monitor a network for a small retail chain.
    The only thing I can’t seem to figure out is setting up email alerts. Is that configurable via Nconf?  Or am I looking in the wrong place?

    • Hi Tim,
      Glad you found NEMS. I hope it serves you very well. For the email config, make sure you edit /etc/nagios3/resource.cfg – you’ll find it self explanatory and well commented. Then in NConf you will need to setup your contact groups and contact info via the menu on the left under “Additional Items”. I have yet to write documentation for this, but hope my pointing you in the right direction gets you started.

      Have fun!

      • I’ve added the settings correctly- so far as I can tell and I made sure the nagios admin contact email is set to monitering-group@domain.com to alert the correct people.
        But I’m not getting alerts when I take a couple test machines offline.

         

         

          • I’m not seeing a section for alerts, but under misccommands I see a notify-host-by-email and notify-service-by-email.

            I feel like whatever I’m missing is something simple and I’ll feel dumb when we figure it out.

          • nagiosadmin contact is set with the correct email group to notify the NOC techs.
            And the admins group contains nagiosadmin.

          • Hey Robbie,

            Just wanted to follow up, if you had any advice on where I can continue to troubleshoot my notification issue.

            We’ve pushed NEMS pretty hard we have it monitoring almost 200 endpoints now and the Check_MK dashboard is fantastic.

            Just need to get the notifications working.

            Much appreciated!

          • That’s awesome! Glad to hear NEMS is running well with ~200 endpoints.

            For your notifications issue, can you email me your backup.nems file? I’ll take a look and see if I spot anything.

            Cheers,
            Robbie

          • Tim, received the file. Because you’re using Gmail’s relay server, have you tried specifying port 587? Eg., smtp-relay.gmail.com:587

            I’d test that first, and if still no-go, I’d try using a different mailserver which you know works, just as a test.

            It’s also worth noting that a lot of your hosts do not have notifications enabled. So make sure you’re testing with one of the ones that does (eg., Timmie desktop).

            Let me know. Surely we’ll figure it out. 🙂

          • I’m sorry to say I have not yet Tim. My schedule hasn’t allowed it yet, but hoping for an evening or weekend upcoming. Ping me by email if you don’t hear from me. Thank you for your patience.

        • yeah, the endpoint Timmie is my second desktop in the office and has been my test dummy for a while.

          Looks like specifying the port didn’t resolve the issue.

          • I don’t mean Google won’t work–I just mean, to make testing easier, start by using a standard SMTP account… that way we can quickly rule out Google as the problem. If it works with standard SMTP we can then look at the Google setup and see what needs to be changed. I have had no trouble with SMTP, but I do not use Gmail’s servers to send through.

          • Neat tool, though I really wish you could just test with a proper SMTP server just to save too much needless troubleshooting. Back to gmail, try setting the host to: smtp.gmail.com:587

          • For testing purposes, I set the notification interval to 1 minute.

            I’ve also set the resource.cfg file to
            # The "from address" for notifications
            $USER5$=it@domain.com

            # The SMTP server
            $USER7$=smtp.gmail.com:587

            # the SMTP authentication username and password
            $USER9$=it@domain.com
            $USER10$=******

          • Try sending manually… SSH into NEMS and do the following:
            which sendEmail -o tls=yes -f it@domain.com -t adifferentemail@domain.com -s smtp.gmail.com:587 -xu it@domain.com -xp YOURPASSWORD -u "test test" -m "this is the message"

            Remember that gmail hides email sent to one’s self. So do not use the same email address for send/receive.

          • Hang tight; I think I found the problem in your backup.nems file! But I’m not sure how/why this would be the case. Did you edit the config files manually, or try to add a notification system other than that provided with NEMS? I won’t be able to fix this for you today since I’ll need an SSH connection to a NEMS deployment where I can emulate your environment.

          • Didn’t see an email come through after running the command.


            pi@NEMS:~ $ which sendEmail -o tls=yes -f it-list@dbsupply.com -t tseibert@dbsupply.com -s smtp.gmail.com:587 -xu it-list@dbsupply.com -xp ****** -u "test test" -m "test message"
            /usr/bin/sendEmail
            pi@NEMS:~ $

            The only config files I’ve touched manually are
            /etc/nagios3/resource.cfg
            and
            /var/www/nconf/config/file_accounts.php
            to change the default password.

            I also ran sudo htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin
            to change the default password for Nagios and Check_MK

    • Oh, I think you’d be hard-pressed to max it out… I’m not sure of any hard limits, and it all boils down to the power of the Pi 3. It is quite powerful for something like NEMS (Nagios) so I’m sure you could have several hundred endpoints before you need to consider expanding, but that’s all theory as I’ve never pressed NEMS that hard. Just keep a good backup of your MicroSD card and/or Nagios config to be safe, and please let me know how things are running if you test with more than 100 endpoints.

    • I’m monitoring a little over 200 devices (mostly just ping, but a few devices have other services being watched) and the 5-minute load average isn’t often above .3, the memory usage hangs out around 90% though.

      • Good to know, and that’s fine. Linux caches disk writes to RAM and manages it very efficiently. So you’ll see that impact the memory usage on a small device like the Pi 3, but it adjusts as needed (automatically) so you shouldn’t notice a performance hit.

  26. Hey man, Awesome image!

    I have been trying for a few hours to get a Windows service check to work on NEMS and can’t seem to figure it out using Nconf…

    I’ve setup service checks before on the Centreon front end, but I can’t seem to figure it out on Nconf! It’s driving me crazy 🙁

    Any help would be greatly appreciated!

    • Hey, thanks Brian.
      Well, where abouts are you getting hung up? I could put together some video tutorials if it would help, or if you have specific questions, please let me know. Unfortunately you didn’t give details as to the actual problem you’re encountering, so I’ll have to wait for your reply.

      Robbie

      • I am not able to setup a working Windows Service check.

        I’m not sure If i need to download additional snmp plugins for Nagios or just modify the check command in Nconf…or what the problem is exactly.

        Any possibility of you setting up a working Windows Service check on the image so we have a template to work from?

  27. Nice work…  I’m a big fan of NagiosPi on the Pi2, so when NEMS became available I tried it on my Pi3.

    I added Webmin to my active copy of NEMS, and I’m busy working on incorporating the Temperature Monitor from Raspcontrol into the Raspberry Pi Usage Graphs footer on the NEMS home page.

    If you don’t mind me asking, “what desktop Theme did you use for Nagios and where did you extract it to”? I ask this because I’d like to add a lighter theme appearance to Nagios to make it easier to read in the Status Map view.

    • Hi Hesh, glad you’re enjoying NEMS.

      The default NEMS theme in Nagios is a custom Bootstrap 3 mashup I built specifically for NEMS to help Nagios work more responsively (Nagios is a bunch of [gah] tables! — what is this, 1996?). So the theme is just a custom theme that grabs the assets (eg., images, css) from our CDN to keep the NEMS image lightweight and everything running zippy-fast.

      The theme, of course, can be replaced with whatever you like. While not directly a feature of NEMS, this is Nagios 101 🙂 /var/www/html is where the main wrappers (bootstrap, headers/footers) are installed. Nagios calls them from the theme located in /usr/share/nagios3/htdocs

      Keep a backup in case you break something. Also make sure you don’t remove or change /var/www/html/inc/ver.txt as this is how NEMS keeps track of your current version.

      Would it help if I included a lighter theme as a user-selectable option?

      Good luck!

      • the most recent NEMS [Download] link provided gives a response of….

        Error! This download item (1296) does not have any download link. Edit this item and specify a downloadable file URL for it.

        … when selected.

        Do you have an
        alternative link

        ?

        • Heh – you’re just quicker than the rest of the world. 🙂 1.1 releases in 2 hours. It’s still uploading to the server. Try again after midnight when it releases, and enjoy the new version!!

          • First of all, I give you two thumbs up for the release of NEMS 1.1. I love the added improvements found in the Changelog file.

            Sorry to bug you, but now I have a question regarding a NEMS 1.1 restore…

            I’ve completed the NEMS 1.0 to 1.1 http://www.baldnerd.com/nems-migrator-nems-1-0-to-1-1/ backup as instructed, on my NEMS 1.0 Pi3.

            Now I would like to restore the http://nems/backup/backup.nems file to my other NEMS 1.1 Pi3, however the GUI for NEMS 1.1 //Migrator / Restore feature points to http://baldnerd.com/nems-migrator-restore/

            Unfortunately http://www.baldnerd.com/nems-migrator-restore/ doesn’t explain how to complete a successful restore to the NEMS 1.1.

            When you have a moment, would you be able to supply the steps for the restoration process?

            Thanks…

          • Hey Hesh, Sorry – please read my reply below to Rick. I didn’t expect such a quick response to the release of the migrator! And unfortunately you guys are calling me on it on RELEASE DAY! Haha! I guess it means NEMS is poised to be a popular project.

            I’ll be sure to finish the migrator instructions and get “Restore” option up and running within a couple days.

          • I believe NEMS Migrator’s restore feature should now be working. Please reboot your Pi and follow the directions provided. Let me know if you encounter any issues after the restore, or if all works perfectly. I expect since we’re only 1 day into the release, there could be issues I need to address. Please work with a backup SD as you test.

  28. Stealing my image eh?!

    Haha…Nah i’m just messing with you 🙂 I’ll have to download a copy and check it out. I really like the changes you’ve made so far!

    ~Cheers,

    Ryan

      • I downloaded it a few days ago and took it for a test drive. I really like what you did 🙂

        The web interface & Nagios interface changes look much, much better. No need for any changes otherwise, just wanted to stop by and check in.

        ~Cheers

        • I appreciate that, thanks. Not sure what your plans are with NagiosPi, but if it’s dead, feel free to let people know about NEMS. I know a lot of your users are looking for Pi 3 and Jessie support (I was too, so that’s why I built NEMS – lol!)

          Keep me posted on NagiosPi either way.

          All the best.

          Robbie

  29. Hello,

    I ran NEMS on my raspberry pi 3 and the software froze upon start up. Is there any further requirements that I need to know prior to install?

  30. This is fine work. I was looking for a good monitor for my rather complex home network. I have about 20 devices including six Windows workstations that drive my weather related web site (http://www.kd4pyr.net).

    I had a Raspberry Pi 3 I was experimenting with and NEMS seemed like a good use of the hardware.

    NEMS worked perfectly and with about an hour of configuration, I had a good monitor up and running.

    Sent a donation your way, worth every cent as it saved a ton of work on my part.

    Two questions:

    Is it OK with you to link to your blog from my website’s home page with something like “Server status monitoring is done with a Raspberry Pi 3 and NEMS implementation of NAGIOS.”?
    Any chance of having a defined SMTP mail service included to provide the email alerts via an external email server?

     

    Thanks for sharing your great work.

    Rick

    • Rick-thanks so much for the high praise, I appreciate it very much. I also appreciate that you decided to support me with a contribution too–that really helps me be able to share the stuff I do, and again, it is an encouragement too.

      I’m thrilled to hear NEMS is working well for you, and it’s really cool to see what you’re using it for. One of my future projects will be setting up a Raspberry Pi weather station so I can watch the wind speeds when flying my drones. 🙂

      Regarding your questions: yes, of course, I would be very grateful for your linkback to this project, thank you. Re. Defined SMTP – how do you mean? Like have a pre-configured SMTP server? I’ve always been of the thought that the users themselves would want to configure their own services (which is also why you see a nice clean interface without a bunch of faux reports out-of-the-box). So please clarify this question for me. Perhaps, if I follow you correctly, this is more of a documentation thing than a feature thing?

      Thanks again!

      Robbie

      • 1) I have created the link from my home page back to the NEMS project page.

        2) Maybe it is just a documentation issue for me, but what I was thinking would be to include an application like SENDMAIL to make it even a little more turn key.

        Then you would only have to define the external SMTP server, port, senders email address, and authentication (if necessary). Along the lines of: http://danxlog.blogspot.com/2010/07/nagios-use-external-smtp-server-to-send.html

        It is entirely possible I could me missing something here and may need my internal documentation upgraded. If it is a documentation issue, let me know and maybe I could help create a useful document.

        • Cool, thanks for the link back to NEMS!

          Yes, sure, I can configure something so you have an out-of-the-box external SMTP solution. I’d definitely want to configure it for external SMTP because I don’t want this project to become a web server and have to support DNS and so-on. That gets too complicated for novice users, and the idea here is to simplify the deployment process.

          I’ll add external SMTP to the list for the next release, thanks.

          Robbie

  31. I tried to reach the GUI based desktop environment but I believe that it has been disabled. I want to add some plugins which are on usb an obviously i would be needing a GNU GUI for me to work easily therefor let me ask you. Is there a way I can reach to GNU GUI.

    • No, you wouldn’t use GUI for this. This is a server, not a desktop. Just plug in your USB drive, mount it, and copy the plugins you’re looking for.

      Are you familiar with Linux enough to do this? Or do you want help? I could enable samba in the next release if you think that’d help (so you can copy things over via your Windows network).

  32. Robbie,

    Great work! I am excited about the release of NEMS! I am curious if you have looked at Check_MK which is a Nagios extension. Do you have any plans of adding it to NEMS?

    Here is a nice overview of Check_MK – http://blog.unicsolution.com/2013/11/best-monitoring-solution-omd-nagios.html

    It explains how Livestatus and Livecheck allow Nagios to scale better. Also, it provides a great solution for distributed monitoring. I’m just interested to know of your thoughts on this.

    • Hi Erik,
      Yes – I’ve actually looked at several offerings that are available. I’ll tell you what I was thinking…

      Out the gate, I wanted NEMS to be essentially an “easy transition” for NagiosPi users since it has fallen uncomfortably behind the times as of late. So I wanted the first version of NEMS to be familiar enough to those users that it is not a painful transition. To be honest, it also gave me a really great starting point since Ryan did such an amazing job with NagiosPi and with his documenting the process of how he created it. You could really say NEMS 1.0 is, at its heart, really a continuation of what I think Ryan was doing with NagiosPi.

      So then, as you can see from my “to do” list, I really want to step things up with (perhaps) Nagios Core 4, and yes, definitely Check_MK will be a natural progression for NEMS.

      It will take time to get there, and I didn’t want NEMS to take a year before its first build. So this seemed like the best way to go.

      I think what might help set NEMS apart is that I hope to really improve the interface of running a Nagios server. It should be responsive, it should be easy to understand. I’ll be tapping into a lot of great open source projects, and injecting some code of my own, in hopes of making NEMS a really great go-to starting point for many enterprise users.

      PS – I thought you might like to know, I just “burned” my initial build of NEMS 1.0 to a new 8 GB Micro SD card, plugged a new Raspberry Pi 3 in, and it all booted up and within about 30 seconds I had the web interface already up and running. So, we’re good to go! The final 1.0 image just finished outputting to disk, and I’m about to start the upload.

    • Hi Erik,
      Hope NEMS 1.0 has been serving you well. I’m not sure if you noticed that I integrated Check_MK into the first release or not, but now having upgraded Check_MK to the latest version for NEMS 1.1, I thought I’d ping you and let you know the socket is at /var/lib/nagios3/rw/live.sock if you want to tap into it. I’ve been using it to power NagVis, which was also upgraded for NEMS 1.1.

      Also, as promised, NEMS 1.1 contains SMTP out of the box. You can configure your SMTP email account within /etc/nagios3/resource.cfg

      Enjoy!

      • Hey Robbie,

        Thank you for the update! I’m excited about the release of NEMS 1.1. I have to say I am very impressed with NEMS and really appreciate all the work you are doing. It was very easy to get running on my Raspberry Pi 3.

        I did not realize you integrated Check_MK on NEMS 1.0, but am optimistic to hear of the news. I don’t know anything about sockets and how to access them so I will have to do some research to learn more.

        When you say you integrated Check_MK are you saying it is possible for me to use the Check_MK interface on NEMS? I tried typing in http://IPADDRESS/check_mk and nothing came up. How can I enable this?

        Regards,

        Erik

        • Hi Erik,
          I’m glad you are finding NEMS to be easy to use: that was a big part of my goal setting out with this project. And to think, you’re only using the first release…. just wait for all that’s to come!

          I think the Check_MK site is confusing, possibly due to a language barrier. I understood Check_MK to be a “connector” of sorts… a socket… allowing other applications to access the data from Nagios in realtime. This is in fact Check_MK livestatus. It has no front-end. I realize now you are talking about Check_MK Multisite, which is a graphical front-end for the Check_MK livestatus component. So now I’m reviewing the source code (as there is no pre-built arm package) and seeing if I can make it work on NEMS. I’ll add it to the roadmap if it looks promising.

          – Update: Check_MK Multisite has been added to the roadmap for NEMS 1.1. Thanks for the suggestion.

          • That’s incredible! Thank you for such quick feedback! I have used Check_MK Multisite and am impressed with how easy it was to configure Nagios with its automatic service recognition and configuration generator.

            I look forward to seeing the implementation on NEMS 1.1. Thanks Robbie!

Leave a Reply

Your email address will not be published. Required fields are marked *