[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: OpenLDAP watchdog

I use a script that tests using ldapsearch, and search for something that
will always be in the directory (like the basedn).

If slapd is down, then ldapsearch will return an error code. (it doesn't
return an error code if it doesn't just doesn't find what you are looking
for, hence searching for an entry that will always be there!).

You can wrap this inside a simple shell script that will then check the
return code (if 0, ldap is up, else ldap is down...restart slapd).

You can then put this script in a cron job and have it run every 15
minutes or so (or however much time you wish to check it with)

Hope this helps,

On Fri, 10 Aug 2001, Jeff Costlow wrote:

> By watchdog I mean a program that periodically wakes up and checks to see if the server is alive.  If it isn't it does something  (usually re-starts the server).
> Has anyone already written one?