Come join our live training webinar every other Wednesday at 11am PST and hear LogicMonitor experts explain best practices and answer common questions. We understand these are uncertain times, and we are here to help!
LogicMonitor DataSources that use the ‘Azure Insights’ collection method can be customized to collect additional metrics, different aggregation methods, or metrics with specific dimensions. The JSON path field in each datapoint controls which parameters get passed by LogicMonitor’s Cloud Collector into the Azure Monitor API request.
To add dimensions to a new or an existing DataSource, complete the following steps:1. Navigate to Settings > LogicModules > DataSources and search for the Azure API Management DataSource.
2. Click Add DataPoint.
3. Select the Normal datapoint option.4. Enter the datapoint name and add the dimension parameter in the JSON path field.
The JSON path has a predictable format, with three possible values delimited by ‘.’:
Note: ##primaryAggregation## can be used to dynamically pass in the Azure supported aggregation, as not all aggregations are supported for all metrics at all times.
There are several tokens that you can use here. For a complete list of the supported tokens, see Tokens Available for Data Collection.
The aggregation type available for the Requests metric is Total. So, the aggregation type Total will replace the token ##primaryaggregation## in the expression and give you the count of successful responses from the gateway.
Simple metric data such as request count does not provide sufficient context for the collected values. Dimensions are name-value pairs that carry supplementary data to describe the metric value. For example, an Azure API Management service metric – FailedRequests supports the dimension Location. So with the Location dimension, you can view the failed requests across all the locations or for an individual location.
The Azure API Management (APIM) service is a hybrid,multi-cloud management platform for APIs across all environments. Azure Monitor provides several useful multi-dimensional metrics for the Azure API Management service.
To create an instance, complete the following steps:
az group create --name apim-rg --location centralus
az apim create --name lm-apim --resource-group apim-rg \
--publisher-name LM --publisher-email [email protected] \
Note: The Azure quickstart guide describes several other alternatives for creating an APIM instance such as the management portal, PowerShell, and ARM template.
az apim show --name lm-apim --resource-group apim-rg --output table
Note: You can use the Echo API to test the metrics.
Once you have created an instance, you can configure the APIM DataSource in LogicMonitor to ingest a multi-dimensional metric.
Now that you have an API Management instance and LogicMonitor recording the metrics, let’s generate some metrics from the API Management service.
1. On the API Management service, navigate to APIs > Echo API. Click Retrieve resource GET endpoint and click on the Test tab.
2. Use the integrated test console to send a few HTTP requests to the service.
3. In LogicMonitor, navigate to the Resources page, and select your API Management resource.
4. Click on the Raw Data tab where you will find the new metric and the aggregated values.
5. To view the request that LogicMonitor made to fetch the value of the new metric, click Poll Now and scroll to the Raw Request/Response section.You will find the API request from LogicMonitor and the response from Azure Monitor as displayed in the following image:
In This Article