Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stapelberg/rsyncprom
rsync wrapper (or output parser) that pushes metrics to prometheus
https://github.com/stapelberg/rsyncprom
Last synced: about 1 month ago
JSON representation
rsync wrapper (or output parser) that pushes metrics to prometheus
- Host: GitHub
- URL: https://github.com/stapelberg/rsyncprom
- Owner: stapelberg
- License: apache-2.0
- Created: 2021-10-30T09:21:34.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-19T08:00:40.000Z (8 months ago)
- Last Synced: 2024-11-09T20:24:43.109Z (about 2 months ago)
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 60
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rsync-prom
[![Go Reference](https://pkg.go.dev/badge/github.com/stapelberg/rsyncprom.svg)](https://pkg.go.dev/github.com/stapelberg/rsyncprom)
An rsync wrapper (or output parser) that pushes metrics to
[prometheus](https://prometheus.io/).This allows you to then build dashboards and alerting for your rsync batch jobs.
## Installation
```
go install github.com/stapelberg/rsyncprom/cmd/rsync-prom@latest
```## Setup example: crontab
```
9 9 * * * /home/michael/go/bin/rsync-prom --instance="sync-drive" -- /home/michael/sync-drive.sh
```## Setup example: systemd
```
[Service]
ExecStart=/home/michael/go/bin/rsync-prom --instance="sync-wiki" -- /usr/bin/rsync --exclude data/cache -av --checksum server:wiki/ /var/cache/wiki
```## Code example: SSH wrapper
Here’s an example for code which uses the `x/crypto/ssh` package to trigger
rsync on a remote machine and parses the output:https://github.com/stapelberg/zkj-nas-tools/blob/02d46d718df60c413844d9218f6dd702ad94e5f1/dornroeschen/sshutil.go#L134-L139