Showing results for 
Search instead for 
Did you mean: 

LDAP Health Monitor

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 (in the 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 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. (edit - the file is attached to this article)

Version history
Revision #:
3 of 3
Last update:
‎01-07-2021 01:56:AM
Updated by:
Tags (1)

There's no attached script.

Hi William,

Updated the article with a link to the script.



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?


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.


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

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

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 hardy-security Release.gpg [198B]

Ign hardy-security/main Translation-en_US

Ign hardy-security/universe Translation-en_US

Ign hardy-security/multiverse Translation-en_US

Get:2 hardy-security Release [65.9kB]

Ign hardy-security Release

Hit hardy-security/main Packages

Hit hardy-security/main Sources

Hit hardy-security/universe Packages

Hit hardy-security/universe Sources

Hit hardy-security/multiverse Packages

Hit hardy-security/multiverse Sources

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

Reading package lists... Done

W: GPG error: 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

Apologies, I was a missing a step.  The missing step is to copy sources.list to /etc/apt/sources.list.  If you download the 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.


Hi Faisal,

Thanks that worked!  Unfortunately my peer and I are Linux novices..Smiley Happy

Glad to hear its working for you. 

Hello Faisal

I have this error Monitor has detected a failure in node 'XXXXX:50010': Failed to run /opt/zeus/zxtm/conf/scripts/ --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 the way if i am running by hand the ldapsearch request it is working and returning the list of the attributes

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 and use the new one.  Hope it works this time.


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



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?


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...


If you're using the virtual appliance, then this KB article ( 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