Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.83 KB

README.md

File metadata and controls

48 lines (31 loc) · 1.83 KB

sensu-plugins-restic

Build Status Gem Version Dependency Status Community Slack

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 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

Notes