rsysnc task alerts or notifications or logging

Status
Not open for further replies.

rwfitzy

Explorer
Joined
Nov 20, 2014
Messages
53
Haven't been able to find a definite answer if there is a way to have alerts for Rsync Tasks? I've read several posts where the solution is to write own script and use via cron jobs? I did setup an Rsync Task with user who has email, which is working well. But I forced it to fail and did not receive any FreeNAS alert or email to the user of the task.
 

rwfitzy

Explorer
Joined
Nov 20, 2014
Messages
53
No, works well, but no logging. Luckily my tasks are not critical.
 

rwfitzy

Explorer
Joined
Nov 20, 2014
Messages
53
Revisiting this, it seems perhaps the email should be going out as a cron job. I see the entries in /etc/crontab and they have no redirect to /dev/null, only the error redirect:

Code:
[cron job snippet] 2>&1 |/usr/bin/logger -t rsync


Shouldn't the output of the cron job go to root user like daily output reports? Quiet is not selected for any of my rsync tasks and I see the output in the console while running.
 

rwfitzy

Explorer
Joined
Nov 20, 2014
Messages
53
I setup more Rsync tasks that I need to monitor and did end up with a solution but requires Nagios. We use Nagios for monitoring anyway and it just happens to be in a Jail on the NAS. The Rsync task I have setup is to pull from production servers into a dataset on the FreeNAS server. I mounted the dataset in the iocage jail using iocage fstab.

The source servers run a daily mysql dump, so I created some check_file_age services in Nagios to check the file age is within a day. If someone would like any part of the configuration, just lmk.

One gotcha I ran into with Nagios to able to see the dump file since it has rwx------ permissions. I installed sudo to the jail to allow nagios to run check_file_age as root with no password.
 
Status
Not open for further replies.
Top