Azure Elastic Pool
Overviewβ
Azure SQL Database elastic pools are a simple, cost-effective solution for managing and scaling multiple databases that have varying and unpredictable usage demands. The databases in an elastic pool are on a single server and share a set number of resources at a set price.
The Centreon Monitoring Connector Azure Elastic Pool can rely on Azure API or Azure CLI to collect the metrics related to the Elastic Pool service.
Monitoring Connector Assetsβ
Monitored Objectsβ
- Azure SQL Elastic Pools
Discovery rulesβ
The Centreon Monitoring Connector Azure Elastic Pool includes a Host Discovery provider to automatically discover Elastic Pools of a given subscription and add them to the Centreon configuration. This provider is named Microsoft Azure SQL Elastic Pool:
This discovery feature is only compatible with the 'api' custom mode. 'azcli' is not supported yet.
More information about the Host Discovery module is available in the Centreon documentation: Host Discovery
Collected Metricsβ
- Cpu
- Dtu
- Log
- Sessions
- Storage
These metrics are only relevant for vCore based Pools
Metric name | Description | Unit |
---|---|---|
elasticpool.cpu.limit.count | CPU limit | Count |
elasticpool.cpu.usage.percentage | CPU percentage | % |
elasticpool.cpu.used.count | CPU used | Count |
These metrics are only relevant for DTU based Pools
Metric name | Description | Unit |
---|---|---|
elasticpool.dtu.consumpution.percentage | DTU percentage | % |
elasticpool.edtu.limit.count | eDTU limit | Count |
elasticpool.edtu.used.count | eDTU used | Count |
Metric name | Description | Unit |
---|---|---|
elasticpool.log.write.percentage | Log IO percentage | % |
elasticpool.log.tempdb.size.kilobytes | Tempdb Log File Size Kilobytes | KB |
elasticpool.log.tempdb.usage.percentage | Tempdb Percent Log Used | % |
Metric name | Description | Unit |
---|---|---|
elasticpool.sessions.usage.percentage | Sessions percentage | % |
elasticpool.workers.usage.percentage | Workers percentage | % |
Metric name | Description | Unit |
---|---|---|
elasticpool.storage.data.allocated.bytes | Data space allocated | B |
elasticpool.storage.data.allocated.percentage | Data space allocated percent | % |
elasticpool.storage.used.bytes | Data space used | B |
elasticpool.storage.usage.percentage | Data space used percent | % |
Prerequisitesβ
Please find all the prerequisites needed for Centreon to get information from Azure in the dedicated page.
Setupβ
- Online License
- Offline License
- Install the Centreon package on every Centreon poller expected to monitor Azure Elastic Pool resources:
yum install centreon-plugin-Cloud-Azure-Database-Elasticpool-Api
- On the Centreon Web interface, install the Azure Elastic Pool Centreon Monitoring Connector on the Configuration > Monitoring Connectors Manager page
- Install the Centreon package on every Centreon poller expected to monitor Azure Elastic Pool resources:
yum install centreon-plugin-Cloud-Azure-Database-Elasticpool-Api
- Install the Centreon Monitoring Connector RPM on the Centreon Central server:
yum install centreon-pack-cloud-azure-database-elasticpool.noarch
- On the Centreon Web interface, install the Azure Elastic Pool Centreon Monitoring Connector on the Configuration > Monitoring Connectors Manager page
Configurationβ
Hostβ
Log into Centreon and add a new Host through "Configuration > Hosts".
In the IP Address/FQDN field, set the following IP address: '127.0.0.1'.
Select the Cloud-Azure-Database-Elasticpool-custom template to apply to the Host.
Once the template applied, some Macros marked as 'Mandatory' hereafter have to be configured. These mandatory Macros differ regarding the custom mode used:
- Azure Monitor API
- Azure AZ CLI
Mandatory | Nom | Description |
---|---|---|
X | AZURECUSTOMMODE | Custom mode 'api' |
X | AZURESUBSCRIPTION | Subscription ID |
X | AZURETENANT | Tenant ID |
X | AZURECLIENTID | Client ID |
X | AZURECLIENTSECRET | Client secret |
X | AZURERESOURCE | Id of the Elastic Pool resource (syntax: <server_name>/elasticpool/<elasticpools_name>) |
Mandatory | Nom | Description |
---|---|---|
X | AZURECUSTOMMODE | Custom mode 'azcli' |
X | AZURESUBSCRIPTION | Subscription ID |
X | AZURERESOURCE | Id of the Elastic Pool resource (syntax: <server_name>/elasticpool/<elasticpools_name>) |
FAQβ
How to check in the CLI that the configuration is OK and what are the main options for ?β
Once the Plugin installed, log into your Centreon Poller CLI using the centreon-engine user account and test the Plugin by running the following command:
/usr/lib/centreon/plugins/centreon_azure_database_elasticpool_api.pl \
--plugin=cloud::azure::database::elasticpool::plugin \
--mode=sessions \
--custommode=api \
--subscription='xxxxxxxxx' \
--tenant='xxxxxxxxx' \
--client-id='xxxxxxxxx' \
--client-secret='xxxxxxxxx' \
--resource='SQLSRV001/elasticpools/SQLELP001' \
--timeframe='900' \
--interval='PT5M' \
--aggregation='average' \
--warning-sessions-percent='80' \
--critical-sessions-percent='90' \
--verbose
Expected command output is shown below:
OK: Elastic Pool 'SQLSRV001/SQLELP001' Statistic 'average' Metrics Workers usage percentage: 0.03 %, Sessions usage percentage: 0.00 % |
'SQLSRV001/SQLELP001~average#elasticpool.workers.usage.percentage'=0.03%;;;; 'SQLSRV001/SQLELP001~average#elasticpool.sessions.usage.percentage'=0.00%;;;;
Checking Pool'SQLSRV001/SQLELP001'
Statistic 'average' Metrics Workers usage percentage: 0.03 %, Sessions usage percentage: 0.00 %
The command collects the metrics of an Azure Elastic Pool sessions using the 'api' custom-mode
(--plugin=cloud::azure::database::elasticpool::plugin --mode=sessions --custommode=api
).
This Elastic Pool is identified by its id (--resource='SQLSRV001/elasticpools/SQLELP001'
) and the authentication parameters
to be used with the custom mode are specified in the options (--subscription='xxxxxxxxx' --tenant='xxxxxxx'
--client-id='xxxxxxxx' --client-secret='xxxxxxxxxx'
).
The calculated metrics are an average (--aggregation='average'
) of values on a 900 secondes / 15 min period (--timeframe='900'
)
with one sample per 5 minutes (--interval='PT5M'
).
This command would trigger a WARNING alarm if the number of sessions during the period is over 80% of the Pool capacity
(--warning-sessions-percent='80'
) and a CRITICAL alarm over 90% (--critical-sessions-percent='90'
).
All the available options for a given mode can be displayed by adding the --help
parameter to the command:
/usr/lib/centreon/plugins/centreon_azure_database_elasticpool_api.pl \
--plugin=cloud::azure::database::elasticpool::plugin \
--mode=sessions \
--help
Troubleshootingβ
UNKNOWN: Login endpoint API returns error code 'ERROR_NAME' (add --debug option for detailed message)
β
When I run my command I obtain the following error message:
UNKNOWN: Login endpoint API returns error code 'ERROR_NAME' (add --debug option for detailed message)
.
It means that some parameters used to authenticate the API request are wrong. The 'ERROR_NAME' string gives some hints about where the problem stands.
As an example, if my Client ID or Client Secret are wrong, 'ERROR_DESC' value will be 'invalid_client'.
The Azure credentials have changed and the Plugin does not work anymoreβ
The Plugin is using a cache file to keep connection information and avoid an authentication at each call. If some of the authentication parameters change, you must delete the cache file.
The cache file can be found within /var/lib/centreon/centplugins/
folder with a name similar to azureapi<md5>_<md5>_<md5>_<md5>
.
UNKNOWN: 500 Can't connect to login.microsoftonline.com:443β
This error message means that the Centreon Plugin couldn't successfully connect to the Azure Login API. Check that no third party
device (such as a firewall) is blocking the request. A proxy connection may also be necessary to connect to the API.
This can be done by using this option in the command: --proxyurl='http://proxy.mycompany:8080'
.