# Veeam backup replication

# Introduction

**Ver.** 04-02-2022

With this plug-in we will be able to see data from our Veeam Backup environment such as the last backup performed, jobs, etc.

**Type:** Server or agent plug-in

# Compatibility matrix

<table border="1" id="bkmrk-sistemas-donde-se-ha" style="border-collapse: collapse; width: 100%; height: 84px;"><tbody><tr style="height: 28px;"><td style="width: 50%; height: 28px;">**Systems where tested**</td><td style="width: 50%; height: 28px;">CentOS 7, Fedora

</td></tr><tr style="height: 28px;"><td style="width: 50%; height: 28px;">**Systems where it should work**</td><td style="width: 50%; height: 28px;">Cualquier sistema linux

</td></tr></tbody></table>

# Pre requisites

**Required:**

Connectivity to your Veeam Backup environment

# Generate token (deprecated)

**Updated 20 January 2025**

**In the latest version of the plugin, the token is generated by the plugin by passing the username and password, so this section is deprecated.**

With veeam backup replication open with the chosen user, navigate to the following url:

```
https://<hostname>:<port>/swagger/ui/index.html
```

\* Default port: 9419

On the Veeam Backup &amp; Replication REST API 1.0 page, expand the Login section and click POST api/oauth2/token.

[![image-1643730819768.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/scaled-1680-/image-1643730819768.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/image-1643730819768.png)

In the expanded method window, click Test.

In the grant\_type drop-down list, select password.

In the username and password fields, specify the credentials of a user created in Veeam Backup &amp; Replication.

[![image-1643730868633.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/scaled-1680-/image-1643730868633.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/image-1643730868633.png)

Click on Execute.

Wait for the response from the server. A successfully completed operation returns the response code 200. In the body of the response, Veeam Backup &amp; Replication returns an access token, its expiration time and an update token.

\* Remember that the duration of the access token is only 15 minutes.

# Parameters

<table border="1" id="bkmrk-par%C3%A1metro-descripci%C3%B3" style="border-collapse: collapse; width: 100%; height: 407.563px;"><tbody><tr style="height: 29.7969px;"><td style="width: 50%; height: 29.7969px;">**Parameter**</td><td style="width: 50%; height: 29.7969px;">**Description**</td></tr><tr style="height: 29.7969px;"><td style="width: 50%; height: 29.7969px;">-u, --user</td><td style="width: 50%; height: 29.7969px;">User</td></tr><tr style="height: 29.7969px;"><td style="width: 50%; height: 29.7969px;">-p, --password</td><td style="width: 50%; height: 29.7969px;">Password</td></tr><tr style="height: 29.7969px;"><td style="width: 50%; height: 29.7969px;">-i,--ip</td><td style="width: 50%; height: 29.7969px;">ip of your veeam server with port. Example : 192.168.1.34:9041</td></tr><tr style="height: 29.7969px;"><td style="width: 50%; height: 29.7969px;">-x, --prefix</td><td style="width: 50%; height: 29.7969px;">Prefix for the agents</td></tr><tr style="height: 29.7969px;"><td style="width: 50%; height: 29.7969px;">-a, --api\_version</td><td style="width: 50%; height: 29.7969px;">Version for the API</td></tr><tr style="height: 29.7969px;"><td style="width: 50%; height: 29.7969px;">-g,--group</td><td style="width: 50%; height: 29.7969px;">Pandora FMS target group (optional)</td></tr><tr style="height: 46.5938px;"><td style="width: 50%; height: 46.5938px;">--data\_dir</td><td style="width: 50%; height: 46.5938px;">Pandora FMS data directory. By default it is /var/spool/pandora/data\_in/ (optional)</td></tr><tr style="height: 63px;"><td style="width: 50%; height: 63px;">--transfer\_mode</td><td style="width: 50%; height: 63px;">XML transfer mode of the agents. Local or tentacle. By default tentacle.</td></tr><tr style="height: 29.7969px;"><td style="width: 50%; height: 29.7969px;">--tentacle\_ip</td><td style="width: 50%; height: 29.7969px;">IP address of tentacle to which the XML will be sent. By default 127.0.0.1</td></tr><tr style="height: 29.7969px;"><td style="width: 50%; height: 29.7969px;">--tentacle\_port</td><td style="width: 50%; height: 29.7969px;">Tentacle port to which XML will be sent. Default :41121</td></tr><tr style="height: 29.7969px;"><td style="width: 50%; height: 29.7969px;">--interval</td><td style="width: 50%; height: 29.7969px;">Agent interval. Default 300 seconds.</td></tr></tbody></table>

# Manual execution

We can run the plugin manually to display an xml with the data on the screen.

```
./pandora_veeam -i <ip with port> -u <user> -p <password> 
[--prefix <prefix>] [--api_version <api_version>] [--group <group>] 
[--data_dir <data_dir>] [--interval <interval>] 
[--transfer_mode <transfer_mode>] [--tentacle_ip <tentacle_ip>] [--tentacle_port <tentacle_port>]
```

<p class="callout warning">If when you run it, you see the error : Error getting token, it is likely that you do not have access to the environment. You can try the following curl to verify that it is an interactivity problem.</p>

```
curl -k -X POST "https://<user_ip>/api/oauth2/token" \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -H "x-api-version: <api_version>" \
     -d "grant_type=password&username=<user>&password=<password>"
```

<div id="bkmrk-"></div>

# Configuration in PandoraFMS

The best way to manage server plugins in Pandora is from "/usr/share/pandora\_server/util/plugin" so we will send it to that path.

Then we will move to the folder where we have put it ("/usr/share/pandora\_server/util/plugin" is the recommended one").

As a server plugin

We will go to servers &gt; plugins:

[![image-1629974405286.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-08/scaled-1680-/image-1629974405286.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-08/image-1629974405286.png)

Click on add:

[![image-1629974430627.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-08/scaled-1680-/image-1629974430627.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-08/image-1629974430627.png)

Click on add:

[![image-1643988146523.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/scaled-1680-/image-1643988146523.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/image-1643988146523.png)

We enter as command the path to the plugin, and as parameters the ones we have entered executing the plugin, the "\_field\_" fields are macros defined below.

We put for each macro the description that you prefer . Remember that in this plugin the three mandatory parameters are user, password and IP, the others are optional.

[![weblogic3.png](https://pandorafms.com/guides/public/uploads/images/gallery/2021-09/scaled-1680-/weblogic3.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2021-09/weblogic3.png)

Once this is done, if we execute the plugin from the terminal, the agent with the modules will have been created.

# Modules generated by the plugin

The plugin will create 3 agents with several modules, the number of modules depends on your veeam environment as it will create one for each job created for example.

**Veeam\_Backup\_Replication-Services\_and\_configuration**

**[![veeamservicesandconfig2.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/scaled-1680-/veeamservicesandconfig2.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/veeamservicesandconfig2.png)**

**Veeam\_Backup\_Replication-Sessions\_servers\_and\_repositories**

**[![Veeamserversrepos.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/scaled-1680-/veeamserversrepos.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/veeamserversrepos.png)**

**Veeam\_Backup\_Replication-Proxyes\_and\_jobs**

[![image-1643987735037.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/scaled-1680-/image-1643987735037.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-02/image-1643987735037.png)