-1

Basically I just want to ensure whether

ldapsearch

and

ldapsearch -h 127.0.0.1 -Z -x

I did some check_ldap command and it's fine but I specially want to verify ldapsearch and ldapsearch -h 127.0.0.1 -Z -x which I am unable to find anything regarding to that in google.

Thanks

hunkeelin
  • 1
  • 1

2 Answers2

2

Nagios uses similar return codes to the shell, if you write a script and it exits with the appropriate error code & string (OK, WARN etc) you are set - just abstract the actual commands with a shell script, add that as a plugin and you're done. See the Nagios Plugins guidelines for more information.

TheFiddlerWins
  • 2,999
  • 1
  • 15
  • 22
  • Thanks. I think i know how to go from here. I thought it will be a one line thing. – hunkeelin Jul 10 '15 at 20:54
  • You have to do two at least (the command and the check definition), ideally you do 3 (plugin, command and check definition) so you can make it reusable – TheFiddlerWins Jul 10 '15 at 20:57
0

The stock check_ldap does a search when it connects. See check_ldap --help or the online docs, specifically the -a option. By default, it searches "(objectclass=*)", but you can change this.

Keith
  • 4,637
  • 15
  • 25