Skip to main content
Solved

How is ldap protocol port detected?

  • Apr 18, 2023 9:46 AM UTC
  • 2 replies
  • 109 views

Forum|alt.badge.img+9

Hello,

I have changed from nagios to centreon-plugin-Applications-Protocol-Ldap to check for response time of an LDAP server.

 

The nagios plugin allowed me to specify the port, the centreon plugin doesn't using the templates available to centreon web, but seems works.

 

If I dont't specify the port when launching the command from the poller's cli, or specify the correct port like hostname:port, it works, but fails as expected if I specify a wrong port.

So, does the port is automatically used by the server to answer when the check arrives? Or does the plugin checks several ports?

 

Regards,

Enrique

Best answer by ponchoh

Hello @emeck 

 

We use https://metacpan.org/pod/Net::LDAP

as you can see here:

https://github.com/centreon/centreon-plugins/blob/develop/src/centreon/common/protocols/ldap/lib/ldap.pm#L25

 

as a result:

 

 If port was not specified in the URI, the default is either 389 or 636 for 'LDAP' and 'LDAPS' schemes respectively.

 

 

View original

2 replies

ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • Answer
  • Apr 19, 2023 9:12 PM UTC

Hello @emeck 

 

We use https://metacpan.org/pod/Net::LDAP

as you can see here:

https://github.com/centreon/centreon-plugins/blob/develop/src/centreon/common/protocols/ldap/lib/ldap.pm#L25

 

as a result:

 

 If port was not specified in the URI, the default is either 389 or 636 for 'LDAP' and 'LDAPS' schemes respectively.

 

 


Forum|alt.badge.img+9
  • Author
  • Steward ***
  • Apr 20, 2023 6:06 AM UTC

Hello ponchoh,

 

thanks for the explanation. It is working as expected then.

 

Regards,

emeck