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

API json filter for ChannelID

Votes:

0

I'd like to grab the sensor value, selected by channelid in json format:

api/table.xml?content=values&output=xml&columns=datetime,value_,coverage&id=123456&noraw=1&usecaption=true&count=10

returns the values of the channelids separately. I'd like to have this result in json format

api/table.xml?content=values&output=json&columns=datetime,value_,coverage&id=123456&noraw=1&usecaption=true&count=10

won't return the channel id (which i would like to filter by, I Don't want to filter the Json by Channel Caption but by ID)

api json prtg

Created on Jul 30, 2017 7:04:58 AM

Last change on Aug 4, 2017 1:03:18 PM by  Luciano Lingnau [Paessler]



1 Reply

Votes:

1

Is this the API call you're looking for?

/api/table.json?content=channels&output=json&columns=objid,name,lastvalue_&id=12456

The output will look like this:

{
   "prtg-version":"17.3.32.2478",
   "treesize":0,
   "channels":[
      {
         "objid":-4,
         "objid_raw":"*000000004",
         "name":"Downtime",
         "lastvalue":""
      },
      {
         "objid":0,
         "objid_raw":0,
         "name":"Available Services",
         "lastvalue":"100 %",
         "lastvalue_raw":100.0000
      },
      {
         "objid":2,
         "objid_raw":2,
         "name":"Office 365",
         "lastvalue":"140 msec",
         "lastvalue_raw":140.0000
      },
      {
         "objid":10,
         "objid_raw":10,
         "name":"Youtube",
         "lastvalue":"43 msec",
         "lastvalue_raw":43.0000
      }
   ]
}

Created on Jul 31, 2017 9:14:07 AM by  Luciano Lingnau [Paessler]




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.