Nagios passive checks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
neo_infraestructura
Posts: 61
Joined: Wed Jan 17, 2018 3:55 pm

Nagios passive checks

Post by neo_infraestructura »

Hi Nagios team,

I'm working with two Nagios (one of them is only for background but I keep its configurations update) and I'm trying to make them work with passive checks. I'm following this guide: https://assets.nagios.com/downloads/ncp ... Checks.pdf and I'm having trouble with the NRDP. According to the guide, if I have NagiosXI I should see the information following the link like the image:
nagios1.png
But in One of the Nagios devices I get this message:
nagios2.png
And in the other, I tried to install the NRDP for Nagios Core despite having NagiosXI, and initially worked, but now I get error 500 and I don't know what changed.
nagios3.png
What is the correct way to make it work?
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios passive checks

Post by npolovenko »

Hi,@neo_infraestructura. Are you using a firewall by any chance?
Can you show me the contents of this file?

Code: Select all

cat /etc/httpd/conf.d/nrdp.conf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
neo_infraestructura
Posts: 61
Joined: Wed Jan 17, 2018 3:55 pm

Re: Nagios passive checks

Post by neo_infraestructura »

In the first one (the one with permission deny

Code: Select all

[root@NEO-MNG-NAG-TIC nagios]# cat /etc/httpd/conf.d/nrdp.conf
<Directory "/usr/local/nrdp">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
#   AuthName "NRDP"
#   AuthType Basic
#   AuthUserFile /usr/local/nrdp/htpasswd.users
#  Require valid-user
</Directory>

Alias /nrdp "/usr/local/nrdp/server"
In the second one with error 500:

Code: Select all

[root@NEO-MNG-NAG-QA ~]# cat /etc/httpd/conf.d/nrdp.conf
Alias /nrdp "/usr/local/nrdp/server"

<Directory "/usr/local/nrdp">
#  SSLRequireSSL
   Options None
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require all granted
#        Require host 127.0.0.1
#        AuthName "NRDP"
#        AuthType Basic
#        AuthUserFile /usr/local/nrdp/htpasswd.users
#        Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      Order allow,deny
      Allow from all
#     Order deny,allow
#     Deny from all
#     Allow from 127.0.0.1
#     AuthName "NRDP"
#     AuthType Basic
#     AuthUserFile /usr/local/nrdp/htpasswd.users
#     Require valid-user
   </IfVersion>
</Directory>
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios passive checks

Post by npolovenko »

@neo_infraestructura , Please make a backup of your /etc/httpd/conf.d/nrdp.conf file and replace it with the following configs:

Code: Select all

<Directory "/usr/local/nrdp">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
#   AuthName "NRDP"
#   AuthType Basic
#   AuthUserFile /usr/local/nrdp/htpasswd.users
#  Require valid-user
   Require all granted
</Directory>
Then run:

Code: Select all

service httpd restart
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
neo_infraestructura
Posts: 61
Joined: Wed Jan 17, 2018 3:55 pm

Re: Nagios passive checks

Post by neo_infraestructura »

In the first one the change worked. But in the second one it doesn't respond, and if I try to enter directly to de url http://10.13.0.229/nrdp/ it shows this message:
nagios1.png
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios passive checks

Post by npolovenko »

@neo_infraestructura, On the second server at the top of the file add:

Code: Select all

Alias /nrdp "/usr/local/nrdp/server"
Then restart all services again.
If that doesn't work please show the output of:

Code: Select all

ls -l /usr/local/
On the second server, of course.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
neo_infraestructura
Posts: 61
Joined: Wed Jan 17, 2018 3:55 pm

Re: Nagios passive checks

Post by neo_infraestructura »

Now it shows me the HTTP ERROR 500 again...

Code: Select all

[root@NEO-MNG-NAG-QA ~]# ls -l /usr/local/
total 20
drwxr-xr-x.  2 root   root     92 Apr 11 01:59 bin
drwxr-xr-x.  2 root   root      6 Apr 11 01:59 etc
drwxr-xr-x.  2 root   root      6 Apr 11 01:59 games
drwxr-xr-x.  2 root   root      6 Apr 11 01:59 include
drwxr-xr-x.  3 root   root     19 Apr 11 01:59 lib
drwxr-xr-x.  3 root   root     18 Apr 11 01:59 lib64
drwxr-xr-x.  2 root   root      6 Apr 11 01:59 libexec
drwxr-xr-x  13 root   root   4096 Apr  8 08:56 nagios
drwxr-xr-x.  6 root   root   4096 Aug 13  2017 nagiosmobile
drwxr-xr-x  10 nagios nagios   94 Oct 21  2015 nagiosxi
drwxr-xr-x   5 apache apache   65 Oct 21  2015 nagvis
drwxr-xr-x   7 nagios nagios 4096 May  7 17:47 ncpa
drwxr-xr-x   7 nagios nagios 4096 May  3 12:53 nrdp
drwxr-xr-x.  4 root   root     28 Aug 13  2017 nsis
drwxr-xr-x.  2 root   root      6 Apr 11 01:59 sbin
drwxr-xr-x.  6 root   root     58 Apr 11 01:59 share
drwxr-xr-x.  2 root   root      6 Apr 11 01:59 src
neo_infraestructura
Posts: 61
Joined: Wed Jan 17, 2018 3:55 pm

Re: Nagios passive checks

Post by neo_infraestructura »

?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios passive checks

Post by scottwilkerson »

please show the output of the following

Code: Select all

grep nrdp /var/log/httpd/error_log |head -20
Also, have you configured this server for SSL at all?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
neo_infraestructura
Posts: 61
Joined: Wed Jan 17, 2018 3:55 pm

Re: Nagios passive checks

Post by neo_infraestructura »

the output:

Code: Select all

[Tue May 22 10:48:19.546585 2018] [:error] [pid 14354] [client 10.7.0.71:51316] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Tue May 22 10:50:46.119264 2018] [:error] [pid 4536] [client 10.7.0.71:51419] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Tue May 22 17:09:00.012076 2018] [:error] [pid 30696] [client 10.7.0.215:60493] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15, referer: http://10.13.0.229/nagiosxi/admin/dtinbound.php
[Tue May 22 17:09:22.609351 2018] [:error] [pid 29436] [client 10.7.0.215:60503] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15, referer: http://10.13.0.229/nagiosxi/admin/dtinbound.php
[Tue May 22 17:09:25.868230 2018] [:error] [pid 20516] [client 10.7.0.215:60506] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Tue May 22 17:10:15.631664 2018] [:error] [pid 6030] [client 10.7.0.215:60526] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15, referer: http://10.13.0.229/nagiosxi/admin/
[Wed May 23 16:25:24.176226 2018] [:error] [pid 15844] [client 10.7.0.215:62350] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15, referer: http://10.13.0.229/nagiosxi/admin/dtinbound.php
[Wed May 23 16:26:34.903726 2018] [:error] [pid 2202] [client 10.7.0.71:52573] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Wed May 23 16:27:13.479398 2018] [:error] [pid 17486] [client 10.7.0.71:52651] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Wed May 23 16:27:17.001250 2018] [:error] [pid 10140] [client 10.7.0.71:52650] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Wed May 23 16:27:19.135735 2018] [:error] [pid 27928] [client 10.7.0.71:52662] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Wed May 23 16:27:21.224170 2018] [:error] [pid 5958] [client 10.7.0.71:52661] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Wed May 23 16:27:23.377315 2018] [:error] [pid 28553] [client 10.7.0.71:52649] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Wed May 23 16:28:01.819386 2018] [:error] [pid 24766] [client 10.7.0.71:52686] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Wed May 23 16:32:46.739340 2018] [:error] [pid 4786] [client 10.7.0.71:52874] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Wed May 23 16:33:17.055462 2018] [:error] [pid 10868] [client 10.13.0.50:50585] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Wed May 23 16:50:47.292736 2018] [:error] [pid 2503] [client 10.7.0.215:63369] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
[Wed May 23 17:00:51.256249 2018] [:error] [pid 15478] [client 10.7.0.71:53992] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15, referer: http://10.13.0.229/nagiosxi/admin/dtinbound.php
[Wed May 23 17:00:51.259091 2018] [:error] [pid 14949] [client 10.7.0.71:53996] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15, referer: http://10.13.0.229/nagiosxi/admin/dtinbound.php
[Wed May 23 17:04:18.709153 2018] [:error] [pid 19317] [client 10.3.2.26:40938] PHP Parse error:  syntax error, unexpected ')' in /usr/local/nrdp/server/config.inc.php on line 15
And yes, we ahve configured ssl only for this server, following https://assets.nagios.com/downloads/nag ... 1514908001
Locked