14 lines
304 B
Bash
Executable file
14 lines
304 B
Bash
Executable file
#!/bin/bash
|
|
|
|
search=$(ldapsearch -x -H ldapi:/// -b '' -s base '(objectClass=*)' namingConexts | grep -wc "Success")
|
|
|
|
if [[ $search -gt 0 ]]
|
|
then
|
|
echo "- ldap.search 1"
|
|
else
|
|
echo "- ldap.search 0"
|
|
fi
|
|
|
|
port=$(zabbix_agent -t net.tcp.port[,636] | cut -d'|' -f2 | cut -d']' -f1)
|
|
echo "- ldap.port $port"
|
|
|