Azure Microsoft Compute
This document describes the Azure Microsoft Compute functionality of PandoraFMS discovery.
- Introduction
- Compatibility matrix
- Prerrequisites
- Parameters and configuration
- Manual execution
- Discovery
- Agents and modules generated by the plugin
Introduction
The purpose of this plugin is to monitor instances and regions of Azure Microsoft Compute, using key metrics related to the CPU, networks, IOPS and disks that are essential to control and monitor these machines and to guarantee optimal performance, solve problems, plan the scaling, meeting SLAs and improving security.
The plugin connects to the Azure API and monitors zones and instances using the aforementioned metrics, generating an agent for each zone and instance via XML that is sent to the Pandora server.
Compatibility matrix
Systems where it has been tested | Rocky linux, Fedora 34 |
Systems where it works | Any linux system |
Prerrequisites
- Azure API Connectivity
The plugin is a binary that contains packaged dependencies so it is not necessary to install any type of dependency for its use.
- Credentials
SUBSCRIPTION_ID
Go to your subscription, you can find the subscription ID, in the top menu.
TENANT_ID
To get the tenant ID. Go to the azure Portal and search for "Entra Id". On the Overview overview page.The Directory (tenant) ID is displayed. Copy this ID. That's your tenant ID.
.
CLIENT_ID AND SECRET
For the Client ID and secret, you will need to create these as a app registration.
To create a new App registration you will need to follow the steps here:
https://learn.microsoft.com/en-us/azure/healthcare-apis/register-application
On there you will get the Application ID (Client ID) and create also the Client Secret. You can then copy the values and use.
- Permissions
To make requests through the API, the account used to authenticate during execution requires certain permissions.
Permission Assignment
You must assign a role to the account with which you are going to operate the app. To do this, go to Home and enter Subscription:
Within the subscription, select Access control (IAM):
A new role assignment will be added in which you must select Reader for the created app:
The created app can be searched in members (main service)
Save your changes by clicking Save.
From that moment on you will be able to connect with the service and make requests through this plugin.
Parameters and configuration
Parameters
--conf | Path to configuration file |
Configuration file (--conf)
agents_group_name = < Name of the target group for the created agents >
threads = < Number of execution threads, each zone/instance will be equally distributed in the number of threads >
interval = < Interval in seconds for agents and for metric analysis >
transfer_mode = < Transfer mode, tentacle or local >
tentacle_ip = < IP of the target machine for the created agents >
tentacle_port = <tentacle port, default: 41121>
tentacle_opts = < Tentacle client additional options >
data_dir = < (Only activated if the transfer_mode is local) Destination path for the XML of each agent, by default "/var/spool/pandora/data_in/" >
advance_monitoring = < Activate with 1 to enable generalized monitoring (these modules will only be created in the agents of the instances that are running) >
cpu_summary = < Enable with 1 to enable CPU monitoring >
iops_summary = < Enable with 1 to enable IOPS monitoring >
disk_summary = < Enable with 1 to enable disk monitoring >
network_summary = < Enable with 1 to enable network monitoring >
stats_agent = < Activate with 1 to enable a global agent that will monitor based on the task created and the parameters used >
stats_agent_name = < Name for the agent that is activated with the "stats_agent" parameter. If you do not use and "stats_agent" is enabled, the agent will be called "azure" by default > >
azure_zones = < List with the zones to monitor (when a zone is marked to monitor, it automatically monitors all the instances found within that zone) >
azure_instances = = < List with the instances to monitor >
creds_b64 = < Base64 credentials in the JSON file to authenticate >
Example:
agents_group_name = azure
interval = 3600
threads = 5
transfer_mode = tentacle
tentacle_client = tentacle_client
tentacle_ip = 172.42.42.101
tentacle_port = 41121
data_dir = /var/spool/pandora/data_in/
advance_monitoring = 1
cpu_summary = 1
iops_summary = 1
disk_summary = 1
network_summary = 1
stats_agent = 1
stats_agent_name = azureCloud
azure_zones = ["uksouth","ukwest"]
azure_instances = ["instance-1","instance-2","instance-3",instance-4"]
creds_b64 = oiZJDNNJKCDJndkdKDNJDKDKNDhjdkdmdNHFJFKfFMFNFJFKk5IinDJFJKFKfmnfDHHDKDKDldjjDfmFJFNFFMNFNFMFNFmFNFFJJFmf==
Manual execution
The plugin execution format is as follows:
./pandora_azure_mc --conf < path to configuration file >
For example:
./pandora_azure_mc --conf /usr/share/pandora_server/util/plugin/azure.conf
The execution will return an output in JSON format with information about the execution, and will generate an XML file for each monitored agent that will be sent to the Pandora FMS server by the transfer method indicated in the configuration.
For example:
{"summary": {"Total agents": 35, "Zones agents": 5, "Instances agents": 29}}
Discovery
This plugin can be integrated with Pandora FMS Discovery.
To do this, you must load the ".disco" package that you can download from the Pandora FMS library:
https://pandorafms.com/library/
Once loaded, Azure Microsoft Compute environments can be monitored by creating Discovery tasks from the Management > Discovery > Cloud section.
For each task, the following minimum data will be requested:
- Azure credentials: Connection credentials to the Microsoft Azure API to be used by the task. They must be previously registered in the Pandora FMS credential store.
- Max threads: To optimize the execution time, multiple threads can be configured to monitor the agents of the task. Keep in mind that setting up multiple threads can increase the CPU usage of the task.
- Tentacle IP – Tentacle server IP to send agent data to. Normally this parameter will not be modified.
- Tentacle port: Tentacle server port to send data to. Normally this parameter will not be modified.
- Tentacle extra options: Additional options for sending data through the Tentacle client. Normally this parameter will not be modified.
- Add global stats agent: If activated, a global agent will be generated with task statistics.
- Stats agent name: It will allow you to indicate the name of the agent for global statistics of the task. If no name is provided, the default name of the plugin will be used.
If the credentials provided are correct and the Pandora FMS server is able to connect to the Microsfot Azure API, you will be able to see a tree with Azure Microsoft Compute zones and instances, which can be marked for monitoring.
If a zone is selected, in addition to the zone itself, all the instances it contains will be monitored (both at the time of configuring the task and later if new instances are included).
If specific instances are selected, they will be monitored regardless of whether their zones have not been selected.
Finally, you can adjust the monitoring you want to obtain for each agent:
- Scan and general monitoring: If activated, the task will be enabled to obtain additional monitoring for the agents, described in the following fields.
- Cpu performance summary: If enabled, the CPU performance modules will be included in the monitoring.
- IOPs Performance summary: If enabled, the IOPs performance modules will be included in the monitoring.
- Disk performance summary: If enabled, the disk performance modules will be included in the monitoring.
- Network performance summary; If enabled, the network performance modules will be included in the monitoring.
Tasks that are successfully completed will have an execution summary with the following information:
- Total agents: Total number of agents generated by the task.
- Zones agents: Total number of zone agents generated by the task.
- Instances agents: Total number of instance agents generated by the task.
The tasks that are not completed successfully will have an execution summary recording the errors produced.
Agents and modules generated by the plugin
Running the plugin will create the following agents and modules:
- Global agent
< Name used with the parameter "stats_agent_name" or failing that "azure" > |
Modules
Azure MC Instances count
|
Number of total instances monitored by the plugin |
- One agent for each monitored area.
<Zone name> |
Modules
summary.azure.compute.CPUUtilization | Average CPU percentage used for instances in this zone |
summary.azure.compute.DiskReadBytes | Summary of the number of bytes read from disk for each instance of this zone |
summary.azure.compute.DiskReadOps | Summary of the number of read operations performed on the disk of each instance of this zone |
summary.azure.compute.diskWriteBytes | Summary of the number of bytes written to disk for each instance of this zone |
summary.azure.compute.DiskWriteOps | Summary of the number of write operations performed on the disk for each instance in this zone |
summary.azure.compute.instances | Number of instances monitored in this zone |
summary.azure.compute.NetworkPacketsIn | Summary of the number of incoming network packets for each instance of this zone |
summary.azure.compute.NetworkPacketsOut | Summary of the number of outgoing network packets for each instance in this zone |
- One agent for each monitored instance
< Resource group name >/< Instance name > |
Modules
State | Machine status, in string format |
Instance State (bool) | Machine status, 1 if it is running, 0 if this is not the case |
CPUUtilization | CPU usage percentage used |
DiskReadBytes | Number of bytes read from disk |
DiskReadOps | The number of read operations performed on the disk |
DiskWriteBytes | Number of bytes written to disk |
DiskWriteOps | Number of write operations performed on the disk |
NetworkPacketsIn | The number of incoming network packets |
NetworkPacketsOut | The number of outgoing network packets |