How to Monitor OID Status and Restart the LDAP Service When OID is Down?

WLSDM for WebLogic
WLSDM for WebLogic
Published in
3 min readMay 12, 2021


We prepared WLSDM OID DevOps MBean blog about when OID shuts down due to external problems such as a network issue, the system will be provided to stand up. First of all, We are going to create WLSDM DevOps MBean then assign restart script on it. If the dummy LDAP search on DevOps MBean does not return any result, the opmnctl service will be restart by triggering the action script.

1. Creating Generic DevOps Mbean

1.1 Login to WebLogic console and go to WLSDM Console.

1.2 Go to “Configuration > Monitoring & Diagnostics”.

1.3 Click the “New User DevOps MBean” button in WLSDM “page operation” menu.

1.4 Choose “Embedded Script” from the dropdown list then select target server.

1.5 Edit the script and paste. Click “Transform:Run & Get Mbean Attributes” button. Wizard is going to generate JMX Mbean Attributes then click “Next” button.

export JAVA_HOME
export PATH
echo OID_CHECK01=$( if [[ $($ldapPath -h $HOST1 -p $PORT -D cn=$USER -w $PASS -b $CN $Search_CN .) == *jhon* ]] ;
then echo 1; else echo 0 ; fi) echo OID_CHECK02=$( if [[ $($ldapPath -h $HOST2 -p $PORT -D cn=$USER -w $PASS -b $CN $Search_CN .) == *jhon* ]] ;
then echo 1; else echo 0 ; fi)

1.6 Create a new dashboard or add MBean Chart to an existing Dashboard.

2. Add the “New User Defined Action / Script” button in the page operations.

2.1 Type an Action Name, select embedded script and write the executable script. then click the save button.

opmnctl stopall &  
wait $!
if [[ $(ps -ef | grep ldap | wc -l) > 1 ]];then
pkill -f -9 ldap
sleep 2
opmnctl startall

3. Navigate to “Monitoring > Custom Dashboard” Click the “Metric & Chart Options” to adjust alarm and other operations.

3.1 Click “Actions” button on chart options modal window and select “RestartOID” action then click save button.

3.2 Set the alarm “ON”, operator as “<” and set alarm treshold value as 1.

4. When the alarm is triggered, the action script will restarts the opmnctl service.

Getting Started…

Download WLSDM Now !