Page 1 of 1

Auto Discovery Issue

Posted: Fri Oct 23, 2015 3:57 am
by kpascoe
OS : RHEL 6.5 X86_64
Nagios Version : Nagios 5.2.0 (Manual Install)

The auto-discovery wizard is no longer detecting services when new hosts are discovered, if excluded IPs are used

This is due to the nmap command having two -exclude options set

Example

Scanning range 192.168.1.0/24 and excluding the ips 192.168.1.50 and 192.168.1.51 results in a nmap command of the following

Code: Select all

/usr/bin/nmap -O -oX /usr/local/nagiosxi/tmp/nmapR4yupk  -F
--min-parallelism 20 --exclude "192.168.1.50,192.168.1.51" --exclude
"192.168.1.50 192.168.1.51"
Which results in the error message

Code: Select all

Invalid character in host specification.  Note in particular that square brackets [] are no longer allowed.  They were redundant and can simply be removed.
Removing the extra -exclude option fixes the problem

Also, removing the excluded IPs from the autodiscovery job will fix the issue

Could we please get a patch to fix this as we scan a number of ranges with excluded ips on a daily basis

Also, i am a NagiosXI customer and have requested access to the customer group. Could this request be actioned please.

Regards

Kevin Pascoe

Re: Auto Discovery Issue

Posted: Fri Oct 23, 2015 12:16 pm
by lmiltchev
We will have to do some more digging into this. I and a co-worker were able to somewhat recreate the issue. During our tests, we found out that:

1. The two "exclude" options are used in the command:

Code: Select all

--exclude IP1,IP2 --exclude IP1 IP2
2. The IPs that were supposed to be excluded were NOT excluded

3. We could see the services just fine, when running the auto-discovery configuration wizard.

What is the version of the "Auto-Discovery" component and the "Auto-Discovery" wizard that you are currently using?

Admin->Manage Components
Admin->Manage Config Wizards

What is the version of nmap?

Code: Select all

nmap -V

Re: Auto Discovery Issue

Posted: Wed Oct 28, 2015 6:01 am
by kpascoe
Sorry for the delay

Auto-Discovery component is version 2.2.1
Auto-Discovery wizard is version 1.4.0

Nmap version is version 5.51

Re: Auto Discovery Issue

Posted: Wed Oct 28, 2015 6:24 am
by kpascoe
Just upgraded nmap to latest version and now everything is working just fine.

Regards

Kevin

Re: Auto Discovery Issue

Posted: Wed Oct 28, 2015 9:43 am
by tmcdonald
Good to hear!

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