Code Monkey home page Code Monkey logo

zabbix-borg's Introduction

Zabbix template for monitoring Borg backup repositories. Requires Borg binary to be available in the system being monitored. Monitoring occurs on the backup server, though it can be possible to invoke this by the client and connect to repository via Borg network capabilities. This setup is currently not supported by the plugin.

Installation

  1. Copy zabbix_agentd.d/borg.conf to the Zabbix agent's configuration directory (usually located at /etc/zabbix). If using encrypted repositories, read the note below and use the file zabbix_agentd.d/borg-enc.conf.
  2. Import template configuration templates/borg.xml to Zabbix web frontend.

Notes

This plugin uses discovery capabilities provided by Zabbix to locate backup repositories. Since all commands are executed by zabbix user, appropriate permissions must be granted to all backup repositories. If encrypted, encryption keys should be provided to zabbix user.

One possibility is to use --umask=0027 parameter when invoking borg command to make created files group readable. Then add the user zabbix into the group of the SSH account used by backup client. In this case, the backup repository must be created with --umask=0007 to make it group writable so that zabbix user can create lock files while polling the backup status.

Encrypted Repositories

For encrypted repositories, a borg info command must be run right after the backup and output saved to a file status.txt located in the remote repository. Also the output of the borg check -v should be appended to status.txt. Since those commands are run right after the backup by the client, they will contain the latest status of the repository. This plugin can then reside in the remote host and read the status from status.txt. This effectively avoids making encryption keys available to zabbix user neither on backup client or remote storage server.

To save the output of aforementioned commands, use something like:

	borg info user@host:repo::backup | ssh user@host 'cat > repo/status.txt'
	borg check user@host:repo | ssh user@host 'cat >> repo/status.txt'

zabbix-borg's People

Contributors

theranger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zabbix-borg's Issues

Value should be a JSON object

Hi,

Discovery rule is returning "Value should be a JSON object."
I am using borg-enc.conf and zabbix 3.2

could you please help?

Zabbix log: Timeout while executing a shell script.

Hi!
Is it possible to find a workaround to avoid timeout? I have one big backup (near 6 TB), and an external script working with it for more than 2 minutes. But the maximum timeout in zabbix config is 30 secs.
thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.