New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Rest Sensor - follow redirects

Votes:

0

Your Vote:

Up

Down

I'm trying to get the REST Sensor to work with Nest, using Postman it works perfectly. I have the Authorisation code and the URL. With PRTG I get "expected status 200 OK but got 401 Unauthorized.". From reading the nest site this is likely to be that PRTG isn't following the redirect URL given back to it for the initial response.

https://developer-api.nest.com/devices/thermostats is the URL Sending either Authorisation settings or a custom header with the Bearer code fails.

https://developers.nest.com/reference/error-messages towards the bottom (under 401) implies Nest are using redirection: https://developers.nest.com/guides/api/how-to-handle-redirects supports this.

Does the REST sensor follow redirects? And is there a way of making this work?

Thanks!

http-xml-rest-value prtg rest

Created on Nov 18, 2018 6:56:56 PM by  Michael Kennedy (0) 1



3 Replies

Votes:

0

Your Vote:

Up

Down

As of right now, the sensor is not following redirects, unfortunately. It's successor will, but it will take quite some time until it's finished. I'm afraid that you'll need to use PowerShell and Invoke-WebRequest to query the Nest Thermostat(s) for now.


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Nov 19, 2018 11:36:09 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks for the clarification.

As a work-around I'm using the curl command in a scheduled task to pull the json file every few minutes and upload that to a local webserver. I'm them querying this with PRTG. Works quite nicely, but not elegantly.

Created on Nov 19, 2018 8:07:01 PM by  Michael Kennedy (0) 1



Votes:

0

Your Vote:

Up

Down

Glad you got a workaround going :) If it works and saved you time, elegance doesn't matter :)


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Nov 20, 2018 6:21:07 AM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.