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

Can I get sensor data from Prtg to php code

Votes:

0

Hi there, Could anyone help me to get the data via PHP code API in PRTG application without downloading XML File maybe with JSON? is it possible? knowing that I am using PRTG Network Monitor 13.1.2.1462 version.

as the example:

json = file_get_contents('http://prtg.mysite.com/getSensorData?id=1111&columns=lastvalue');
$obj = json_decode($json);

thanks

http-api php prtg xml

Created on May 3, 2017 1:34:29 PM

Last change on May 4, 2017 4:43:27 AM by  Sven Roggenhofer [Paessler Technical Support]



2 Replies

Accepted Answer

Votes:

0

Hi there,

To get the content of the PRTG Api via JSON, you can use the following call:

/api/table.json?content=channels&columns=objid,name,lastvalue&id=<SENSOR-ID>

Unfortunately, I am not sure if the version "13.1.2.1462" already supports this.

Best regards.

Created on May 4, 2017 8:31:22 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

It works, Thank you so much !!

Created on May 4, 2017 9:12:33 AM




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.