rsync check by nagios NCSA

Sjaak Nabuurs sjaaknabuurs at citytower.com
Thu Feb 8 19:45:51 GMT 2007


Hello everyone

I'm using rsync over ssh
rsync -ave ssh bla at bla.tld:/home /backup/server1
This works great for many years now

Now I'm playing with Nagios and NSCA but how can I detect if rsync has 
done everything well.

nsca works simple

<hostname>[tab]<svc_description>[tab]<return_code>[tab]<plugin_output>[newline]. 

I have a text file named backup_okay with the following:
Server1 backup_home 0 Backup is okay. [return]
and text file named backup_failed with the following:
Server1 backup_home 2 Backup failed. [return]

When okay send : send_nsca IP_nagios –c send_nsca.cfg < backup_okay
When failed send : send_nsca IP_nagios –c send_nsca.cfg < backup_failed

If somebody knows a solution.
Just grepping any sterr output will not be the way I guess.
Latter I would like to send the reason why rsync had failed, maybe 
connection failure.

I hoop somebody can help me and I hoop I give somebody a hint to use 
nagios for controlling rsync.

Thanks for reading.
Keep up the good work.

Sjaak


More information about the rsync mailing list