Documentation for up.time 7.2 If you are looking for the latest version view

Unknown macro: {spacejump}

or visit the current documentation home.

This following describes all of the actions that can be executed with service monitors. 

Managing Monitors

Listing Monitors

List service monitors visible to the authenticated user account.

Endpoint

To list all service monitors:

GET https://youruptime/api/v1/monitors/

To list a specific service monitor:

GET https://youruptime/api/v1/monitors/<id>/

Example Request

List all visible service monitors:

GET https://youruptime/api/v1/monitors 

List a specific service monitor (e.g. ID #19):

GET https://youruptime/api/v1/monitors/19

Example Responses

GET https://youruptime/api/v1/monitors/ 

[
   {
      "description": "Collects basic performance data",
      "elementId": 1,
      "id": 3,
      "isHidden": true,
      "isHostCheck": false,
      "isMonitored": true,
      "name": "Platform Performance Gatherer",
      "type": "ERDCwindows"
   },
   {
      "description": "", 
      "elementId": 1,
      "id": 331,
      "isHidden": false,
      "isHostCheck": false,
      "isMonitored": true,
      "name": "FS-monitor-warning win-dleith",
      "type": "File System Capacity"
   },
   {
      "description": "Default uptime check for win-dleith",
      "elementId": 1,
      "id": 1,
      "isHidden": false,
      "isHostCheck": false,
      "isMonitored": true,
      "name": "UPTIME-win-dleith",
      "type": "up.time Agent"
   },
   {
      "description": "Collects general configuration changes",
      "elementId": 1,
      "id": 4,
      "isHidden": true,
      "isHostCheck": false,
      "isMonitored": true,
      "name": "Configuration Update Gatherer",
      "type": "ERDCwindows"
   },
   {
      "description", "Default ping check for win-dleith",
      "elementId": 1,
      "id": 2,
      "isHidden": false,
      "isHostCheck": true,
      "isMonitored": true,
      "name": "PING-win-dleith",
      "type": "Ping"
   }
   {
      "description", "Default ping check for rd-01",
      "elementId": 8,
      "id": 306,
      "isHidden": false,
      "isHostCheck": true,
      "isMonitored": true,
      "name": "PING-rh-01"
      "type": "Ping"
   },
   ...
]

Response Field Details

For each returned service monitor the following fields will be provided:

FieldTypeDescription
descriptionStringdescription of this service monitor
elementIdIntegerID for this service monitor's parent Element; can return a null value for unassigned monitors
idIntegerID for this Element
isMonitoredBooleanmonitoring status for this Element
isHostCheckBooleanreturns true if this service monitor is the host check for its parent Element
isHiddenBooleanhidden monitors are internal monitors that up.time uses, and can generally be ignored
nameStringdisplay name of the service monitor
typeString

the service monitor type, typically as seen in the up.time UI

Actions On A Service Monitor

View Service Monitor Status Summary

Produces basic availability information, similar to the status shown on Global Scan. The 'status' task can only be called against one service monitor at a time, based on ID.

Endpoint

GET https://youruptime/api/v1/monitors/<id>/status

Example Response

GET https://youruptime/api/v1/monitors/1/status

{
   "elementId": 1,
   "elementStatus": 
   {
         "id": 1,
         "isMonitored": true,
         "lastCheckTime": "2012-09-17T14:14:17",
         "lastTransitionTime": "2012-09-13T11:34:24",
         "message": "",
         "name": "win-dleith",
         "powerState": "On",
         "status": "OK"
   },
   "id": 1,
   "isHidden": false,
   "isHostCheck": false,
   "isMonitored": true,
   "lastCheckTime": "2012-09-17T14:13:56",
   "lastTransitionTime": "2012-09-13T11:34:38",
   "message": "",
   "name": "UPTIME-win-dleith",
   "status": "UNKNOWN"
}

 

Response Field Details

For the returned Element, the following fields will be provided:

FieldTypeDescription
elementIdIntegerID for this service monitor's parent Element; can be null for unassigned monitors
elementStatusObjectan object listing the status of the parent Element for this monitor (see Element Status Object below for more detail)
idIntegerID for this service monitor
isMonitoredBooleanmonitoring Status for this service monitor
isHiddenBooleanhidden monitors are internal monitors that up.time uses, and can generally be ignored
isHostCheckBooleanreturns true if this service monitor is the host check for its parent Element
lastCheckTimeString - Date Timethe last time this service monitor was executed successfully
lastTransitionTimeString - Date Timethe last time this service monitor changed status, which can be used to determine time in its current status
messageStringoutput message produced the last time the service monitor was executed
nameStringname of this service monitor
statusStringlast known status of this service monitor

Element Status Object

If this service monitor has a parent Element, its status details will be listed in the elementStatus object:

FieldTypeDescription
idIntegerID of the parent Element
isMonitoredBooleanmonitoring status for the parent Element
nameStringdisplay name of the parent Element
messageStringoutput message produced the last time the parent Element changed status
statusStringlast known status of the parent Element
lastCheckTimeString - Date Timethe last time the parent Element's status was successfully checked 
lastTransitionTimeString - Date Timethe last time the parent Element changed status, which can be used to determine time in its current status
powerStateStringthe current power state of the parent Element (only provided for virtual Elements; all other Elements will return null)



 

  • No labels