Pandora Azure Storage

With this plugin you can monitor a storage account and retrieve data from it, from the blob storage, queue storage and file 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

Systems where tested

CentOS 7, Fedora, rocky linux

Systems where it should work

Any linux system

 

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, subscription id, client id and connection string.

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.

#credentials
tenant_id:<tenant_id>
client_id:<client_id>
secret:<secret>
#id resources
account_id:<account_id>
blobservice_id:<blobservice_id>
fileservice_id:<fileservice_id>
queueservice_id:<queueservice_id>
tableservice_id:<tableservice_id>
datalakestorage_id:<datalakestorage_id>
#active agents
account_agent:1
blobservice_agent:1
fileservice_agent:1
queueservice_agent:1
tableservice_agent:1
datalakestorage_agent:1

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

2. We will enter inside the application.

menu2.png

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

menu3.png

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

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

 

 

 

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

Inside we will find the resource id.

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

Inside you will find all the necessary resource IDs.

image-1651844159743.png

Parámeters

Parámetro Descripción
--tentacle_port Tentacle port (default 41121)(optional)
--tentacle_address Ip of the tentacle server to send the data to (optional)
--agent_name To name the agent that will contain the modules, by default : "Azure monitor". (optional)
--prefix_module To prefix the modules in case you want to differentiate them from other executions (optional).
--conf Path of the conf file with the queries (required)
-g,--group Pandora FMS target group (optional)
--data_dir Pandora FMS data directory. By default it is /var/spool/pandora/data_in/ (optional)
--as_agent_plugin 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)

 

Manual execution

As an agent plugin

./pandora_azure -c <path_conf>

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

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

Click on select file.

register_plugin2.png

Select the pspz2 file that contains the plugin

register1_azure.png

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