So, the first thing I've done was open a Dropbox account and install Dropbox CLI. This, by default, sets the folder to ~/Dropbox on Linux.
Then, I created a cron job to copy the runtime file every five minutes:
$crontab -e
In vim, which is the default editor in CentOS (and probably many others), you'll need to press 'i' to get into insert mode. Use the following in the crontab file:
5,10,15,20,25,30,35,40,45,50,55,0 * * * * cp -f /proc/uptime ~/Dropbox >/dev/null 2>&1
Then, in vim, press esc, ':', and 'wq' and press enter.
Now, every 5 minutes the runtime file will be copied to the Dropbox folder and synced to Dropbox. Even better, this can be extended to include reports (perhaps those generated by Nagios or another monitor program).
No comments:
Post a Comment