I am working towards implementing IDM 4 into my environment. I found that on one of my servers, the driver had stopped without my knowledge. So I decided to write a bash script to check the status of the driver, restart it if needed, and email whenever the status of the driver changes.

Create the folder /var/opt/novell/scripts Copy the script into the directory, edit the variables as indicated in the script (#edit me comment) and set the permissions so it can be executed.

On line 7, that is a reminder note to add the ip address of your SMTP server to the /etc/mail.rc file so the script can send notifications…


admin="admin.tree"    #edit me
password="secret"   #edit me
dxml_driver="driver-name.context.tree"   #edit me

#add "set smtp=smtp.ip.add.ress" to /etc/mail.rc file so the script can send email

email_to=""    #edit me
email_body="/var/opt/novell/scripts/idm_driver_status.msg"    #edit me

dxcmd_output=`/opt/novell/eDirectory/bin/dxcmd -user $admin -password $password -getstate $dxml_driver`
case $dxml_drvstate in
	0) #stopped
		echo -n "Driver state 0 - Stopped"
		email_subj="IDM Driver $dxml_driver has STOPPED"
		echo `! date` " - IDM Driver $dxml_driver status: Stopped...  Attempting to restart driver $dxml_driver" >$email_body
		dxcmd_output=`/opt/novell/eDirectory/bin/dxcmd -user $admin -password $password -start $dxml_driver`
		/bin/mail -s "$email_subj" "$email_to" < $email_body
	1) #starting
		echo -n "Driver state 1 - Starting"
		email_subj="IDM Driver $dxml_driver is STARTING"
		echo `! date` " - IDM Driver $dxml_driver status: Starting...  Please check the server" >$email_body
		/bin/mail -s "$email_subj" "$email_to" < $email_body
	2) #running
		if grep -q -i running /var/opt/novell/scripts/idm_driver_status.msg
			echo -n "No Change in Driver state 2 - Running"
			echo ""
			echo -n "Driver state 2 - Running"
			email_subj="IDM Driver $dxml_driver is RUNNING"
			echo `! date` " - IDM Driver $dxml_driver status: Running" >$email_body
			/bin/mail -s "$email_subj" "$email_to" < $email_body
	3) #stopping
		echo -n "Driver state 3 - Stopping"
		email_subj="IDM Driver $dxml_driver is STOPPING"
		echo `! date` " - IDM Driver $dxml_driver status: Stopping...  Please check the server" >$email_body
		/bin/mail -s "$email_subj" "$email_to" < $email_body
0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Leave a Reply

Leave a Comment

Aug 31, 2011
5:36 pm
Active Directory Authentication Automation Cloud Computing Cloud Security Configuration Customizing Data Breach DirXML Drivers End User Management Identity Manager Importing-Exporting / ICE/ LDIF Intelligent Workload Management IT Security Knowledge Depot LDAP Monitoring Open Enterprise Server Passwords Reporting Secure Access Supported Troubleshooting Workflow