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

"Data at the root level..." Error with JSON/REST Sensor

Votes:

0

Hello!

I need to parse a JSON array like that:

[
{"Test":"Output "},{"Test2":"Output2"}
]

I am using the "HTTP/XML Rest-Sensor" but it shows me the error "Data at the root level is invalid. Line 1, position1."

I read that its because of the "[" at the beginng. Can somebody tell me how I can fix this?

- http json rest root-level sensor

Created on Oct 30, 2017 10:05:18 AM

Last change on Oct 30, 2017 10:59:18 AM by  Luciano Lingnau [Paessler]



5 Replies

Votes:

0

Hi Manuel,

Thank you for the KB-Post. Can you please use the new Rest Custom Sensor for a test? Does it throw the same error?

best regards.

Created on Oct 30, 2017 1:42:45 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Hello, thanks for your help and I tried the "Rest Custom Sensor". Unfortunately it doesn't work for me. Now I get following error: "can not query endpoint can not load entdpoint http://0.0.0.0https://admin......."

Default settings in the "Rest Custom Sensor" with Basic authentication and "channelDiscovery" as REST Configuration.

Best Regards, Manuel

Created on Nov 3, 2017 10:23:48 AM



Votes:

0

Hi there,

As the error message indicates, the requested URL can't work. For example you have the following URL:
http://my-server/json/api/api.php

Then please enter the first part, the domain/hostname into the connection settings of the device:

  • IPv4 Address/DNS Name: my-server
    Afterwards enter the last part, the URL, into the URL field of the sensor:
  • REST Query: /json/api/api.php

    Best regards.

Created on Nov 3, 2017 12:48:36 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Hi there!

It's working now, thanks!

Is it possible to add a hyperlink to the channel names that leads to another site? Atm I just see state number, ID etc. but nothing informative.

Best Regards

Created on Nov 17, 2017 12:12:24 PM



Votes:

0

Hi there,

Unfortunately, that is not possible. You can however add the URL in the device settings as the service url of the device.

Best regards.

Created on Nov 17, 2017 1:26:48 PM by  Dariusz Gorka [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.