Solved

How is ldap protocol port detected?

  • 18 April 2023
  • 2 replies
  • 53 views

Userlevel 1
Badge +5

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

icon

Best answer by ponchoh 19 April 2023, 23:12

View original

2 replies

Userlevel 4
Badge +13

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.

 

 

Userlevel 1
Badge +5

Hello ponchoh,

 

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

 

Regards,

emeck

Reply