A Python script to monitor the execution of a rsync task.
Project description
rsync-watch.py
A Python script to monitor the execution of a rsync task.
Features
-
The script
rsync-watch.py
parses thersync --stats
output and sends this statistics to a monitoring system like Nagios or Icinga using the NSCA protocol. -
The script
rsync-watch.py
can be configured to perform various checks before starting the rsync process.
usage: rsync-watch.py [-h] [--host-name HOST_NAME]
[--action-check-failed {exception,skip}]
[--check-file FILE_PATH] [--check-ping DESTINATION]
[--check-ssh-login SSH_LOGIN]
[--nsca-remote-host NSCA_REMOTE_HOST]
[--nsca-password NSCA_PASSWORD]
[--nsca-encryption-method NSCA_ENCRYPTION_METHOD] [-v]
src dest
A Python script to monitor the execution of a rsync task.
positional arguments:
src The source ([[USER@]HOST:]SRC)
dest The destination ([[USER@]HOST:]DEST)
optional arguments:
-h, --help show this help message and exit
--host-name HOST_NAME
The hostname to submit over NSCA to the monitoring.
-v, --version show program's version number and exit
checks:
Perform different checks before running the rsync task.
--action-check-failed {exception,skip}
Select action what to do when a check failed.
--check-file FILE_PATH
Check if a file exists on the local machine.
--check-ping DESTINATION
Check if a remote host is reachable by pinging.
DESTINATION can a IP address or a host name or a full
qualified host name.
--check-ssh-login SSH_LOGIN
Check if a remote host is reachable over the network
by SSHing into it. SSH_LOGIN: “root@192.168.1.1” or
“root@example.com” or “example.com”.
nsca:
Send status messages to the monitoring.
--nsca-remote-host NSCA_REMOTE_HOST
IP address of the NSCA remote host.
--nsca-password NSCA_PASSWORD
The NSCA password.
--nsca-encryption-method NSCA_ENCRYPTION_METHOD
The NSCA encryption method.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rsync_watch-0.0.7.tar.gz
(38.8 kB
view details)
File details
Details for the file rsync_watch-0.0.7.tar.gz
.
File metadata
- Download URL: rsync_watch-0.0.7.tar.gz
- Upload date:
- Size: 38.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83e18b4030d2a5c1deb7b12946789f2383eaa39ca594f1645cc9f5aa21ed04db |
|
MD5 | 7667ea80e7d9467492d94f746956dfbb |
|
BLAKE2b-256 | 05b1985ea3cfe83a1db54fe0aa1cc6e21c5e1e526178013ec6eb28989bb153e0 |