PRTG Manual: Single Object Status

You can access live data and live status data of single objects using the PRTG API.

i_round_redAuthentication with API key or user name and passhash (or user name and password) must always be included in each PRTG API request. See section HTTP API for more information.

In this section:

Status of an Object

You can get the status information (lastvalue, downtime) of an object using the following API calls:

i_speechExamples

Get object status:

/api/getobjectstatus.htm?id=objectid&name=columnname

The Extensible Markup Language (XML) result looks like this:

  <?xml version="1.0" encoding="UTF-8" ?>
   <prtg>
       <version>18.4.45.10127+</version>
       <result>True</result>
   </prtg>

i_round_blueIn some cases, the result can contain HTML formatting elements.

Supported Object Types

getobjectstatus.htm supports the following object types:

  • probe
  • group
  • device
  • sensor

Supported getobjectstatus Output Columns ("Name=" Parameter)

With getobjectstatus.htm, you can use the following column names for the name parameter.

i_round_redOnly one column name is allowed in the API call.

i_round_blueIf you want to use combinations of column names or more than one object in a single API call, use a table API call instead. For more information, see section Multiple Object Property or Status.

Column Name

What It Displays

Can Be Used for

objid

ID of the object

probes, groups, devices, sensors

type

Object type or sensor type

probes, groups, devices, sensors

name

Name of the object

probes, groups, devices, sensors

tags

List of all tags. This includes tags from the object itself plus tags that are inherited from parent objects.

probes, groups, devices, sensors

active

True/false depending on whether an object is set to paused by a user

probes, groups, devices, sensors

downtime

Cumulated downtime of the sensor (displayed as percentage of uptime+downtime)

sensors

downtimetime

Cumulated downtime of the sensor (in minutes/hours)

sensors

downtimesince

Elapsed time since the last Up status of the sensor

sensors

uptime

Cumulated uptime of the sensor (displayed as percentage of uptime+downtime)

sensors

uptimetime

Cumulated uptime of the sensor (in minutes/hours)

sensors

uptimesince

Elapsed time since the last Down status of a sensor

sensors

knowntime

Sum of cumulated uptime and downtime of the sensor

i_round_blueThe output contains HTML.

sensors

cumsince

Time stamp when accumulation of uptimes/downtimes began

sensors

sensor

Name of the sensor

sensors

interval

Effective interval setting for the sensor

sensors

lastcheck

Time stamp of the last sensor result

i_round_blueThe output contains HTML.

sensors

lastup

Time stamp of the most recent Up status of the sensor

i_round_blueThe output contains HTML.

sensors

lastdown

Time stamp of the most recent Down status of the sensor

i_round_blueThe output contains HTML.

sensors

device

For sensors: ID of the associated device

For devices: name of the associated device

devices, sensors

group

For sensors: ID of the associated group

For devices: name of the associated group

groups, devices, sensors

probe

Name of the associated probe

probes, groups, devices, sensors

grpdev

Name of the associated device and associated group, separated by slash

sensors

notifiesx

Returns a string containing the number of each trigger type defined for this object. If trigger inheritance is active, it displays Inherited.

probes, groups, devices, sensors

intervalx

Either Inherited or the current interval setting of the object

probes, groups, devices, sensors

dependency

Name of an associated dependency or Parent

i_round_blueThe output contains HTML.

probes, groups, devices, sensors

probegroupdevice

Complete object hierarchy with names of associated device, group, and probe separated by angle brackets (>). If more than one group is in the object hierarchy, these are displayed with dots (..).

i_round_blueThe output contains HTML.

probes, groups, devices, sensors

status

Integer of the status of the object (0=None, 1=Unknown, 2=Scanning, 3=Up, 4=Warning, 5=Down, 6=No Probe, 7=Paused by User, 8=Paused by Dependency, 9=Paused by Schedule, 10=Unusual, 11=Not Licensed, 12=Paused Until, 13=Down Acknowledged, 14=Down Partial)

probes, groups, devices, sensors

message

Detailed message of the object

i_round_blueThe output contains HTML.

probes, groups, devices, sensors

priority

Priority setting of the object

i_round_blueThe output contains HTML.

probes, groups, devices, sensors

lastvalue

Last sensor result value

sensors

upsens

Number of sensors in the Up status

i_round_bluePRTG only counts the sensor itself or sensors below the object in the hierarchy.

i_round_blueIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

downsens

Number of sensors in the Down status

i_round_bluePRTG only counts the sensor itself or sensors below the object in the hierarchy.

i_round_blueIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

downacksens

Number of sensors in the Down (Acknowledged) status

i_round_bluePRTG only counts the sensor itself or sensors below the object in the hierarchy.

i_round_blueIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

partialdownsens

Number of sensors in the Down (Partial) status

i_round_bluePRTG only counts the sensor itself or sensors below the object in the hierarchy.

i_round_blueIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

warnsens

Number of sensors in the Warning status

i_round_bluePRTG only counts the sensor itself or sensors below the object in the hierarchy.

i_round_blueIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

pausedsens

Number of sensors in the Paused status

i_round_bluePRTG only counts the sensor itself or sensors below the object in the hierarchy.

i_round_blueIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

unusualsens

Number of sensors in the Unusual status

i_round_bluePRTG only counts the sensor itself or sensors below the object in the hierarchy.

i_round_blueIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

undefinedsens

Number of sensors in an undefined status, like None, Unknown, No Probe

i_round_bluePRTG only counts the sensor itself or sensors below the object in the hierarchy.

i_round_blueIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

totalsens

Number of all sensors

i_round_bluePRTG only counts the sensor itself or sensors below the object in the hierarchy.

i_round_blueIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

favorite

An exclamation mark (!) if the object is marked as favorite

i_round_blueThe output contains HTML.

groups, devices, sensors

schedule

Name of the associated schedule

probes, groups, devices, sensors

minigraph

Numeric data for the minigraphs. Numbers are 5-minute averages for the last 24 hours (must be scaled to the maximum of the series). There are two datasets: "|" separates measured value series and error series.

i_round_blueThe output contains HTML.

sensors

comments

Object comments

probes, groups, devices, sensors

host

Hostname or IP address

devices

condition

For probes: If the probe is connected or disconnected (0=Disconnected, 1=Unauthorized, 2=Connected, 3=Banned, 4=Init)

For groups: The auto-discovery status

probes, groups

basetype

Object type (string)

probes, groups, devices, sensors

baselink

URL of the object

probes, groups, devices, sensors

icon

URL of the device icon

devices

parentid

ID of the parent object

probes, groups, devices, sensors

location

Location property (used in Geo Maps)

i_round_blueThe output contains HTML.

devices

groupnum
devicenum

Number of groups or devices in the probe or group

probes, groups

Sensor Details

You can get details about a sensor (sensortype, interval, uptime) using the following API calls:

i_round_blueYou need the sensor ID to get details about a sensor. You can find the ID on the sensor's Overview tab or by hovering over a sensor in the device tree, for example.i_square_cyanFor more information about the Overview tab, see the Knowledge Base: What options do I have to review my monitoring data in detail?

i_speechExamples

Get details about a sensor in the XML format:

/api/getsensordetails.xml?id=sensorid

Get details about a sensor in the JavaScript Object Notation (JSON) format:

/api/getsensordetails.json?id=sensorid

Ticket Status and Message

The following API calls return status and message of a ticket.

i_speechExamples

The status of a ticket:

/api/getticketstatus.htm?id=ticketid

The subject and assignee of a ticket:

/api/getticketmessage.htm?id=ticketid

More

i_square_blueKNOWLEDGE BASE

How can I use the PRTG Application Programming Interface (API)?

What options do I have to review my monitoring data in detail?