Page 1 of 1

Fresh install NRDP not showing Unconfigured Objects

Posted: Wed Jul 29, 2015 4:38 pm
by andy.krueger
My company recently purchased Nagios XI and I went to setup our first test server. Our standard linux build is RedHat 6, which I kickstarted form out satellite server. I added the REHL 6 optional repo and installed the Nagios repository per https://repo.nagios.com/
rpm -Uvh http://repo.nagios.com/nagios/6/nagios- ... noarch.rpm
yum install nagiosxi -y

Nagios XI installed and I was able to login and start using it without issue till I attempted to use passive monitoring via NRDP. When I submit a test via the http://<server_address>/nrdp/ page with the correct token I get:
Submit Nagios Command:
<result>
<status>0</status>
<message>OK</message>
</result>

Submit Check Data:
<result>
<status>0</status>
<message>OK</message>
<meta>
<output>2 checks processed.</output>
</meta>
</result>

But when I return to the Unconfigured Objects screen there are no Unconfigured Objects. I also have several clients setup and still don't have any unconfigured objects showing up....

To rule out any system configuration issue that may or may not be impacting NRDP's functionality, I downloaded a copy of the centos 6 minimal iso and did a basic install of centos in a virtual machine. I then ran thought the same install yum install process(https://repo.nagios.com/) and had the same result.....no unconfigured objects.

As I have done a vanilla install of centos in a virtualbox vm and used repo.nagios.com, I'm guessing there is something wrong with this method of installing nagios xi when it comes to NRDP.

There don't seem to be any errors in the /usr/local/nagios/var/nagios.log or /var/log/httpd/{error_log, ssl_error_log}
Also, I noticed that /usr/local/nagiosxi/var/corelog.newobjects is empty

Any suggestions would be helpful

Re: Fresh install NRDP not showiing Unconfigured Objects

Posted: Wed Jul 29, 2015 5:00 pm
by andy.krueger
Basic Information
OS: Red Hat Enterprise Linux Server release 6.7 (Santiago) 64 bit
Nagios XI version: Latest Nagios XI 2014R2.7
Installed via repo: https://repo.nagios.com/

Also saw this issue on:
OS: Centos 6.6 64 bit
Nagios XI version: Latest Nagios XI 2014R2.7
Installed via repo: https://repo.nagios.com/

Re: Fresh install NRDP not showiing Unconfigured Objects

Posted: Wed Jul 29, 2015 9:16 pm
by Box293
Can you go to Admin > System Config > Performance Settings
Subsystem tab > make sure the "Enable Listener For Unconfigured Objects" check-box is selected

Is the feedproc cron running on the XI server?

Code: Select all

ps -ef |grep feedproc
If so, are you getting any errors when tailing this log (when submitting tests):

Code: Select all

tail -f /usr/local/nagiosxi/var/feedproc.log

Re: Fresh install NRDP not showiing Unconfigured Objects

Posted: Thu Jul 30, 2015 8:03 am
by andy.krueger
Per the default the Enable Listener For Unconfigured Objects option is checked.

Code: Select all

# ps -ef | grep feedproc
nagios   22832 22820  0 07:58 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cronfeedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
nagios   22838 22832  0 07:58 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php
root     23160 23072  0 07:58 pts/0    00:00:00 grep --colour=auto feedproc

Code: Select all

tail -f /usr/local/nagiosxi/var/feedproc.log
.
PROCESSED 0 COMMANDS

tail: /usr/local/nagiosxi/var/feedproc.log: file truncated
.
PROCESSED 0 COMMANDS

Re: Fresh install NRDP not showing Unconfigured Objects

Posted: Thu Jul 30, 2015 9:10 am
by andy.krueger
If you want to test this on the same setup I have, here's what I did:
0. Create a virtualbox vm. I gave it 2GB memory, 2 cores and a 20GB HD

1. Install centos 6.664 bit from the minimal iso...nothing fancy, just enabled the networking, set an admin password and press next, next, next finish.

2. Login as root, upgrade and reboot:

Code: Select all

yum update -y && reboot
3. Once rebooted, as root install nagios xi repo and nagios xi

Code: Select all

rpm -Uvh http://repo.nagios.com/nagios/6/nagios-repo-6-2.el6.noarch.rpm
yum install nagiosxi -y
4. Reboot for good measure

5. Open in browser http://<server ip>/nagiosxi/install.php

6. Set nagiosadmin password, login and agree to EULA

7. Go to Admin-->Unconfigured Objects, click on the blue link "inbound transfer settings" in the top center paragraph

8. Set a Auth Token and click "update settings". Copy token. Click blue link, center screen: http://<server ip>/nrdp

9. Paste token in under Submit Nagios Command: and press "Submit Command". I then get:

Code: Select all

<result>
<status>0</status>
<message>OK</message>
</result>
10. Go back to http://<server ip>/nrds under Submit Check Data enter the token and press "Submit Check Data" I then get:

Code: Select all

<result>
<status>0</status>
<message>OK</message>
<meta>
<output>2 checks processed.</output>
</meta>
</result>
11. Go back to http://<server ip>/nagiosxi ....Admin-->Unconfigured Objects and no Unconfigured Objects are listed.


I have tried the same test on the nagios xi virtual machine, which I downloaded from the nagios xi website, and there should be Unconfigured Objects listed when repeating steps 5 -11 from above.

Re: Fresh install NRDP not showing Unconfigured Objects

Posted: Thu Jul 30, 2015 9:28 am
by ssax
I experienced the same issue, did you try changing the name? Looks like it doesn't work with somehost, try this:

Code: Select all

<?xml version='1.0'?> 
<checkresults>
	<checkresult type='host'>
		<hostname>somehost2</hostname>
		<state>0</state>
		<output>Everything looks okay!|perfdata</output>
	</checkresult>
	<checkresult type='service'>
		<hostname>somehost2</hostname>
		<servicename>someservice2</servicename>
		<state>1</state>
		<output>WARNING: Danger Will Robinson!|perfdata</output>
	</checkresult>
</checkresults>
Edit: It actually did show up eventually, not sure why there is a delay.

Re: Fresh install NRDP not showing Unconfigured Objects

Posted: Thu Jul 30, 2015 10:04 am
by andy.krueger
I waited a good 5+ minutes and still haven't seen anything in the unconfigured objects. I tried entering the same xml as your last post...and the following:

Code: Select all

<?xml version='1.0'?> 
<checkresults>
	<checkresult type='host'>
		<hostname>Foo</hostname>
		<state>0</state>
		<output>All Okay!|perfdata</output>
	</checkresult>
	<checkresult type='service'>
		<hostname>Foo</hostname>
		<servicename>Bar</servicename>
		<state>1</state>
		<output>WARNING: Ah Snap!|perfdata</output>
	</checkresult>
</checkresults>
Still no luck...and no errors in the logs.

I have also installed Nagios XI via the source installer in a test vm and this issue doesn't occur. That method is less preferable to our security team as it requires both epel and rpmforge repositories, where as, the nagios xi repository contains only nagios related stuff(and less firewall rules need be put in to allow repo access).

Re: Fresh install NRDP not showing Unconfigured Objects

Posted: Thu Jul 30, 2015 12:08 pm
by lmiltchev
Can you show the permissions of the checkresults directory?

Code: Select all

ll -d /usr/local/nagios/var/spool/checkresults
If the directory is not writable by group, run the following command:

Code: Select all

chmod g+w /usr/local/nagios/var/spool/checkresults
Test NRDP again and see if the unconfigured object appeared.

Re: Fresh install NRDP not showing Unconfigured Objects

Posted: Thu Jul 30, 2015 1:15 pm
by andy.krueger
That fixed my issue. I changed the file permissions to the /usr/local/nagios/var/spool/checkresults directory and ran through the same test. Now things work as expected. I also tested several nrds clients and found that it also worked as expected.

Might want to have whoever maintains the http://repo.nagios.com/ nagios repository make a slight update to fix this issue for the installer.

Thank you for you help!!

Re: Fresh install NRDP not showing Unconfigured Objects

Posted: Thu Jul 30, 2015 3:54 pm
by tmcdonald
I'll definitely make sure the devs are aware of this, and recommend an update!

I'll be closing this thread now, but feel free to open another if you need anything in the future!

Update: Next build of RPMs will be updated to include this fix.