What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

HTTP REST API Sensor how to request access token and embed the value with query in one sensor?

Votes:

0

Hi,

I am doing couple of tests to integrate PRTG with Kaseya REST API. I could get HTTP REST API sensor working but having a problem with generating access token from Kaseya automatically while querying.

Below is steps to reproduce issue:

  1. . Create a HTTP REST API Sensor to request an Access Token from Kaseya server
  2. . Create another HTTP REST API Sensor to actually query including the Access Token (obtained from step 1) in Header field
  3. . With Access Token having validity of 25 minutes, next time the sensor queries with last Access Token value, it gets rejected.

I need to have arrangement where we can automatically get same REST API Sensor to request Access Token and query REST API seamlessly without having to generate access token manually now and again.

Your help will be highly appreciated.

Thanks and regards, Shishir

access-token http-rest-api-sensor kaseya prtg

Created on Nov 7, 2016 12:44:47 AM

Last change on Nov 7, 2016 7:03:03 AM by  Luciano Lingnau [Paessler]



3 Replies

Votes:

0

Hi there,

I'm afraid this won't be possible out of the box. You would need to build your own script that performs the necessary tasks and in the end returns a result like "value:message", which then could be used with an EXE/Script sensor to read that result and display it in a channel.

Kind regards,

Erhard

Created on Nov 7, 2016 11:45:59 AM by  Erhard Mikulik [Paessler Support]



Votes:

0

Hi Erhard,

Thanks for your quick reply. I will try EXE/Script sensor for this.

Cheers, Shishir

Created on Nov 7, 2016 9:46:01 PM



Votes:

0

Can you provide a simple example of this script? Making web requests is a very common thing to do. Even if they have tokens. Is there any work being done to accommodate a simpler solution in the future?

Created on Jul 13, 2020 1:06:57 PM




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.