AdagiosPi – Server Monitoring On The Pi Just Got A Little More Awesome…

If you frequent EDT, you may know that I kind of have a thing for server monitoring 🙂 Asides from good backups, It is one of the most important aspects of any good IT environment. Today I’d like to share with you an image I’ve been working on for awhile now, AdagiosPi! For anyone not familiar with Adagios, It is one of the very best free interfaces for the very popular open source server monitoring engine – Nagios. Again – for anyone not familiar with it’s awesomeness and list of new features it brings to the table – I encourage you to check out their live demo page to explore.

Adagios is unique in that it offers users the ability to automate processes that were previously only available via paid platforms ( and has a killer GUI!). Most notably:

  • Push NSclient++ to servers
  • Network Scan to add servers auto-magically
  • Nagios interface built in
  • & many more killer features

It is still actively developed – so fair warning that some things may not be quite up to par. But in my experience it is still miles ahead of the competition. ~Enjoy!

 

Download AdagiosPi:

You can download v1.2 of AdagiosPi  HERE.

This slideshow requires JavaScript.

**Try it before you download @ The Adagios Demo Page.

Installing AdagiosPi:

  1. Download Win32DiskImager
  2. Write image to SD Card. (4gb+)
  3. After initial Boot-up, Run “Sudo raspi-config” to expand the file system.

About The Image:

  • SSH = pi/raspberry
  • Overclocked to “Medium” Setting
  • Adagios: adagios/adagiosadmin
  • Nagios: nagios/nagiosadmin
  • Web Pages:
    • http://Rasp_IP_address/adagios
    • http://Rasp_IP_address/nagios3

Detailed Build Instructions:


In case you were curious….

Below I’ve broken up exactly what was done to create the image, step by step.

[learn_more caption=”Installing Pre-reqs”]

Get Up To Date:

 

Install Remaining Pre-Reqs:

 

Installing Pynag

 

Install Django 1.4

[/learn_more][learn_more caption=”Installing & Configuring Samba”]

In this section – I wanted to give us Samba access to the Pi, specifically to the /tmp directory for setting up Django later. You can of course, change the directory shared if you wish.

Now we need to edit our samba.conf file and create our share for the /tmp directory.

 

*For more Details – Checkout my Post covering Samba HERE.

[/learn_more][learn_more caption=”Installing & Configuring Adagios”]

Install & Configure Adagios:

Get the latest copy of Adagios:

Create a configuration directory for adagios and edit paths:

Enable mk-livestatus broker_module and restart nagios to load new configuration:

Configure Apache to load Adagios in wsgi:

Create your user, replace adagios with your username and securepassword with a randomly generated, secure password:

Restart Apache:

 

After Apache has restarted go to: http://your_ip_address/adagios  to test the install and make sure everything is working properly! (Note: I used adagios / adagiosadmin for user/pass)

[/learn_more][learn_more caption=”Installing & Configuring OKconfig”]

Install OKConfig:

This documentation is identical to what is listed in the Adagios Install from source docs, but I will list it here anyways….

 

Once installed restart Apache in order to load all the new modules:

[/learn_more][learn_more caption=”Finalizing Install / Fixing Permissions”]

Finalizing Install:

Once inside the Settings pane, replace the following fields for the provided values:

Once completed, click save and proceed to create the adagios folder for objects

And to conclude, restart the Apache server as well as Nagios

 

Fixing folder structure / permissions:

Now give the adagios & nagios user access:

In order to allow Adagios to reload the Nagios service – We have to create the following:

 

[/learn_more][learn_more caption=”Resources”]

Resources:

[/learn_more]

Image Change Log:

AdagiosPi – v1.0

  • Installed & Configured Nagios, Adagios & okconfig
  • Setup Samba Share
  • Set hostname to “AdagiosPi”
  • Currently looking for testers!

AdagiosPi – v1.1

  • Fixed Sudoers file
  • Fixed Nagios/Adagios permissions

AdagiosPi – v1.2(Brainstorming)

  • Fix Adagios user permissions
  • Install Nagvis
  • Install RaspControl
  • Rebuild with Nginx
  • ????

**Requests for feature updates and new versions will be based on demand/interest in AdagiosPi!


 

Also be sure to check out my other server monitoring posts!

~Enjoy

 

  • Brendon Kozlowski

    I can’t seem to make any changes to the configurations. This could very well be my naïveté in regard to Nagios/Adagios too though. It also reported that configs have changed and I need to reload for changes to take effect, but I believe a GIT error is preventing me from doing so (not a GIT repository), but when trying to generate the repo I get an additional error:

    PynagError: Command ‘git init’ returned exit status 1.
    stdout:
    stderr: /etc/nagios3/.git: Permission denied

    Current user: nagios

    I disabled the githandler option in Adagios settings but it didn’t seem to make a difference (though it did save that change).

    • Brendon Kozlowski

      Any thoughts on direction, or does it sound like it’d be easier to simply follow your own build instructions on my own Pi?

      • Hmm… intersting. I thought I had sorted out all the permission issues. Can you walk me through what you were doing so I can try to re-create the issue?

        I’ll boot up the image and start troubleshooting….

        • Just booted it up and added a host via OKconfig and didn’t have any issues.

          Please let me know what you were doing exactly so I can try to re-create and get this resolved!

          ~Cheers

          • Brendon Kozlowski

            After you mentioned using OKConfig and having no issues I tried removing all of the service watchers first, and then attempted to remove FreeNAS as a host from Adagios’ configure page’s “Host” tab view. This seemed to work even though removing the host presents a checkbox to remove the host and watchers, so it’s possible it’s an Adagios-specific issue (where attempting to delete prior to removing the watchers seemed to generate an error). Now that I’ve tried that I can’t really reproduce what doesn’t exist. I don’t have a compatible SD-card reader here so I’ll have to reload the image later this evening and reproduce the issues I was experiencing.

            • Harm-Jan ter Harmsel

              I’ve just dowloaded AdagiosPI, for some reason I’ve never found it before. I tried building my own installation for adagios with nagios3 and had some difficulties, so this is quite a nice solution. I did run into the fact that I wasn’t able to delete the freenas object from the inventory because of ‘Not a git repository (or any of the parent directories): .git adagios’.

              apt-get install acl
              cd /etc/nagios3/
              git init
              git add .
              git commit -a -m “Initial commit”

              chown -R nagios /etc/nagios3/* /etc/nagios3/.git
              setfacl -R -m group:nagios:rwx /etc/nagios3/
              setfacl -R -m d:group:nagios:rwx /etc/nagios3/

              • Thanks for the heads up!

                The command line instructions you shared – does that fix the git error for you then?

              • Harm-Jan ter Harmsel

                For me it did fix the error about not being a git repository. After creating the git repository I was able to remove the FreeNAS object and change some other settings (I thought I tried to create an additional command, but I’m not entirely sure).

                The mentioned commands need root access, so you might need to sudo them when logged in as the default ‘pi’ user.

        • Brendon Kozlowski

          Okay. Re-imaged. Login. Expanded filesystem and rebooted.

          Navigate and login to http:///adagios – dashboard loads.

          Notification pops up: “Configs have changed. You need to reload for changes to take effect.”
          [NOTE: Not sure what/how to reload here. My naivete for Nagios/Adagios shows here.]
          [EDIT: Found the reload. Successfully reloaded, but didn’t make a difference with the issues shown below.]

          Unhandled Service problems: check “All”. Click on “Delete” (trashcan) button. Navigated to delete verification page. Check the box “Yes, I am sure” and click “Delete them” button. Get the following error message:

          “Oh no, something went wrong
          So! Seems like your configuration directory is not a git repository but Adagios was configured to that it uses git.

          EventHandlerError: fatal: Not a git repository (or any of the parent directories): .git”

          …ok, so go in to adagios settings. Uncheck “Enable githandler” and save. Tried deleting the Unhandled Service Problems again. Same error message as above.

          These were the problems I was experiencing prior to attempting to using Okconfig to remove all of the watchers/hosts. The same errors seem to appear when trying to remove a host from the Hosts view page.

          • Brendon Kozlowski

            Seems to be a problem with the Git repository. Perhaps the repository location?

            If I uncheck “Enable githandler” and then physically reboot the RasPi (didn’t do that earlier), Adagios seems to respond to my change requests just fine.

            • Thanks for the feedback Brendon – I’ll spin up the image and take a 2nd look.

              • Brendon Kozlowski

                Thanks for taking a look (when you get a chance). I’m trying to figure things out on my own as best as possible, there’s just quite a bit to look at for someone who hasn’t used Nagios before.

                While you’re booting it up, could you also check if Pnp4Nagios is working for you too? I’m running the new Pi B+ model, so I’m not sure if it makes a difference or not.

              • Will do Brendon – I’ve been busy working on my other image lately: PressPi – http://everyday-tech.com/wordpresspi-wordpress-web-server-image-on-raspberry-pi/

                Will get to this soon though!

  • Harm-Jan ter Harmsel

    I’ve just dowloaded AdagiosPI, for some reason I’ve never found it before. I tried building my own installation for adagios with nagios3 and had some difficulties, so this is quite a nice solution. I did run into the fact that I wasn’t able to delete the freenas object from the inventory because of ‘Not a git repository (or any of the parent directories): .git adagios’.

    apt-get install acl
    cd /etc/nagios3/
    git init
    git add .
    git commit -a -m “Initial commit”

    chown -R nagios /etc/nagios3/* /etc/nagios3/.git
    setfacl -R -m group:nagios:rwx /etc/nagios3/
    setfacl -R -m d:group:nagios:rwx /etc/nagios3/

  • Predalon

    Hello is it possible to run adagios on Odroid U3 without changes?

    • I’m sure it would be possible to get Adagios running using the build instructions detailed above as a guide ( plus their github page! ) – However i’m not entirely sure I understand the question… Are you asking if the image can be used on the Odroid right out of the box?

      If that’s the case – then probably not… It would require the same arm type architecture and most likely require adding additional drivers for the Odrioid hardware. To be honest I really couldn’t say as I don’t own one to really test it.

      Best of luck~

  • Giacomo

    I have no graphs on AdagiosPI. Selecting “Graphs” it returns this error: ”
    We got an error while trying to talk with PNP4nagios: No JSON object could be decoded”.

    • rootninja

      Were you able to find the fix for this? I’ve combed over my pnp4nagios config and it looks good but still getting the error message.

  • Stefan

    Hey Ryan,

    nice work. Eveverything is working perfect, except for the one thing Giacomo mentioned. I’m getting the same error when I try to view a graph.

    And a request for v1.3: Update OS to latest version, so it can run on a Pi 2. Simple task, just run apt-get dist-upgrade 😉

    Regards Stefan

    • Sorry i’ve been away from the site for awhile – Thanks for confirming the issue that Giacomo was having, I’ll have to see if I can sort that out in the next version, although to be honest I’m fairly busy with new projects so i’m not sure when that will get released.

      But thanks for the update about the run command – I had no idea!

      ~Cheers

    • Just an FYI – Updated OS for AdagiosPi, will upload to G-drive tonight 🙂

      Regarding the graphs, I’ll try to look into this issue as well. Still having some difficulty getting okconfig to push Windows Agents….: https://github.com/opinkerfi/adagios/issues/212

      I think this might be the last version for awhile though – I’ll update the image if anyone would like to report bugs + fixes here. Otherwise I probably won’t be re-visiting the project any time soon!
      ~Cheers

  • Robin

    Thanks for the efforts to put this together.

    I have used Okconfig to install an agent on a centos server that I will be monitoring. ping and ssh check come bak ok bu none of the other services. It appears that check_nrpe is missing.

    Whats the best fix for this?

    • I’ll have to see if I can re-create the issue next time I spin the image up 🙂 Our firm decided to use a different monitoring solution so I haven’t really looked into Adagios in awhile – but I’ll try to find some time “soon-ish”.

      ~Cheers

  • Fuzsin

    Thanks for the build Ryan! In my installation (v2.0) the Nagios user name was identical to the password: nagoisadmin/nagoisadmin.

    • Thanks for the heads up Fuzsin – sorry about that!

  • Paul Vincent Pua

    Hi, I am currently in the finalizing install… how could I go to Settings pane. I am almost illiterate in this OS.

  • Is it possible to setup SMS notifications or email notifications when something goes down?

  • Jacob Tennant

    The download for the AdagiosPi fails to extract properly. Can you please look into this?

  • Francisco Pedreira

    a live demo page está em baixo 🙁

  • Enrique Piñero

    When i start monitoring a windows client, each service says “return code of 127 is out of bounds, plugin may be missing”. Any ideas?

  • Paulo Relogio

    i think this project died…. pity….i liked it…

Pin It on Pinterest