Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_rsync

Rating
2 votes
Favoured:
0
Hits
107394
Files:
FileDescription
check_rsynccheck_rsync v.1.01
check_rsync2check_rsync v.1.02
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Checks rsync servers availability, as well as (optionally) individual modules availability. It also supports authentication on modules.
I wrote check_rsync for the purpose of checking rsync servers availability, as well as (optionally) individual modules availability. It also supports authentication on modules.

Usage: check_rsync -H [-p ] [-m [,,] [-m [,,]...]]


The only required argument is -H, in which case it will only try to list modules on the Rsync server.

One or more -m arguments can be passed with one module name per -m argument. You can also append a username and password to the module name by separating them with commas (without spaces).

A timeout switch could be easily added, I just forgot at the time I wrote it. Comments are welcome.

Note: Original version used File::Rsync and caused problems on more recent Nagips ePNs, so I switched to IPC::Cmd. The latter ended-up having problems as well in recent versions of Perl so I don't use any of these modules anymore. There should not be any ePN problems from now on.

Changelog:
v.1.02beta (January 2008)
- Kill rsync process on ALRM timeouts (Avoids leaving stale rsync processes behind)
- More verbose Rsync errors
- Commas in the password field should work
Reviews (1)
Good job!

I just want to say 2 different things:
- on SuSE distribution, the utils.pm is located in /usr/lib/nagios/plugins directory (it's included in nagios-plugins package). So you need to correct line 30 of the script with:

use lib "/usr/lib/nagios/plugins";

- also, is not written in the information page of check_rsync, but this plugin is using rsync command, so it must be installed also on the Nagios server.

Anyway, it's working fine :)