Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Monitoring LDAP on eDir via simple script

9 views
Skip to first unread message

Thorsten Kampe

unread,
Mar 4, 2010, 2:43:22 AM3/4/10
to
* rsw4723 (Wed, 03 Mar 2010 23:26:02 GMT)
> I've searched many different ways to do this and seeking some feedback
> from this forum on the best way to achieve my goal. I wanted something
> simple and easily maintainable. I envisioned setting up a cron job to
> check my LDAP servers if active say every 20 minutes over port 389
> with the below script.
>
> If LDAP is unavailable then send a e-mail with the heading ?Check LDAP
> services on sever LDAPServerName?

If you need to monitor services then I would refrain from hacking it
myself. Use one of the available packages like monit which supports LDAP
out-of-the box. You can either opt to just receive an email or even
restart the service.

Thorsten

Jim Willeke

unread,
Mar 4, 2010, 9:25:36 AM3/4/10
to
Could not say what is happening with your script, but the idea should work.

you could turn on DSTRACE and see what was happening when it failed.

As mentioned, there are "out-of-the-box" and perhaps some better methods.

Sentinel is "Novell's" way.

-jim

On 3/3/2010 6:26 PM, rsw4723 wrote:
>
> I've searched many different ways to do this and seeking some feedback
> from this forum on the best way to achieve my goal. I wanted something
> simple and easily maintainable. I envisioned setting up a cron job to
> check my LDAP servers if active say every 20 minutes over port 389 with
> the below script.
>

> If LDAP is unavailable then send a e-mail with the heading �Check LDAP
> services on sever LDAPServerName�
>
> Here what I have thus far in a .sh file
>
> #!/bin/sh
>
> ldapsearch -h 10.XXX.XXX.XX -D cn=MonitorLDAP,ou=users,o=system -w
> Today123 -b o=data -s base 1.1; if [ $? -ne 0 ]; then { nail -s "Check
> LDAP services on sever LDAPServerName" myn...@emailaddress.com; } fi;
>
> My results keep sending me an e-mail every 20 minutes to check the LDAP
> services. My bind account is active and I�ve tested this with an LDAP
> browser.
>
> My end results would be send me an e-mail if LDAP services failed.
>
> Any thoughts?
>
>

0 new messages