.. image:: http://img.shields.io/pypi/v/rsync-watch.svg
:target: https://pypi.org/project/rsync-watch
:alt: This package on the Python Package Index
.. image:: https://github.com/Josef-Friedrich/rsync-watch/actions/workflows/tests.yml/badge.svg
:target: https://github.com/Josef-Friedrich/rsync-watch/actions/workflows/tests.yml
:alt: Tests
.. image:: https://readthedocs.org/projects/rsync-watch/badge/?version=latest
:target: https://rsync-watch.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
rsync-watch.py
==============
A Python script to monitor the execution of a rsync task.
Features
--------
- The script ``rsync-watch.py`` parses the ``rsync --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]
[--dest-user-group USER_GROUP_NAME] [--exclude EXCLUDE]
[--rsync-args RSYNC_ARGS]
[--action-check-failed {exception,skip}]
[--check-file FILE_PATH] [--check-ping DESTINATION]
[--check-ssh-login SSH_LOGIN] [-v]
[--email-from-addr EMAIL_FROM_ADDR]
[--email-to-addr EMAIL_TO_ADDR]
[--email-to-addr-critical EMAIL_TO_ADDR_CRITICAL]
[--email-smtp-login EMAIL_SMTP_LOGIN]
[--email-smtp-password EMAIL_SMTP_PASSWORD]
[--email-smtp-server EMAIL_SMTP_SERVER]
[--nsca-remote-host NSCA_REMOTE_HOST]
[--nsca-password NSCA_PASSWORD]
[--nsca-encryption-method NSCA_ENCRYPTION_METHOD]
[--nsca-port NSCA_PORT] [--icinga-url ICINGA_URL]
[--icinga-user ICINGA_USER]
[--icinga-password ICINGA_PASSWORD]
[--beep-activated BEEP_ACTIVATED]
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)
options:
-h, --help show this help message and exit
--host-name HOST_NAME
The hostname to submit over NSCA to the monitoring.
--dest-user-group USER_GROUP_NAME
Both the user name and the group name of the
destination will be set to this name.
--exclude EXCLUDE See the documention of --exclude in the rsync manual.
--rsync-args RSYNC_ARGS
Rsync CLI arguments. Insert some rsync command line
arguments. Wrap all arguments in one string, for
example: --rsync-args '--exclude "this folder"'
-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”.
email:
Generated by the config_reader.
--email-from-addr EMAIL_FROM_ADDR
The email address of the sender.
--email-to-addr EMAIL_TO_ADDR
The email address of the recipient.
--email-to-addr-critical EMAIL_TO_ADDR_CRITICAL
The email address of the recipient to send critical
messages to.
--email-smtp-login EMAIL_SMTP_LOGIN
The SMTP login name.
--email-smtp-password EMAIL_SMTP_PASSWORD
The SMTP password.
--email-smtp-server EMAIL_SMTP_SERVER
The URL of the SMTP server, for example:
`smtp.example.com:587`.
nsca:
Generated by the config_reader.
--nsca-remote-host NSCA_REMOTE_HOST
The IP address of the NSCA remote host.
--nsca-password NSCA_PASSWORD
The NSCA password.
--nsca-encryption-method NSCA_ENCRYPTION_METHOD
The NSCA encryption method. The supported encryption
methods are: 0 1 2 3 4 8 11 14 15 16
--nsca-port NSCA_PORT
The NSCA port.
icinga:
Generated by the config_reader.
--icinga-url ICINGA_URL
The HTTP URL. /v1/actions/process-check-result is
appended.
--icinga-user ICINGA_USER
The user for the HTTP authentification.
--icinga-password ICINGA_PASSWORD
The password for the HTTP authentification.
beep:
Generated by the config_reader.
--beep-activated BEEP_ACTIVATED
Activate the beep channel to report auditive messages.
Raw data
{
"_id": null,
"home_page": "https://github.com/Josef-Friedrich/rsync-watch",
"name": "rsync-watch",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Josef Friedrich",
"author_email": "josef@friedrich.rocks",
"download_url": "https://files.pythonhosted.org/packages/46/2f/74df6fc5131720af1cc4df7224b3d562efc8d9799701c701229f67de8dc9/rsync_watch-0.7.1.tar.gz",
"platform": null,
"description": ".. image:: http://img.shields.io/pypi/v/rsync-watch.svg\n :target: https://pypi.org/project/rsync-watch\n :alt: This package on the Python Package Index\n\n.. image:: https://github.com/Josef-Friedrich/rsync-watch/actions/workflows/tests.yml/badge.svg\n :target: https://github.com/Josef-Friedrich/rsync-watch/actions/workflows/tests.yml\n :alt: Tests\n\n.. image:: https://readthedocs.org/projects/rsync-watch/badge/?version=latest\n :target: https://rsync-watch.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\nrsync-watch.py\n==============\n\nA Python script to monitor the execution of a rsync task.\n\nFeatures\n--------\n\n- The script ``rsync-watch.py`` parses the ``rsync --stats`` output and\n sends this statistics to a monitoring system like Nagios or Icinga\n using the NSCA protocol.\n\n- The script ``rsync-watch.py`` can be configured to perform various\n checks before starting the rsync process.\n\n:: \n\n usage: rsync-watch.py [-h] [--host-name HOST_NAME]\n [--dest-user-group USER_GROUP_NAME] [--exclude EXCLUDE]\n [--rsync-args RSYNC_ARGS]\n [--action-check-failed {exception,skip}]\n [--check-file FILE_PATH] [--check-ping DESTINATION]\n [--check-ssh-login SSH_LOGIN] [-v]\n [--email-from-addr EMAIL_FROM_ADDR]\n [--email-to-addr EMAIL_TO_ADDR]\n [--email-to-addr-critical EMAIL_TO_ADDR_CRITICAL]\n [--email-smtp-login EMAIL_SMTP_LOGIN]\n [--email-smtp-password EMAIL_SMTP_PASSWORD]\n [--email-smtp-server EMAIL_SMTP_SERVER]\n [--nsca-remote-host NSCA_REMOTE_HOST]\n [--nsca-password NSCA_PASSWORD]\n [--nsca-encryption-method NSCA_ENCRYPTION_METHOD]\n [--nsca-port NSCA_PORT] [--icinga-url ICINGA_URL]\n [--icinga-user ICINGA_USER]\n [--icinga-password ICINGA_PASSWORD]\n [--beep-activated BEEP_ACTIVATED]\n src dest\n\n A Python script to monitor the execution of a rsync task.\n\n positional arguments:\n src The source ([[USER@]HOST:]SRC)\n dest The destination ([[USER@]HOST:]DEST)\n\n options:\n -h, --help show this help message and exit\n --host-name HOST_NAME\n The hostname to submit over NSCA to the monitoring.\n --dest-user-group USER_GROUP_NAME\n Both the user name and the group name of the\n destination will be set to this name.\n --exclude EXCLUDE See the documention of --exclude in the rsync manual.\n --rsync-args RSYNC_ARGS\n Rsync CLI arguments. Insert some rsync command line\n arguments. Wrap all arguments in one string, for\n example: --rsync-args '--exclude \"this folder\"'\n -v, --version show program's version number and exit\n\n checks:\n Perform different checks before running the rsync task.\n\n --action-check-failed {exception,skip}\n Select action what to do when a check failed.\n --check-file FILE_PATH\n Check if a file exists on the local machine.\n --check-ping DESTINATION\n Check if a remote host is reachable by pinging.\n DESTINATION can a IP address or a host name or a full\n qualified host name.\n --check-ssh-login SSH_LOGIN\n Check if a remote host is reachable over the network\n by SSHing into it. SSH_LOGIN: \u201croot@192.168.1.1\u201d or\n \u201croot@example.com\u201d or \u201cexample.com\u201d.\n\n email:\n Generated by the config_reader.\n\n --email-from-addr EMAIL_FROM_ADDR\n The email address of the sender.\n --email-to-addr EMAIL_TO_ADDR\n The email address of the recipient.\n --email-to-addr-critical EMAIL_TO_ADDR_CRITICAL\n The email address of the recipient to send critical\n messages to.\n --email-smtp-login EMAIL_SMTP_LOGIN\n The SMTP login name.\n --email-smtp-password EMAIL_SMTP_PASSWORD\n The SMTP password.\n --email-smtp-server EMAIL_SMTP_SERVER\n The URL of the SMTP server, for example:\n `smtp.example.com:587`.\n\n nsca:\n Generated by the config_reader.\n\n --nsca-remote-host NSCA_REMOTE_HOST\n The IP address of the NSCA remote host.\n --nsca-password NSCA_PASSWORD\n The NSCA password.\n --nsca-encryption-method NSCA_ENCRYPTION_METHOD\n The NSCA encryption method. The supported encryption\n methods are: 0 1 2 3 4 8 11 14 15 16\n --nsca-port NSCA_PORT\n The NSCA port.\n\n icinga:\n Generated by the config_reader.\n\n --icinga-url ICINGA_URL\n The HTTP URL. /v1/actions/process-check-result is\n appended.\n --icinga-user ICINGA_USER\n The user for the HTTP authentification.\n --icinga-password ICINGA_PASSWORD\n The password for the HTTP authentification.\n\n beep:\n Generated by the config_reader.\n\n --beep-activated BEEP_ACTIVATED\n Activate the beep channel to report auditive messages.\n\n",
"bugtrack_url": null,
"license": "GPL-3.0-only",
"summary": "A Python script to monitor the execution of a rsync task.",
"version": "0.7.1",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6df952de402b9ff4e3fae35d89bdc7283cb05ec183a0b3a3591373d50bcd9044",
"md5": "1d98afab46e6e8a13f353b8128183bda",
"sha256": "8db2126a75e5062a8582124bdbe69dd99b55ef6d02b55f4bf5144c800a0d016c"
},
"downloads": -1,
"filename": "rsync_watch-0.7.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1d98afab46e6e8a13f353b8128183bda",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 20151,
"upload_time": "2023-04-11T18:29:00",
"upload_time_iso_8601": "2023-04-11T18:29:00.964666Z",
"url": "https://files.pythonhosted.org/packages/6d/f9/52de402b9ff4e3fae35d89bdc7283cb05ec183a0b3a3591373d50bcd9044/rsync_watch-0.7.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "462f74df6fc5131720af1cc4df7224b3d562efc8d9799701c701229f67de8dc9",
"md5": "089084187e8fd0d0050229eacb988de7",
"sha256": "aa89153a518c7b6926395c309bc0f6ef28c337394cd6cc72588ad7adfc93a308"
},
"downloads": -1,
"filename": "rsync_watch-0.7.1.tar.gz",
"has_sig": false,
"md5_digest": "089084187e8fd0d0050229eacb988de7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 19907,
"upload_time": "2023-04-11T18:29:03",
"upload_time_iso_8601": "2023-04-11T18:29:03.418431Z",
"url": "https://files.pythonhosted.org/packages/46/2f/74df6fc5131720af1cc4df7224b3d562efc8d9799701c701229f67de8dc9/rsync_watch-0.7.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-11 18:29:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Josef-Friedrich",
"github_project": "rsync-watch",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "rsync-watch"
}