Coder Social home page Coder Social logo

xtonousou / veeambr-zabbix-template Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 25 KB

Veeam Backup & Replication 11 Zabbix Template using RESTful API

License: GNU General Public License v3.0

Python 69.41% Shell 30.59%
veeam veeam-backup monitoring backup zabbix zabbix-templates zabbix-python linux resftul

veeambr-zabbix-template's Introduction

VEEAM Backup & Replication RESTful API Zabbix Template

Compatibility

This is currently tested on Veeam Backup & Replication 11 build 11.0.0.837 with RESTful API version 1.0-rev1.

Requirements

You need to install the following packages on your system: python3, python3-pip, curl, jq, bash, sudo. When you have python3 and python3-pip installed, run the following command to install required python modules: pip3 install -r requirements.txt.

Usage

  • Place the project's directory inside /usr/lib/zabbix/externalscripts/ or whatever directory you have specified inside /etc/zabbix/zabbix_proxy.conf.
  • Create a privileged user for the Veeam authentication (on Veeam Backup Server). Make sure to test the user first by logging into Veeam and checking the Jobs' status.
  • Link veeam_monitor.sh to external scripts directory like so: ln -s /usr/lib/zabbix/externalscripts/VeeamBR-Zabbix-Template/veeam_monitor.sh /usr/lib/zabbix/externalscripts/veeam_monitor.sh. You may need to change the /usr/lib/zabbix/externalscripts/ part if this is defined elsewhere.
  • Copy the file env.sample to another file called exactly .env inside the project's directory and change the values.
  • Give the following permissions to the scripts: chmod u=rwx,g=r,o= collect.py credential-manager.sh veeam_monitor.sh ; chown zabbix:zabbix collect.py credential-manager.sh veeam_monitor.sh ; chmod 0400 .env.
  • Enable the cron specified inside crontab.txt for root user.

This is an example of .env file:

VEEAM_USERNAME=veeam_mon_svc
VEEAM_PASSWORD=MyAw3s0m3P@ssw0rd
VEEAM_HOST=veeam-bkp.local
VEEAM_API_VERSION=1.0-rev1
VEEAM_CACHE_FILE=/tmp/.zabbix-veeam.json

The script can either be deployed on Zabbix Server or Zabbix Proxy.

Notes

The script does not verify the certificate when it requests data from the Veeam API. If you have signed certificates, it is highly recommended to change the verify=False argument to verify=True inside collect.py script.

Do not delete the VEEAM_CACHE_FILE manually, let the credential-manager.sh script handle this. If you need to delete the file, just kill the process of credential-manager.sh script. To re-run the credential-manager.sh issue the following snippet:

sudo -u zabbix /bin/bash /usr/lib/zabbix/externalscripts/VeeamBR-Zabbix-Template/credential-manager.sh &
disown
ps auxf | grep credential-manager.sh | grep -v grep  # verify that the process is running

Troubleshooting

Check the API connection from the Zabbix Server/Proxy using the below command.

curl -s -k https://<veeam-ip>:9419/swagger

veeambr-zabbix-template's People

Contributors

xtonousou avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lauroitalo

veeambr-zabbix-template's Issues

Errors executing credential-manager.sh

Hi @xtonousou,

I cloned your solution and tried to run on Ubuntu 20.04.

When I execute manually the ./credential-manager.sh to test, I'm getting this return:

sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
sleep: invalid option -- '6'
Try 'sleep --help' for more information.
^C

Am I missing something? Something misconfigured?

Thanks in advance,

Best regards.

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.