Good morning paessler and PRTGers

I am exporting lists of our paused sensors using

api/table.json?content=sensors&output=json&columns=objid,device,sensor&filter_status=7

And would very much like a column where it shows how long this has been paused, im hoping this is possible?

Thanks Samuel


Article Comments

Dear samuelma,

this property cannot be read via a table query.


Nov, 2017 - Permalink

Hi Arne,

Could this be achieved via a similar api query? Further to this how can i get the data from the log tab of devices and sensors? I am required to produce a report of who paused what and when across every device and am a bit out of my depth working it out.


Dec, 2017 - Permalink

Dear samuelma,

please understand that our technical support for API usage is limited. You can generate a list of paused sensors if you filter by status like status=7, while there are additional pause statuses available:

 7 = PausedUser
 8 = PausedDependency
 9 = PausedSchedule
11 = PausedLicense
12 = PausedUntil

When the sensor was paused is only available either it the sensor message, or the sensor log, which would have to be parsed, meaning this can't be done with a similar API query, or an API query at all.

As a kind of work around you can try to use the column lastcheck, but there can be other reasons than pausing for a scan interruption.


Dec, 2017 - Permalink

Hi samuelma,

Using:

/api/table.xml?content=sensors&columns=objid,device,sensor,status,message&filter_status=7

Can give you the info as to when the object was paused:

<item>
  <objid>2004</objid>
  <device>FritzBox</device>
  <sensor>Traffic</sensor>
  <status>Paused (paused)</status>
  <status_raw>7</status_raw>
  <message><div class="status">[[ Paused at 26-11-2017 10:05:24 by PRTG System Administrator ]]: Paused by user<div class="moreicon"></div></div></message>
  <message_raw>[[ Paused at 26-11-2017 10:05:24 by PRTG System Administrator ]]: Paused by user</message_raw>
</item>
<item>
  <objid>2006</objid>
  <device>FritzBox</device>
  <sensor>Fritz!Energy</sensor>
  <status>Paused (paused)</status>
  <status_raw>7</status_raw>
  <message><div class="status">[[ Paused at 26-11-2017 10:05:30 by PRTG System Administrator ]]: Paused by user<div class="moreicon"></div></div></message>
  <message_raw>[[ Paused at 26-11-2017 10:05:30 by PRTG System Administrator ]]: Paused by user</message_raw>
</item>

Dec, 2017 - Permalink