LDAP Authentication

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

LDAP Authentication

Post by DOkuwa »

I use Nagios Core
I want Nagios to check if LDAP is authenticating with my other Unix servers
if it is not authenticating then create an alert or notification
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: LDAP Authentication

Post by DOkuwa »

Maybe I should explain a bit more
we just want to check if one of our remote hosts with authenticates with LDAP is working
e.g if users cannot authenticate on this server using LDAP it should sent a notification
Maybe I am more clearer
kyang

Re: LDAP Authentication

Post by kyang »

Hey @DOkuwa,

The Nagios Exchange site has a list of plugins relating to LDAP.

https://exchange.nagios.org/directory/P ... ocols/LDAP

I do see one that checks if the LDAP server is able to connect and bind.

https://exchange.nagios.org/directory/P ... ap/details

Let us know if this helps
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: LDAP Authentication

Post by DOkuwa »

THANKS
i am have a server which authenticates users with LDAP Server and we had situations were the lDAP have gone down and users could not authenticates into the server we did not know that the LDAP server has gone down .
I also know that the LDAP server do write some info as a log file on this server.
Maybe we should just ping the LDAP server and sent an alert if it cant ping or alternatively create a dummy account and use this account to login at intervals with a cron job and then if it can't log in sent an alert .
Don't know please help
kyang

Re: LDAP Authentication

Post by kyang »

Relating back to my last post, I should have mentioned that the check_ldap.pl plugin is already in Nagios Plugins. You will be able to find it in your plugin directory.

Code: Select all

usr/local/nagios/libexec/check_ldap.pl
I have set up separate OpenLDAP server and have used the check_ldap.pl to check whether or not my LDAP server is up. Here's an example and the output

Code: Select all

[root@centos7x64 libexec]# ./check_ldap.pl -H 192.168.x.xxx -p 389
OK
Using it as an authentication would mean you can pass the -l <login> and -x <password>

Code: Select all

[root@centos7x64 libexec]# ./check_ldap.pl -H 192.168.x.xxx -l <your login> -x <your password> -p 389
The ideal way of doing this is to set up a Host in Nagios to ping the server, and then create a service check using the check_ldap.pl plugin.

Let us know if this helps!
Locked