vADC Docs

LDAP Health Monitor

by fmemon on ‎07-02-2012 01:42 PM (4,854 Views)

A great feature of the Stingray Traffic Manager is the ability to upload External Program Monitors.  An External Program Monitor is a custom health monitor that can be written to monitor any service.  An External Program Monitor for LDAP is available here.   To use it first install ldapsearch onto the Stingray Traffic Manager:


  • apt-get install ldap-utils (For Ubuntu based distros)

The key is to install ldap-utils.  Once that is installed, upload and install the monitor:


  1. In the Stingray web interface navigate to Catalogs -> Extra Files -> Monitor Programs.  Upload ldap.pl (in the ldap.zip file)
  2. Navigate to Catalogs -> Monitors.  Scroll down to Create new monitor.  Give it a name and select External program monitor as the type.
  3. Select ldap.pl from the drop down menu that appears.
  4. Scroll down to program arguments and create four arguments: base, filter, pass, user.  It should look like the below screenshot:
    ldap screenshot 2.jpg
  5. Fill in the fields appropriately: base is your LDAP search base, user and pass are your LDAP login credentials, and filter should be set to the CN associated with user.  For the pass field, Stingray does not automatically insert asterisks, so please be aware of that.
  6. Attach the monitor to the appropriate pool.


That completes the configuration of the LDAP Health Monitor for the Stingray Traffic Manager.


Note: If you are using the virtual appliance, then follow the instructions in this KB article instead.

Comments
by william.soderberg
on ‎01-09-2013 02:16 AM

There's no attached script.

by fmemon
on ‎01-23-2013 11:15 AM

Hi William,

Updated the article with a link to the script.

Faisal

by thefoxlux
on ‎03-16-2013 12:38 AM

Hello,

I am running the version 9.0r2 and I am doing this apt-get install ldap-utils I have got an error:

E: Couldn't find package ldap-utils

Do you have any idea?

Thanks

by fmemon
on ‎03-18-2013 11:31 AM

Hi Chris,

Are you running the virtual applicance?  Did you do steps 1-3 for making those two directories and doing an apt-get update?  If you don't then that error will show up.

Faisal

by thefoxlux
on ‎03-19-2013 01:36 AM

Hello Faisal,

Yes i am running the virtual appliance and Yes I did complete the steps 1-3

even if the two directories were already existing

Is it possible that in 9.0r3 the ldap-utils are already factored in?

Thanks for the quick response

Christophe Humbert

IT Program Manager

CoProcess S.A

+352 691 391 974

+33 6 50 09 48 88

Skype: chris.e.humbert

by jbrezniak
on ‎03-19-2013 11:27 AM

Not working for us either with the same issue...says package is not found..please help!

by jbrezniak
on ‎03-19-2013 11:54 AM

We noticed the sources.list file is empty which means there are no repositories listed.  we copied sources.list-setup to sources.list and ran apt-get update and got the following:

GIS-LAB-LB01:/# apt-get update

Get:1 http://security.ubuntu.com hardy-security Release.gpg [198B]

Ign http://security.ubuntu.com hardy-security/main Translation-en_US

Ign http://security.ubuntu.com hardy-security/universe Translation-en_US

Ign http://security.ubuntu.com hardy-security/multiverse Translation-en_US

Get:2 http://security.ubuntu.com hardy-security Release [65.9kB]

Ign http://security.ubuntu.com hardy-security Release

Hit http://security.ubuntu.com hardy-security/main Packages

Hit http://security.ubuntu.com hardy-security/main Sources

Hit http://security.ubuntu.com hardy-security/universe Packages

Hit http://security.ubuntu.com hardy-security/universe Sources

Hit http://security.ubuntu.com hardy-security/multiverse Packages

Hit http://security.ubuntu.com hardy-security/multiverse Sources

Fetched 66.1kB in 1s (57.0kB/s)

Reading package lists... Done

W: GPG error: http://security.ubuntu.com hardy-security Release: Could not execute '/usr/bin/gpgv' to verify signature (is gnupg installed?)

W: You may want to run apt-get update to correct these problems

by fmemon
on ‎03-19-2013 12:28 PM

Apologies, I was a missing a step.  The missing step is to copy sources.list to /etc/apt/sources.list.  If you download the ldap.zip file its in there.  This adds the missing repo.  Then do all the steps and it should work ok.  I've updated the article as well.

Faisal

by jbrezniak
on ‎03-19-2013 12:59 PM

Hi Faisal,

Thanks that worked!  Unfortunately my peer and I are Linux novices..:)

by fmemon
on ‎03-19-2013 01:09 PM

Glad to hear its working for you. 

by thefoxlux
on ‎03-22-2013 08:40 AM

Hello Faisal

I have this error Monitor has detected a failure in node 'XXXXX:50010': Failed to run /opt/zeus/zxtm/conf/scripts/ldap.pl --ipaddr=XXXX --port=50010 --node=XXXXX "--username=yyy" "--filter=cn=christophe.humbert" "--port=50010" "--password=toto" "--Base=OU=AGDUsers,DC=AGD,DC=AGN" --failures_left=1: No such file or directory

I have changed the user and password above...Do you have any idea Thanks

by thefoxlux
on ‎03-22-2013 08:43 AM

By the way if i am running by hand the ldapsearch request it is working and returning the list of the attributes

by fmemon
on ‎03-22-2013 10:47 AM

I uploaded a new LDAP External Program Monitor for Stingray.  The previous had a bunch of ^M characters because I edited it on Windows.  Delete the previous ldap.pl and use the new one.  Hope it works this time.

Faisal

by thefoxlux
on ‎03-25-2013 06:49 AM

Hello Faisal,

it works...after some struggle...because of the password has some special characters...and maybe the best would also to update the tutorial with the possibility to precise the port with creating the port argument.

Thanks a lot

Christophe

by fmemon
on ‎03-25-2013 11:18 AM

Christophe,

Glad you got it working.  What issues did you have with the password?

Stingray automatically populates the port field with the port of the node.  Are you looking for a way to override this?

Faisal

by thefoxlux
on ‎03-26-2013 01:34 AM

Hello Faisal,

Ok I did not know that the port was taken from the node Good to know.

My password had a $ sign in it and then it somehow breaks the string...

Christophe

by
on ‎04-29-2013 03:42 AM

If you're using the virtual appliance, then this KB article (http://supportkb.riverbed.com/support/index?page=content&id=S17659) gives a better solution that does not require installing third-party libraries on the virtual appliance.

The basic principle (writing health monitors in trafficscript) is described here: HowTo: Write Health Monitors in TrafficScript