Solved

nmap discovery plugin timeout

  • 26 September 2022
  • 7 replies
  • 119 views

Badge +4

Hello,

I’ve tested several discovering plugins with the same subnet /23.

The snmp plugin successes, but the nmap one fails with a time out on the similar subnet (512 hosts). I reduced the subnet to /24 and it fails as well.

Is there some advices to make the scan successful? (maybe changing some default nmap options?)

icon

Best answer by sims24 26 September 2022, 17:29

View original

7 replies

Badge +4

I precise that scanning on a single /32 host is ok

Userlevel 6
Badge +19

Did you try to raise the timeout parameter value to 300? 

 

How long does it take when running it manually outside of the discovery module? 

 

I guess it could take some time yes, so if you now which port you are targetting you can modify the options to remove some ports. 

 

 

Badge +4

Given that there is no progression bar, how can I debug the event? I didn’t find any discover log anywhere.

Userlevel 6
Badge +19

In /var/log/centreon-gorgone/gorgoned.log

Badge +4

Did you try to raise the timeout parameter value to 300? 

my current timeout value is 1200, but it is the same issue.

 

How long does it take when running it manually outside of the discovery module? 

without default options:

time /usr/lib/centreon/plugins/centreon_nmap_cli.pl --mode=discovery --subnet 10.34.106.0/23 --timeout=1200

real    8m43,012s

But the same fails with timeout with UI.

The maximum I can do without failing is /25 (64 hosts)

I am not sure if the custom 1200 timeout is read

 

 

I guess it could take some time yes, so if you now which port you are targetting you can modify the options to remove some ports. 

 

 

 

Userlevel 6
Badge +19

Yes, if it’s that long, you have to also raise the global timeout at gorgoned level. 

 

Edit this file and add the global_timeout directive like below:

 

gorgone:
  modules:
    - name: autodiscovery
      package: "gorgone::modules::centreon::autodiscovery::hooks"
      global_timeout: 1800
      enable: true

 

Restart gorgoned

 

Try again with the same timeout value in your job parameters.

 

 

Badge +4

Yes, if it’s that long, you have to also raise the global timeout at gorgoned level. 

 

Edit this file and add the global_timeout directive like below:

/etc/centreon-gorgone/config.d/41-autodiscovery.yaml

gorgone:
  modules:
    - name: autodiscovery
      package: "gorgone::modules::centreon::autodiscovery::hooks"
      global_timeout: 1800
      enable: true

 

Restart gorgoned

 

Try again with the same timeout value in your job parameters.

 

 

 

Reply