2

We've implemented a folder sync across two servers sitting in two different data centres using Unison. It's crucial for us that this folder sync work as expected as our SLAs depend on the data being available at both ends.

So far Unison has been working like an ace, no problems.

However, we need to implement a mechanism to ensure that someone is notified if Unison does throw up an error. I know of the standard Unison logs. But in addition to the standard logs I'm looking for another log that would only report errors, not the entire verbose log of everything the Unison service is doing.

This way we can monitor this 'errors-only' log and send out emails or SMSs to notify the correct individuals.

2 Answers 2

3

We use a wrapper around Unison that, on failure, creates a file in /tmp based on the pathname of the directory to sync. Then, there is a service check in Nagios that checks for the presence of these files, and sends up an alert if found. This way there is the verbose Unison log for more information, a quick way to know if something went wrong, and automated email/SMS if/when it does. You could also use cron for this if something like Nagios isn't available.

1
  • Thanks Kendall, maybe a wrapper around Unison is the way to go. As a short term fix we may have something crude watching the verbose logs but the longer run need something that will spit out errors in the way our notification system would need it. Dec 30, 2011 at 16:07
0

I don't test but you can maybe use the logfile directive to have all the modifications, and the quiet to stop the stdout. You will just have the errors, so you can redirect them to a mail, a logfile...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .