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?


Article Comments

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.


Feb, 2021 - Permalink