Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erasys/sensu-plugins-restic
https://github.com/erasys/sensu-plugins-restic
Last synced: about 12 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/erasys/sensu-plugins-restic
- Owner: erasys
- License: mit
- Created: 2019-01-25T17:37:05.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-29T19:04:56.000Z (about 5 years ago)
- Last Synced: 2024-08-10T21:15:52.049Z (3 months ago)
- Language: Ruby
- Size: 6.84 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# sensu-plugins-restic
[![Build Status](https://travis-ci.org/erasys/sensu-plugins-restic.svg?branch=master)](https://travis-ci.org/erasys/sensu-plugins-restic)
[![Gem Version](https://badge.fury.io/rb/sensu-plugins-restic.svg)](http://badge.fury.io/rb/sensu-plugins-restic)
[![Dependency Status](https://gemnasium.com/erasys/sensu-plugins-restic.svg)](https://gemnasium.com/erasys/sensu-plugins-restic)
[![Community Slack](https://slack.sensu.io/badge.svg)](https://slack.sensu.io/badge)## Functionality
## Files
* bin/check-restic-snapshot.rb
## Usage
### check-restic-snapshot
Checks the presence and the age of the latest restic backup snapshot.
By default it expects the restic binary to be installed at `/usr/bin/restic`. Repository location and password are passed into the check
through the environment variables `$RESTIC_REPOSITORY` and `$RESTIC_PASSWORD_FILE`. Please check the
[restic documentation](https://restic.readthedocs.io/en/latest/manual_rest.html) for details.This example checks the repository configured through the environment variables mentioned before. It warns if the last backup is older
than 1 day + 1 hour, and becomes critical after 2 days + 1 hour:```
check-restic-snapshot.rb -w 90000 -c 176400
```If your restic binary is in a different location and/or you prefer to pass repository location and password via parameters, use the `-p`
option to specify how the restic binary is invoked:```
check-restic-snapshot.rb -w 90000 -c 176400 -p '/opt/bin/restic -r /mnt/backups -p /etc/restic/password'
```The `--missing-status` allows you to specify the check's result if no backup has been created so far (defaults to `critical`).
```
check-restic-snapshot.rb -w 90000 -c 176400 --missing-status warning
```## Installation
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
## Notes