PRTG Manual: Single Object Status
You can access live data and live status data of single objects using the PRTG API.
Authentication 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
- Supported Object Types
- Supported getobjectstatus Output Columns ("Name=" Parameter)
- Sensor Details
- Ticket Status and Message
You can get the status information (lastvalue, downtime) of an object using the following API calls:
Examples 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" ?> In some cases, the result can contain HTML formatting elements. |
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.
Only one column name is allowed in the API call.
If 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 The 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 The output contains HTML. |
sensors |
lastup |
Time stamp of the most recent Up status of the sensor The output contains HTML. |
sensors |
lastdown |
Time stamp of the most recent Down status of the sensor The 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 The output contains HTML. |
probes, groups, devices, sensors |
probegroupdevice |
Partial object hierarchy with names of associated device, group, and probe separated by angle brackets (>). The output contains HTML. probegroupdevice is not available in the CSV format. For the complete object hierarchy, use probe, group, device instead. |
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 The output contains HTML. |
probes, groups, devices, sensors |
priority |
Priority setting of the object The output contains HTML. |
probes, groups, devices, sensors |
lastvalue |
Last sensor result value |
sensors |
upsens |
Number of sensors in the Up status PRTG only counts the sensor itself or sensors below the object in the hierarchy. If the count is <1 PRTG returns "". |
probes, groups, devices, sensors |
downsens |
Number of sensors in the Down status PRTG only counts the sensor itself or sensors below the object in the hierarchy. If the count is <1 PRTG returns "". |
probes, groups, devices, sensors |
downacksens |
Number of sensors in the Down (Acknowledged) status PRTG only counts the sensor itself or sensors below the object in the hierarchy. If the count is <1 PRTG returns "". |
probes, groups, devices, sensors |
partialdownsens |
Number of sensors in the Down (Partial) status PRTG only counts the sensor itself or sensors below the object in the hierarchy. If the count is <1 PRTG returns "". |
probes, groups, devices, sensors |
warnsens |
Number of sensors in the Warning status PRTG only counts the sensor itself or sensors below the object in the hierarchy. If the count is <1 PRTG returns "". |
probes, groups, devices, sensors |
pausedsens |
Number of sensors in the Paused status PRTG only counts the sensor itself or sensors below the object in the hierarchy. If the count is <1 PRTG returns "". |
probes, groups, devices, sensors |
unusualsens |
Number of sensors in the Unusual status PRTG only counts the sensor itself or sensors below the object in the hierarchy. If the count is <1 PRTG returns "". |
probes, groups, devices, sensors |
undefinedsens |
Number of sensors in an undefined status, like None, Unknown, No Probe PRTG only counts the sensor itself or sensors below the object in the hierarchy. If the count is <1 PRTG returns "". |
probes, groups, devices, sensors |
totalsens |
Number of all sensors PRTG only counts the sensor itself or sensors below the object in the hierarchy. If the count is <1 PRTG returns "". |
probes, groups, devices, sensors |
favorite |
An exclamation mark (!) if the object is marked as favorite The 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. The 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) The output contains HTML. |
devices |
groupnum |
Number of groups or devices in the probe or group |
probes, groups |
You can get details about a sensor (sensortype, interval, uptime) using the following API calls:
You 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.For more information about the Overview tab, see the Knowledge Base: What options do I have to review my monitoring data in detail?
Examples 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 |
The following API calls return status and message of a ticket.
Examples The status of a ticket: /api/getticketstatus.htm?id=ticketid The subject and assignee of a ticket: /api/getticketmessage.htm?id=ticketid |
KNOWLEDGE BASE
How can I use the PRTG Application Programming Interface (API)?
What options do I have to review my monitoring data in detail?