Nagios Core 4.x support?

Information and discussions relating to the Nagios Mobile addon.

Nagios Core 4.x support?

Postby noodles » Thu Mar 27, 2014 4:00 pm

Are there any plans to support Nagios Core 4.x? I tried this on my 4.0.4 install on the off chance it would work, but I'm getting no data and the "PHP Warning: Variable passed to each() is not an array or object in /usr/local/nagiosmobile/includes/functions.inc.php on line 187" error. I've got all of the paths to the files listed in include.inc.php correct, everything is owned by nagios, and nagios is in the apache group (and vise versa). At this point, I'm assuming that the file formats have changed from 3.x to 4.x, and it just won't work.
Dave Evans
Operations Lead
Operational Research Consultants
noodles
 
Posts: 3
Joined: Thu Mar 27, 2014 3:55 pm
Location: Fairfax, VA

Re: Nagios Core 4.x support?

Postby tmcdonald » Thu Mar 27, 2014 4:04 pm

It looks like you are not the only person to have this issue: viewtopic.php?f=21&t=25707

I personally don't know of any plans right now since Nagios Mobile doesn't have a huge userbase, but I can certainly ask around and get back to you.
Former Nagios employee
tmcdonald
 
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios Core 4.x support?

Postby noodles » Thu Mar 27, 2014 4:16 pm

Yeah, I've been noticing that a lot of add-ons don't have 4.x support, and was assuming that was due to lack of interest. We use certificate-based authentication, and I thought that might be breaking it, so I stood up a 3.x test server. Worked perfectly, so it's definitely file format changed in 4.x. I've been using Nagios for over a decade, so I've gotten pretty adept at compiling, installing, and configuring it, so I took a shot on the off chance I could make it work.

I definitely want to find a usable WAP site that allows my team to acknowledge/disable/enable alerts with their phones. It can be done on the Exfoliation skin, but it's a total pain, and I don't want to drop to a bare-bones skins for everything just for the sake of phones :|
Dave Evans
Operations Lead
Operational Research Consultants
noodles
 
Posts: 3
Joined: Thu Mar 27, 2014 3:55 pm
Location: Fairfax, VA

Re: Nagios Core 4.x support?

Postby noodles » Thu Mar 27, 2014 4:28 pm

Just tried hard-coding the user, and that fixed it. Ugh.

So, does Nagios Mobile not get along with fake basic auth? Here is a redacted version of my nagiosmobile.conf:

Code: Select all
Alias /nagiosmobile "/usr/local/nagiosmobile"

<Directory "/usr/local/nagiosmobile">
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
   SSLRequireSSL
   SSLVerifyClient require
   SSLOptions +StrictRequire +FakeBasicAuth +ExportCertData
   SSLRequire \
     (%{SSL_CLIENT_M_SERIAL} eq "xxx" and %{SSL_CLIENT_I_DN} eq "/C=US/O=xxx/OU=xxx/OU=xxx/CN=xxx") or \
     (%{SSL_CLIENT_M_SERIAL} eq "xxx" and %{SSL_CLIENT_I_DN} eq "/C=US/O=xxx/OU=xxx/OU=xxx/CN=xxx") or \
     (%{SSL_CLIENT_M_SERIAL} eq "xxx" and %{SSL_CLIENT_I_DN} eq "/C=US/O=xxx/OU=xxx/OU=xxx/CN=xxx")
   AuthName "Nagios Access"
   AuthType Basic
   Require valid-user
   AuthBasicProvider file
   AuthUserFile /usr/local/nagios/etc/htaccess
</Directory>


Here is the redacted htaccess file:
Code: Select all
/C=US/O=xxx/OU=xxx/OU=xxx/OU=xxx/CN=xxx:xxj31ZMTZzkVA
/C=US/O=xxx/OU=xxx/OU=xxx/OU=xxx/CN=xxx:xxj31ZMTZzkVA


This is literally a cut and past from my nagios.conf file, which works perfectly. It will show me logged in as the CN string from my cert. Following the authorization chain, you'll see that it checks the serial number and issuing authority of the cert against the list, and then Fake Basic Auth passes it along to the htaccess file, which then passes the CN string to Nagios, which uses that to set user permissions. So, I guess I shouldn't be surprised that Nagios Mobile doesn't work. :lol:

Maybe the thread title needs to be changed. Or do you think I should start a new thread? When I quick stood up the 3.x instance for testing, I just used username/password for auth.
Dave Evans
Operations Lead
Operational Research Consultants
noodles
 
Posts: 3
Joined: Thu Mar 27, 2014 3:55 pm
Location: Fairfax, VA

Re: Nagios Core 4.x support?

Postby slansing » Fri Mar 28, 2014 11:42 am

Hmm very interesting, well at least this can be used for a resolution in the meantime, thanks for posting this noodles!
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...


Return to Nagios Mobile

Who is online

Users browsing this forum: No registered users and 2 guests