# Pandora Azure Storage

# Introduction

  
Ver. 09-05-2022

With this plugin you can monitor a storage account and retrieve data from it, from the blob storage, queue storage and file storage.  
Type: Server plug-in

# Compatibility matrix

<table border="1" id="bkmrk-sistemas-donde-se-ha" style="height: 70px; width: 476px;"><tbody><tr style="height: 35px;"><td style="height: 35px; width: 233px;">Systems where tested</td><td style="height: 35px; width: 243px;">CentOS 7, Fedora, rocky linux

</td></tr><tr style="height: 35px;"><td style="height: 35px; width: 233px;">Systems where it should work</td><td style="height: 35px; width: 243px;">Any linux system

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

# Pre requisites

\- Pandora FMS Data Server enabled  
\- Have the Pandora FMS Plugin Server enabled.  
\- Know some of your account credentials, such as your tenant id, secret, client id and the resource ids of the services.

# Previous configuration

Obtaining credentials necessary for the use of the plugin.

The plugin makes use of a .conf file in which three types of data can be entered.

<div id="bkmrk-%23credentialstenant_i">```
#credentials<br></br>tenant_id:<tenant_id><br></br>client_id:<client_id><br></br>secret:<secret><br></br>#id resources<br></br>account_id:<account_id><br></br>blobservice_id:<blobservice_id><br></br>fileservice_id:<fileservice_id><br></br>queueservice_id:<queueservice_id><br></br>tableservice_id:<tableservice_id><br></br>datalakestorage_id:<datalakestorage_id><br></br>#active agents<br></br>account_agent:1<br></br>blobservice_agent:1<br></br>fileservice_agent:1<br></br>queueservice_agent:1<br></br>tableservice_agent:1<br></br>datalakestorage_agent:1
```

</div>**1. Credentials to authenticate:**

-Tenant id

-Client id

-Secret

**2. Resource ID**

The resource id of each resource monitored by the plugin is required, these are :

\- Account resource ID

\- blobs service resource ID

\- Resource ID of file service

\- tables service resource ID

\- resource ID of queues service

\- datalakestorage resource ID

3\. Active agents

We will be able to decide which agents to activate or deactivate by putting a 1 or a 0 in the line of each service.

Obtaining tenant id and client id.

1\. To obtain the tenant id and the client id, we will go to the applications registry menu inside active directory:

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

2\. We will enter inside the application.

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

3\. The tenant id and client id will appear in the application menu.

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

4\. To find the secret we will go to certificates and secrets inside the active directory menu.

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

5\. Within this menu we can see the secret keys or generate them (it has to be the value of the key, not the id).

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

Obtaining the resource id of all services.

Resource id of the storage account.

Inside the storage account, in the main view we will select json view.

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

Inside we will find the resource id.

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

To find the ID of the other resources from which the plug-in is drawing data, we will go to connection points.

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

Inside you will find all the necessary resource IDs.

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

# Parameters

<table border="1" id="bkmrk-par%C3%A1metro-descripci%C3%B3" style="border-collapse: collapse; width: 100%; height: 401px;"><tbody><tr style="height: 29px;"><td style="width: 50%; height: 29px;">**Parameter**</td><td style="width: 50%; height: 29px;">**Description**</td></tr><tr><td style="width: 50%;">--tentacle\_port</td><td style="width: 50%;">Tentacle port (default 41121)(optional)</td></tr><tr><td style="width: 50%;">--tentacle\_address</td><td style="width: 50%;">Ip of the tentacle server to send the data to (optional)</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--agent\_name</td><td style="width: 50%; height: 29px;">To name the agent that will contain the modules, by default : "Azure monitor". (optional)</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--prefix\_module</td><td style="width: 50%; height: 29px;">To prefix the modules in case you want to differentiate them from other executions (optional).</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">--conf</td><td style="width: 50%; height: 29px;">Path of the conf file with the queries (required)</td></tr><tr style="height: 29px;"><td style="width: 50%; height: 29px;">-g,--group</td><td style="width: 50%; height: 29px;">Pandora FMS target group (optional)</td></tr><tr style="height: 46px;"><td style="width: 50%; height: 46px;">--data\_dir</td><td style="width: 50%; height: 46px;">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;">--as\_agent\_plugin</td><td style="width: 50%; height: 63px;">It is optional, if you want the plugin to be an agent plugin and put the modules in the pandora agent, execute this with a 1 (optional)</td></tr></tbody></table>

# Manual execution

As an agent plugin

```
./pandora_azure -c <path_conf>
```

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

As a server plugin

```
./pandora_azure -c <path_conf> --as_agent_plugin 1 [--data_dir <path> --agent_name <nombre del agente>]
```

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

# Configuration in pandora

As a server plugin

Installation from console

To register the plugin, from the console, go to the "register plugin" section.

**[![register_plugin.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register-plugin.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register-plugin.png)**

Click on select file.

**[![register_plugin2.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register-plugin2.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register-plugin2.png)**

Select the pspz2 file that contains the plugin

**[![register1_azure.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register1-azure.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register1-azure.png)**

A message will appear indicating whether the registration has been successful.

**[![register2_azure.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register2-azure.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register2-azure.png)**

Once the plugin is registered, we will see it in the plugins section.

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

Click on the title to access the plugin menu.

[![register3_azure.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register3-azure.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register3-azure.png)

In parameters, we will see all the parameters of the plugin, remember that not all of them are mandatory, only in the ones that are specified

[![register4_azure.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register4-azure.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register4-azure.png)

Below, in the parameter macros we can add the required value.

[![register5_azure.png](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/scaled-1680-/register5-azure.png)](https://pandorafms.com/guides/public/uploads/images/gallery/2022-04/register5-azure.png)

Manual installation

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)

We put the name and description of your choice:

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

We enter as command the execution with the path of the plugin:

```
/path_pandora_azure
```

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

And in plugin parameters we will introduce these followed by the macro "\_field\_", the mandatory ones for the plugin to work are -c and --as\_agent\_plugin (in case we want to run it as a server plugin, otherwise the latter is not essential.

We will define these with the macros below.

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

Once this is done, click on "create".

You can check that you have entered the values correctly by executing the terminal preview command

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

If it does not give errors it is that it has been introduced well.

Once this is done, the only thing left to do is to call it, so we will go to the view of some agent and create a module of complements:

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

We will give it a name and in the section "plugin" we will put the one we have just configured.

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

Once this is done, click on create.

If the module is shown with 1, it means that it is running correctly.

# Modules generated by the plugin

**Agentes**

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

**Agente Storage account**

<table border="1" id="bkmrk-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">UsedCapacity</td></tr><tr><td style="width: 100%;">Ingress</td></tr><tr><td style="width: 100%;">Egress</td></tr><tr><td style="width: 100%;">Transactions</td></tr><tr><td style="width: 100%;">Availity</td></tr><tr><td style="width: 100%;">SucessE2ELatency</td></tr><tr><td style="width: 100%;">SucessServerLatency</td></tr></tbody></table>

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

**Agente blobs**

<table border="1" id="bkmrk-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-" style="border-collapse: collapse; width: 100%; height: 319px;"><tbody><tr style="height: 29px;"><td style="width: 100%; height: 29px;">BlobCapacity</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">BlobCount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">ContainerCount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Availity</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Indexcapacity</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Ingress</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Egress</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Transactions</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SuccessE2ELatency</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SucessServerLatency</td></tr></tbody></table>

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

**Agente files**

<table border="1" id="bkmrk-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0--0" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">FIleCapacity</td></tr><tr><td style="width: 100%;">FileCount</td></tr><tr><td style="width: 100%;">Availity</td></tr><tr><td style="width: 100%;">FileShareCapacityQuota</td></tr><tr><td style="width: 100%;">FileShareCount</td></tr><tr><td style="width: 100%;">FileShareSnapshotCount</td></tr><tr><td style="width: 100%;">FileShareSnapshotSize</td></tr><tr><td style="width: 100%;">Ingress</td></tr><tr><td style="width: 100%;">Egress</td></tr><tr><td style="width: 100%;">SucessServerLatency</td></tr><tr><td style="width: 100%;">SuccessE2ELatency</td></tr><tr><td style="width: 100%;">Transactions</td></tr></tbody></table>

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

**Agente tables**

<table border="1" id="bkmrk-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">TableCapacity</td></tr><tr><td style="width: 100%;">TableCount</td></tr><tr><td style="width: 100%;">TableentityCount</td></tr><tr><td style="width: 100%;">Transaction</td></tr><tr><td style="width: 100%;">Availity</td></tr><tr><td style="width: 100%;">Ingress</td></tr><tr><td style="width: 100%;">Egress</td></tr><tr><td style="width: 100%;">SucessServerLatency</td></tr><tr><td style="width: 100%;">SucessE2ELatency</td></tr></tbody></table>

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

**Agente datalake storage**

<table border="1" id="bkmrk-blobcapacity-blobcou" style="border-collapse: collapse; width: 100%; height: 319px;"><tbody><tr style="height: 29px;"><td style="width: 100%; height: 29px;">BlobCapacity</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">BlobCount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">ContainerCount</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Availity</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Indexcapacity</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Ingress</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Egress</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">Transactions</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SuccessE2ELatency</td></tr><tr style="height: 29px;"><td style="width: 100%; height: 29px;">SucessServerLatency</td></tr></tbody></table>

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

**Agente queue**

<table border="1" id="bkmrk-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-%C2%A0-0" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">QueueCount</td></tr><tr><td style="width: 100%;">QueueCapacity</td></tr><tr><td style="width: 100%;">Availity</td></tr><tr><td style="width: 100%;">QueueMessageCount</td></tr><tr><td style="width: 100%;">Transaction</td></tr><tr><td style="width: 100%;">Ingress</td></tr><tr><td style="width: 100%;">Egress</td></tr><tr><td style="width: 100%;">SuccessE2ELatency</td></tr><tr><td style="width: 100%;">SuccessServerLatency</td></tr></tbody></table>

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