<%NUMBERING1%>.<%NUMBERING2%>.<%NUMBERING3%> PRTG Manual: Single Object Status

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

icon-i-round-redAuthentication with username and passhash (or username and password) must always be included in each PRTG API request. See section Authentication for more information.

Here are quick links for ease of use.

Status of an Object

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

icon-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>

icon-i-roundIn 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.

icon-i-round-redOnly one column name is allowed in the API call.

icon-i-roundIf 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 current 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 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 last Down status of a sensor

sensors

knowntime

Sum of cumulated uptime and downtime of the sensor

icon-i-roundThe 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

icon-i-roundThe output contains HTML.

sensors

lastup

Time stamp of the most recent Up status of the sensor

icon-i-roundThe output contains HTML.

sensors

lastdown

Time stamp of the most recent Down status of the sensor

icon-i-roundThe 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'

icon-i-roundThe 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 (..).

icon-i-roundThe output contains HTML.

probes, groups, devices, sensors

status

Integer value of the status of the object (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

icon-i-roundThe output contains HTML.

probes, groups, devices, sensors

priority

Priority setting of the object

icon-i-roundThe output contains HTML.

probes, groups, devices, sensors

lastvalue

Last sensor result value

sensors

upsens

Number of sensors in Up status

icon-i-roundPRTG only counts the sensor itself or sensors below the object in the hierarchy.

icon-i-roundIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

downsens

Number of sensors in Down status

icon-i-roundPRTG only counts the sensor itself or sensors below the object in the hierarchy.

icon-i-roundIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

downacksens

Number of sensors in Down (Acknowledged) status

icon-i-roundPRTG only counts the sensor itself or sensors below the object in the hierarchy.

icon-i-roundIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

partialdownsens

Number of sensors in Down (Partial) status

icon-i-roundPRTG only counts the sensor itself or sensors below the object in the hierarchy.

icon-i-roundIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

warnsens

Number of sensors in Warning status

icon-i-roundPRTG only counts the sensor itself or sensors below the object in the hierarchy.

icon-i-roundIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

pausedsens

Number of sensors in Paused status

icon-i-roundPRTG only counts the sensor itself or sensors below the object in the hierarchy.

icon-i-roundIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

unusualsens

Number of sensors in Unusual status

icon-i-roundPRTG only counts the sensor itself or sensors below the object in the hierarchy.

icon-i-roundIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

undefinedsens

Number of sensors in Unknown status

icon-i-roundPRTG only counts the sensor itself or sensors below the object in the hierarchy.

icon-i-roundIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

totalsens

Number of all sensors

icon-i-roundPRTG only counts the sensor itself or sensors below the object in the hierarchy.

icon-i-roundIf the count is <1 PRTG returns "".

probes, groups, devices, sensors

favorite

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

icon-i-roundThe output contains HTML.

groups, devices, sensors

schedule

Name of the associated schedule

probes, groups, devices, sensors

minigraph

Numerical 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.

icon-i-roundThe 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)

icon-i-roundThe output contains HTML.

devices

groupnum
devicenum

Number of groups or devices in the probe or group node

probes, groups

Sensor Details

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

icon-i-roundYou 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.

icon-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

Current Ticket Status and Message

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

icon-speechExamples

The status of a ticket:

/api/getticketstatus.htm?id=ticketid

The subject and assignee of a ticket:

/api/getticketmessage.htm?id=ticketid

More

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

Application Programming Interface (API) Definition—Topics

Keywords: