cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

SAM Template for monitoring Azure APIM

Hi

I am looking to monitor our Azure APIM within Solarwinds, Has anybody attempted this yet or created a template for it, before I try to hack one together?

Thanks

Steve

Tags (2)
0 Kudos
1 Reply

Here is the list of metrics that Azure provides for API Management: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftapimanageme...

If those are enough for you the easiest option would be to use SAM API Poller functionality to monitor the metrics.

There is no Out-of-the-box API Poller template for it, but there is an easy was to create a new API Poller that meet your needs:

1. As API Poller needs to be linked to a Node, go to a Node (details page) that would be a good candidate or create a new one (External node is a good option)

2. Click "Create" option under "API Poller Management"

3. Go to Configure option in the right top corner and setup Authorization

4. Select OAuth 2.0 and provide your credential configured in Azure (see: https://thwack.solarwinds.com/t5/SAM-Discussions/API-Poller-Azure-REST-API/m-p/592327/highlight/true...) and click "Save"

5. In request URL paste following URL

https://management.azure.com/RESOURCE_ID/providers/microsoft.insights/metrics?interval=PT5M&metricna...

where

RESOURCE_ID is Resource ID that you could find in the APIM Properties in Azure

Sample URL: 

https://management.azure.com/subscriptions/951c996c-859e-446a-8fc0-87b753c94dd0/resourceGroups/dashb...

6. Click "Send request" button to retrieve response in JSON format

7. Find the metrics you want to monitor by expanding proper tree items in the API response, sample path:  $.['value'][0].['timeseries'][0].['data'][11].['average'] and click monitor icon (marked with red below):

Azure APIM.png

The option allows you to name the metric and set thresholds.

8. Save the API Poller and enjoy collected metrics and alerts when threshold are reached!

9. Metrics Data is presented on Perfstack, the easiest option to see it is to click on the "API Pollers" widget that will be visible on the Node details page.

 

Note that the example above has two metrics only: metricnames=BackendDuration,Capacity but you can add more in the URL if needed. This document provides all available metrics: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftapimanageme...

Ensure your API Management service in Azure has proper role assigned (Reader role is enough). You can check it your service in API Management service -> Access control (IAM)

Let me know if that works for you.

0 Kudos