News:

We really need your input in this questionnaire

Main Menu

Network discovery filter script

Started by AleCoelli, April 10, 2022, 10:39:42 PM

Previous topic - Next topic

AleCoelli

Hi,
this is my Network Discovery configuration:


and this is Filter::NetworkDiscovery scipt:
tracelevel=0;
trace(tracelevel, "======= Filter::NetworkDiscovery ==========");
return false;


Nodes on 192.168.150.0/24 are discovered and added to the right Zone through proxy, the script isn't runned (no log trace) and should filter all (fixed return false).

My server version is 4.0.2227

Do you have any ideas?

thanks
Alessandro

Filipp Sudanov

Hi!

Could it be so that nodes for these IP addresses are already present in the system when discovery happens? If so, the script is not executed, if that address is already added.

AleCoelli

Hi Filipp,
  The nodes are present, I delete them (as you can see in the screenshot) and after some time they appear again, without running the script

Filipp Sudanov

I'd suggest to turn off the active discovery. Then to check that discovery queue is empty (run "show queues" from Tools->Server console). After that try deleting the nodes again and retry the discovery.

AleCoelli

Same problem:
- Disabled Network discovery
- show queue as attached (0)
- Enabled Network disconvery
- Queue start to grow
- after some minutes, the nodes appear again

Filipp Sudanov

This is actually strange. The only possible reason I can think of is if runtime error happens in the script. In this case script is interpreted as if it would return true (this will be reworked in next release). But script run-time error would be visible in the log file. And your script looks to be correct.

I would increase active discovery interval to 3600 - this is to make sure that discovery processes would stop. Then try setting server debug level to 6 (hopefully it's a test environment with not too many nodes - otherwise there will be too many lines in the log). And try to run discovery scan manually - select the range and click scan. The log should have detailed information on how discovery is happening.