Azure Cache for Redis
Overviewā
Azure Cache for Redis provides an in-memory data store based on the Redis software. Redis improves the performance and scalability of an application that uses backend data stores heavily. It's able to process large volumes of application requests by keeping frequently accessed data in the server memory, which can be written to and read from quickly. Redis brings a critical low-latency and high-throughput data storage solution to modern applications.
The Centreon Monitoring Connector Azure Cache for Redis can rely on Azure API or Azure CLI to collect the metrics related to the Redis service.
Pack Assetsā
Monitored Objectsā
- Azure Cache for Redis instances
- Cache-Latency
- Cache-Throughput
- Cache-Usage
- Clients
- Cpu
- Discovery
- Errors
- Health
- Load
- Memory
- Operations
Discovery rulesā
The Centreon Monitoring Connector Azure Cache for Redis includes a Host Discovery provider to automatically discover the Azure instances of a given subscription and add them to the Centreon configuration. This provider is named Microsoft Azure Cache for Redis:
This discovery feature is only compatible with the 'api' custom mode. 'azcli' is not supported.
More information about the Host Discovery module is available in the Centreon documentation: Host Discovery
Collected metrics & statusā
- Cache-Latency
- Cache-Throughput
- Cache-Usage
- Clients
- Cpu
- Errors
- Health
- Load
- Memory
- Operations
Metric Name | Description | Unit |
---|---|---|
redis.cache.latency.microseconds | Cache Latency | μs |
Metric Name | Description | Unit |
---|---|---|
redis.cache.read.throughput.bytespersecond | Cache Read Throughput | B/s |
redis.cache.write.throughput.bytespersecond | Cache Write Throughput | B/s |
Metric Name | Description | Unit |
---|---|---|
redis.cache.hits.count | Cache Hits | Count |
redis.cache.misses.count | Cache Misses | Count |
Metric Name | Description | Unit |
---|---|---|
redis.cache.clients.connected.count | Connected Clients | Count |
Metric Name | Description | Unit |
---|---|---|
redis.cache.cpu.usage.percentage | CPU Usage Percentage | % |
Metric Name | Description | Unit |
---|---|---|
redis.cache.errors.count | Errors | Count |
Status Name | Description |
---|---|
status | Current operational status |
summary | Last related status message |
Metric Name | Description | Unit |
---|---|---|
redis.cache.server.load.percentage | Server Load | % |
Metric Name | Description | Unit |
---|---|---|
redis.cache.memory.usage.percentage | Memory Usage Percentage | % |
Metric Name | Description | Unit |
---|---|---|
redis.cache.operations.persecond | Operations per seconds | op/s |
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 Cache for Redis resources:
yum install centreon-plugin-Cloud-Azure-Database-Redis-Api
- On the Centreon Web interface, install the Azure Cache for Redis Centreon Monitoring Connector on the Configuration > Monitoring Connector Manager page
- Install the Centreon package on every Centreon poller expected to monitor Azure Cache for Redis resources:
yum install centreon-plugin-Cloud-Azure-Database-Redis-Api
- Install the Centreon Monitoring Connector RPM on the Centreon Central server:
yum install centreon-pack-cloud-azure-database-redis.noarch
- On the Centreon Web interface, install the Azure Cache for Redis Centreon Monitoring Connector on the Configuration > Monitoring Connector 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-Redis-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.
Two methods can be used to set the Macros:
- full ID of the Resource (
/subscriptions/<subscription_id>/resourceGroups/<resourcegroup_id>/providers/Microsoft.Network/<resource_type>/<resource_name>
) in AZURERESOURCE- Resource Name in AZURERESOURCE associated with Resource Group (in AZURERESOURCEGROUP) and Resource Type (in AZURERESOURCETYPE)
- 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 or name of the Redis resource |
AZURERESOURCEGROUP | Associated Resource Group if resource name is used | |
X | AZURERESOURCETYPE | Associated Resource Type if resource name is used |
Mandatory | Nom | Description |
---|---|---|
X | AZURECUSTOMMODE | Custom mode 'azcli' |
X | AZURESUBSCRIPTION | Subscription ID |
X | AZURERESOURCE | ID or name of the Redis resource |
X | AZURERESOURCEGROUP | Associated Resource Group if resource name is used |
X | AZURERESOURCETYPE | Associated Resource Type if resource name is used |
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_redis_api.pl \
--plugin=cloud::azure::database::redis::plugin \
--mode=cache-latency \
--custommode=api \
--subscription='xxxxxxxxx' \
--tenant='xxxxxxxxx' \
--client-id='xxxxxxxxx' \
--client-secret='xxxxxxxxx' \
--resource='REDIS001ABCD' \
--resource-group='RSG1234' \
--timeframe='900' \
--interval='PT5M' \
--aggregation='Average' \
--warning-cache-latency='8000' \
--critical-cache-latency='9000'
Expected command output is shown below:
OK: Instance 'REDIS001ABCD' Statistic 'average' Metrics Cache Latency: 1206.15μs | 'REDIS001ABCD~average#redis.cache.latency.microseconds'=1206.15μs;;;0;
The command above checks the Cache Latency time of an Azure Azure Cache for Redis instance using the 'api' custom-mode
(--plugin=cloud::azure::database::redis::plugin --mode=cache-latency --custommode=api
).
This instance is identified by its id (--resource='REDIS001ABCD'
) and its associated group (--resource-group='RSG1234'
).
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 the average values (--aggregation='Average'
) of 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 Cache Latency time is reported as over 8000µs (--warning-cache-latency='8000'
)
and a CRITICAL alarm over 9000µs (--critical-cache-latency='8000'
).
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_redis_api.pl \
--plugin=cloud::azure::database::redis::plugin \
--mode=cache-latency \
--help
Troubleshootingā
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: 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'.
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'
.
UNKNOWN: No metrics. Check your options or use --zeroed option to set 0 on undefined values
ā
This command result means that Azure does not have any value for the requested period.
This result can be overriden by adding the --zeroed
option in the command. This will force a value of 0 when no metric has
been collected and will prevent the UNKNOWN error message.