Tool

tdharris's picture
tool
Reads:

1207

Score:
1.75
1.8
4
 
Comments:

4

checkServices Notification for DataSync/Mobility Administration

Author Info

23 April 2013 - 10:06am
Submitted by: tdharris

(View Disclaimer)

license: 
NA

download url: ftp://ftp.novell.com/outgoing/checkServices.zip

Notification service if any DataSync services/connectors go offline. The script restarts the services if any are found to be in a dead/unused state and sends an email to the administrator defined in the script file. The notification email contains the following information:

  • hostname of server
  • date/time when services were found offline
  • the list of services found offline
  • status of services after a restart attempt
  • the current log levels
  • an attachment with a copy of all the logs and other server information

Running the script manually displays the following and will appear in the notification email:

Checking for DataSync Config Engine:			running
Checking for DataSync Web Admin:			running
Checking for DataSync Connector Manager:		running
Checking for DataSync Engine:				running
Mobility Connector listening on port 443:			true
GroupWise Connector listening on port 4500:	true

When implemented with crontab, the script can be set to run every hour, for example. This allows an administrator to be notified of a failure before users complain. Edit the script file and replace email@address.com with the desired administrator's email. You can likewise configure a list of email address by placing them in single quotes separated by a comma and a space - 'email1, email2, email3'

To run the script regularly with crontab, just place the script file into /etc/cron.hourly to run hourly or /etc/cron.daily to run daily. Custom definitions can be made by editing the crontab file manually:

crontab -e

An example of running the script every 30 minutes:

*/30 * * * * /root/scripts/checkServices.sh

Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

MARVHUFFAKER's picture

Crontab Syntax Incorrect

Submitted by MARVHUFFAKER on 1 June 2013 - 11:10am.

Your crontab example entry results in the following error:

crontab: installing new crontab
"/tmp/crontab.XXXXtHDJc4":1: bad minute
errors in crontab file, can't install.
Do you want to retry the same edit?

The correct syntax would be to use "*/30" (Asterisk/30) instead of "0/30" (Zero/30). Below:

*/30 * * * * /root/scripts/checkServices.sh

tdharris's picture

Thank you!

Submitted by tdharris on 3 June 2013 - 9:16am.

Thank you!

Thnielsen's picture

error 550 no such file when clicking on link ??

Submitted by Thnielsen on 27 June 2013 - 3:18am.

not able to download file

vodobaas's picture

Is this no longer available?

Submitted by vodobaas on 27 June 2013 - 7:40am.

I tried to download the script and get a page unavailable. I connected with an ftp client and the directory was empty. Any suggestions?

© 2013 Novell