Simple monitoring for DataSync

0 Likes
Using a quite simple script one can ensure that the mobility connector is up and accepting connections. In the example I use it is assumed that the connector is listening on port 443 (the default). The script is checking whether the port 443 is open and listening - and if not simply restarting the DataSync.

1. Create a script (in /root/bin), I named it chkds.sh with the following content:

#!/bin/sh
/bin/netstat -an | /bin/grep -q '0.0.0.0:443' || /usr/sbin/rcdatasync restart



2. Add this script to your crontab (here it's running every 10 minutes):

*/10 * * * * /root/bin/chkds.sh



That's it folks. Here are some thoughts: Do not forget to comment the script in crontab prior to any maintenance (upgrade) of the DataSync.



Labels:

How To-Best Practice
Comment List
Related
Recommended