Pandora Azure SQL

Plugin for monitoring an AzureSQL database

Introduction

Ver. 11-05-2022

With this plugin you can monitor an azureSQL database and extract data from it.
Type: Server plug-in

Compatibility matrix

Systems where tested

CentOS 7, Fedora, rocky linux

Systems where it should work

Cualquier sistema linux 

 

Pre requisites

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

Previous configuration

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

#credentials
tenant_id:<tenant-id>
client_id:<client-id>
secret:<secret>
#id resources
database_id:<database_resource_id>

Obtaining credentials necessary for the use of the plugin.

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 :

- Database resource id

Obtaining tenant id and client id.

1. To obtain the tenant id and the client id, we will go to the application 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 will be able to see the secret keys or generate them (it has to be the key value, not the id).

menu5.png

 

Obtaining the resource id of the database.

In the database, in general information, we can see the resource id of the database by clicking on json view.

 

image-1652285449723.png

 

 

Parameters

Parámetro Descripción
--tentacle_port Tentacle port (default 41121)(optional)
--tentacle_address Ip of the tentacle server to send the data (optional)
--agent_name To name the agent that will contain the modules, by default: "Azure SQL" (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

Example of manual execution:

./pandora_azuresql -c <path_conf>

image-1652284119687.png

./pandora_azure -c <path_conf> --as_agent_plugin 1 [--data_dir <path> --agent_name <agent name>]

image-1652283880334.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

image-1652351401344.png

Nos saldrá un mensaje que indicará si se ha registrado correctamente

image-1652351503518.png

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

serversingles.png

Click on the title to access the plugin menu.

image-1652351575064.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

image-1652351615625.png

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

register5_azure.png

 

Manual installation

Go to servers > plugins:

image-1629974405286.png

Click on add: