Forum Discussion

adharkrader's avatar
adharkrader
Icon for Nimbostratus rankNimbostratus
Jul 25, 2012

Can I check for LDAP in read-only state in a monitor?

Before I overlook the obvious or re-invent the wheel... is there a way to have an LDAP monitor mark a member down if LDAP is in a read-only state (re-indexing, backups, etc)?

 

 

I tried disabling chase referrals but the monitor itself is a search not a write so it doesn't get referred... but users doing writes get referred and that's a bad thing.

 

 

I'm thinking there's some sly way to have the monitor detect the read-only state and mark those members down (so writes don't even go there) but I can't think of it... thoughts?
  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    Sure. But you will have to do it in an external monitor. If you write in perl, then i believe Net::LDAP module is available for use. (or in bash there is ldapsearch at the command line).

     

     

    Just craft a suitable write in your monitor script, return the appropriate status and away you go.

     

     

    H