|Thomas Leister 16f2a6f01c Fix code listings to shell syntax||3 days ago|
|.gitignore||3 days ago|
|LICENSE||5 days ago|
|README.md||3 days ago|
|main.go||3 days ago|
|mock.sh||3 days ago|
Icinga2 check for Restic backup repositories. Checks if backups were run successfully and if repository state is okay.
git clone ... cd check_restic go build
chmod u+x check_restic chown root check_restic chmod u+s check_restic
As every Nagios-compatible check, you can run the check standalone:
./check_restic --command "/usr/local/bin/restic -r myrepo snapshots --quiet --host myhost --json --last"
[How to include into Icinga2]
Make sure Restic is returning the JSON structure that we expect. Pick the
command argument from above and run it in your shell directly:
/usr/local/bin/restic -r myrepo snapshots --quiet --host myhost --json --last
If this already fails:
If the above
restic command does work onk the command line, check if the permissions are right:
check_resticshoudl probably be set to
chmod u+s check_restic) must be set to run
”… why would you make things more complicated then necessary?!”
setuid 0(click) on it to run it as root in any case, even if the caller is another user (Restic probably should/needs to run as root, right?).