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

REST Sensor Using JSON

Votes:

0

When I use the generic rest template channelDiscovery I get a large amount of channels that are displaying values I am after correctly using the Query

/api.o.j/network%3Brxes%3Btx%3Bcpu%3Btemperature%3Blocation.remote

ie:

ChannelIDLast Value
$["5"]latitude6-55.23403285432
$["6"]longitude7122.222342343

However when I use my own template:

{
  "prtg": {
    "description" : {
      "device": "iDirect Web GUI",
      "query": "/api.o.j/network%3Brxes%3Btx%3Bcpu%3Btemperature%3Blocation.remote",
      "comment": "No comment"
    },
    "result": [
      {
        "channel": "Latitude",
	"unit": "degrees",
        "value": $["5"]["latitude"]
      },
      {
        "channel": "Longitude",
	"unit": "degrees",
        "value": $["5"]["longitude"]
      },
      
    ]
  }
}

I only get the first digit of the value displayed in PRTG, even when I change the channel decimal places to show all, it rounds to the nearest full number.

ChannelIDLast Value
$["5"]latitude2-55
$["6"]longitude3122

I'm not sure why this is. Is there anywhere I can view the channelDiscovery template?

custom json rest

Created on Feb 4, 2021 12:11:14 AM

Last change on Feb 4, 2021 7:00:19 AM by  Felix Wiesneth [Paessler Support]



1 Reply

Votes:

0

Hello,

Thank you for your message.

Can you please provide us an example of the JSON output you get when you use the query you mentioned.

Regards.

Created on Feb 5, 2021 12:36:56 PM by  Florian Lesage [Paessler Support]

Last change on Feb 5, 2021 12:37:13 PM by  Florian Lesage [Paessler Support]




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.