Simple monitoring for DataSync

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 with the following content:

/bin/netstat -an | /bin/grep -q '' || /usr/sbin/rcdatasync restart

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

*/10 * * * * /root/bin/

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.


How To-Best Practice
Comment List
Related Discussions