Has anyone successfully used the API Poller to poll Azure? I'm in desperate need of some help to get this working. Can anyone provide some information on the steps needed to successfully poll Azure (from start to finish)? Please help!
Has anyone successfully used the API Poller to poll Azure? I'm in desperate need of some help to get this working. Can anyone provide some information on the steps needed to successfully poll Azure (from start to finish)? Please help!
sturdyerde Sure thing... I have my GET request all figured out in POSTMAN. The part I am unclear on is how to do I use token based authentication (that expire) in the Solarwinds API Poller? It only uses basic username and PW based authentication.
To give more context, I followed this blog post for my authentication and to create my GET request for the Azure resources I need.
sturdyerde My apologies, see below... This should be very helpful for other people as well.
https://blog.jongallant.com/2017/11/azure-rest-apis-postman/
Not too worried about transfering the GET request and headers to the Orion API Poller, more just trying to figure out how to do the authentication.
A newer resource may be what you need. Azure and the Azure modules have received a lot of updates over the past 2.5 years. One of these two posts may cover what you need.
Also keep in mind that the API polling feature in SAM is very new. The 2020.2 release has a LOT of improvements coming in this area. Keep an eye out for the GA release or try a test installation of the RC.
Not sure if you saw my reply because of how it got posted into the thread. Let me know if the newer walk-throughs help.
Thanks for the response and help! I actually just installed 2020.2 earlier today. It's pretty cool and looks like it may get me past my struggles. Just need to mess around with it a little more. I should have an update over the next few days.
Thanks for the response and help! I actually just installed 2020.2 earlier today. It's pretty cool and looks like it may get me past my struggles. Just need to mess around with it a little more. I should have an update over the next few days.
LatteLarry interested in your outcome. We are still on 2019.4 and a device requires token authorisation
Nice to hear! Also interested in hearing how that works. API polling in 2020.2 looks great, but I won't be able to try it out until GA release.
Ok... First off, I'm very impressed with all of the new features and enhancements of 2020.2. The release was much needed and I'm very happy I upgraded!
The API Poller enhancements have gotten me past some of my struggles with other providers, but I still struggle with the Azure REST API. My struggle is with the OAuth2.0 authentication Azure REST uses.
First Problem
I cannot get my POST request to work in order to obtain the Bearer token. My POST looks like this: https://login.microsoftonline.com/{{tenantId}}/oauth2/token. I replace tenantId with my actual tenant ID. No matter what I try, it returns with a 400 status code saying "The request body must contain the following parameter: 'grant_type'." It doesn't matter what I do to pass grant_type in the body, it doesn't work. Without this, I have no way to get my bearer token for authentication.
Second Problem
Once I finally get my POST to work and it returns with a bearer token, how do I pass it through to my GET requests? Or how do I pass any variables through?
I have to think this has been tested and works? Otherwise, there's no way you can effectively do API Polling against Azure. My GET request does actually work. I can manually generate my bearer token and manually pass it through on my GET requests to Azure for successful responses. The POST and passing variables is the struggle.
serena Is there any way you can ask a developer? I really need this.
sturdyerde Any ideas?
Hey there! I'm so glad you upgraded, and are enjoying all of the improvements. When working with the 2020.2 API poller, have you tried one of the Azure templates as a starter?
clicking Assign
you'll have access to a selection of templates:
Thanks for the response. Yes, I have, but I am not sure how they can work without getting the authentication for Azure REST working successfully. I would love to see how one someone has successfully made the authentication work, whatever method you used.
Hey There!
We're currently doing UX testing for some new features to do with API Pollers that I think you'll be interested in checking out. Please let me know if you have some time coming up to give us your feedback on them - UX sessions take about an hour, you get 3,000 THWACK points and you'll get a sneak peek on what we're working on!
Send me an email if you're interested
carley.cousineau@solarwinds.com
Thanks!
Carley
Thanks ccousineau , I am interested and I sent you a message. I think REST API polling is a critical aspect of modern day monitoring. Also, if you have any advice on how the authentication actually works with Azure REST, then please share. The Azure templates are great and I know the GET requests in them work, but I would like to think the authentication for Azure was tested as well in order to make the templates actually work.
LatteLarry Azure REST requires using OAuth2.0 credential, what is supported by API Poller starting from 2020.2 RC
Here are the steps to configure it:
1. Create API Poller to monitor Azure
2. Go to Configure option
3. Select OAuth2.0 Authorization
4. Click "New credential"
5. Fill all the fields:
Sample configuration below:
Let us know if that helps and if you have any other questions or needs.
What is the URL you would like to use in API Poller request?
jan.rachwalik You nailed it! That absolutely solved the Authentication issues. I very much appreciate you and serena help!! I know this will go a long way in helping other people too.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.