EDB Postgres Enterprise Manager REST APIs v14.0: Monitored Object Status v10.2

get__agent_status_

Code samples

GET /agent/status/

Retrieve the status of all visible pem-agents.

Returns a list of information and status for the pem-agents visible to the user (represented by the token).

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken for authentication purpose

Example responses

200 Response
[
  {
    "id": 0,
    "name": "string",
    "group_id": 0,
    "group_name": "string",
    "blackout": true,
    "status": "UP",
    "alerts": {
      "total": 0,
      "acknowledged": 0,
      "high": 0,
      "medium": 0,
      "low": 0,
      "high_acknowledged": 0,
      "medium_acknowledged": 0,
      "low_acknowledged": 0
    },
    "version": "string",
    "processes": 0,
    "threads": 0,
    "cpu_utilization": 0,
    "memory_utilization": 0,
    "swap_utilization": 0,
    "disk_utilization": 0
  }
]

Responses

StatusMeaningDescriptionSchema
200OKReturns a list of information and status about pem-agents.Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[AgentStatus]falsenonenone
» idintegerfalsenoneAgent ID
» namestringfalsenoneAgent name
» group_idintegerfalsenoneGroup ID under which agent is visible to the user
» group_namestringfalsenoneGroup name
» blackoutbooleanfalsenoneDetermines whether an alert blackout for the agent is enabled or disabled.
» statusstringfalsenoneAgent status can be UP, DOWN, or UNKNOWN
» alertsobjectfalsenoneList of alerts configured for the agent, including alert status and number of alerts that are acknowledged
»» totalintegerfalsenoneNumber of alerts configured for the agent
»» acknowledgedintegerfalsenoneNumber of acknowledged alerts
»» highintegerfalsenoneNumber of alerts with state as 'High'
»» mediumintegerfalsenoneNumber of alerts with state as 'Medium'
»» lowintegerfalsenoneNumber of alerts with state as 'Low'
»» high_acknowledgedintegerfalsenoneNumber of acknowledged alerts with state as 'High'
»» medium_acknowledgedintegerfalsenoneNumber of acknowledged alerts with state as 'Medium'
»» low_acknowledgedintegerfalsenoneNumber of acknowledged alerts with state as 'Low'
» versionstringfalsenoneCurrent version of the agent
» processesintegerfalsenoneNumber of processes running
» threadsintegerfalsenoneNumber of threads for all the running processes
» cpu_utilizationnumberfalsenoneCPU utilization (percentage)
» memory_utilizationnumberfalsenoneMemory utilization (percentage)
» swap_utilizationnumberfalsenoneSwap memory utilization (percentage)
» disk_utilizationnumberfalsenoneOverall disk utilization (percentage)
Enumerated Values
PropertyValue
statusUP
statusDOWN
statusUNKNOWN
Info

This operation does not require authentication

get__agent_status_{agent_id}

Code samples

GET /agent/status/{agent_id}

Retrieve the status of a pem-agent, identified by the agent_id.

Parameters

NameInTypeRequiredDescription
agent_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "id": 0,
  "name": "string",
  "group_id": 0,
  "group_name": "string",
  "blackout": true,
  "status": "UP",
  "alerts": {
    "total": 0,
    "acknowledged": 0,
    "high": 0,
    "medium": 0,
    "low": 0,
    "high_acknowledged": 0,
    "medium_acknowledged": 0,
    "low_acknowledged": 0
  },
  "version": "string",
  "processes": 0,
  "threads": 0,
  "cpu_utilization": 0,
  "memory_utilization": 0,
  "swap_utilization": 0,
  "disk_utilization": 0
}

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseAgentStatus
400Bad RequestAgent not found or visible to the userNone

Response Schema

Info

This operation does not require authentication

get__server_status_

Code samples

GET /server/status/

Retrieve the status of all the visible database servers.

Returns a list of information for and status of the database servers visible to the user (represented by the token).

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken for authentication purposes

Example responses

200 Response
[
  {
    "id": 0,
    "name": "string",
    "group_id": 0,
    "group_name": "string",
    "blackout": true,
    "status": "UP",
    "alerts": {
      "total": 0,
      "acknowledged": 0,
      "high": 0,
      "medium": 0,
      "low": 0,
      "high_acknowledged": 0,
      "medium_acknowledged": 0,
      "low_acknowledged": 0
    },
    "version": "string",
    "number_connections": 0,
    "remote_monitoring": true,
    "agent_id": 0,
    "sessions": {
      "last_recorded_time": 0,
      "sessions": [
        {
          "database_name": "string",
          "procpid": 0,
          "usename": "string",
          "backend_start": 0,
          "xact_start": 0,
          "query_start": 0,
          "is_waiting": true,
          "is_idle": true,
          "is_idle_in_transaction": true,
          "is_vacuum": true,
          "is_autovacuum": true,
          "client_addr": "string",
          "client_port": 0,
          "memory_usage_mb": 0,
          "swap_usage_mb": 0,
          "cpu_usage": 0,
          "io_read_bytes": 0,
          "io_write_bytes": 0,
          "state": "string",
          "state_change": 0
        }
      ]
    }
  }
]

Responses

StatusMeaningDescriptionSchema
200OKReturns a list of information for and status of database servers.Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[ServerStatus]falsenonenone
» idintegerfalsenoneServer ID
» namestringfalsenoneServer name
» group_idintegerfalsenoneGroup ID under which database server is visible to the user
» group_namestringfalsenoneGroup name
» blackoutbooleanfalsenoneStatus of the alert blackout for the database server
» statusstringfalsenoneServer status can be UP, DOWN, UNKNOWN, or UNMANAGED,
» alertsobjectfalsenoneList of alerts configured for the database server, including alert status and number of alerts that are acknowledged
»» totalintegerfalsenoneNumber of alerts configured for the database server
»» acknowledgedintegerfalsenoneNumber of acknowledged alerts
»» highintegerfalsenoneNumber of alerts with state as 'High'
»» mediumintegerfalsenoneNumber of alerts with state as 'Medium'
»» lowintegerfalsenoneNumber of alerts with state as 'Low'
»» high_acknowledgedintegerfalsenoneNumber of acknowledged alerts with state as 'High'
»» medium_acknowledgedintegerfalsenoneNumber of acknowledged alerts with state as 'Medium'
»» low_acknowledgedintegerfalsenoneNumber of acknowledged alerts with state as 'Low'
» versionstringfalsenoneCurrent version of the database server
» number_connectionsintegerfalsenoneNumber of connections on the database servers
» remote_monitoringbooleanfalsenoneDetermines whether the database server is being monitored remotely by the pemAgent
» agent_idintegerfalsenoneAgent ID that is monitoring the database server
» sessionsobjectfalsenoneAll the session information for database servers
»» last_recorded_timenumberfalsenoneUnix time of the last recorded time for session information
»» sessions[object]falsenoneList of all the session information for the database server
»»» database_namestringfalsenoneDatabase name
»»» procpidintegerfalsenoneProcess ID
»»» usenamestringfalsenoneUser name
»»» backend_startnumberfalsenoneUnix time for the session start time
»»» xact_startnumberfalsenoneUnix time for the transaction start time
»»» query_startnumberfalsenoneUnix time for the query start time (if any queries are running)
»»» is_waitingbooleanfalsenoneIs the sesion waiting?
»»» is_idlebooleanfalsenoneIs the session idle?
»»» is_idle_in_transactionbooleanfalsenoneIs the session idle in a transaction?
»»» is_vacuumbooleanfalsenoneIs this a VACUUM session?
»»» is_autovacuumbooleanfalsenoneIs this an AUTO VACUUM session?
»»» client_addrstringfalsenoneHost address for the client of the session
»»» client_portintegerfalsenoneClient port for the session
»»» memory_usage_mbnumberfalsenoneMemory usage (in MB) of the session (available only when monitored locally)
»»» swap_usage_mbnumberfalsenoneSwap memory usage (in MB) of the session (available only when monitored locally)
»»» cpu_usagenumberfalsenoneCPU Usage (in percentage) of the session (available only when monitored locally)
»»» io_read_bytesnumberfalsenoneI/O Read (in bytes) of the session (available only when monitored locally)
»»» io_write_bytesnumberfalsenoneI/O Write (in bytes) of the session (available only when monitored locally)
»»» statestringfalsenoneCurrent state of the session (idle, active, idle in transcation, and so forth)
»»» state_changenumberfalsenoneUnix time of the last state change in the session
Enumerated Values
PropertyValue
statusUP
statusDOWN
statusUNKNOWN
statusUNMANAGED
Info

This operation does not require authentication

get__server_status_{server_id}

Code samples

GET /server/status/{server_id}

Retrieves the status of a database server, identified by the server_id.

Parameters

NameInTypeRequiredDescription
server_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "id": 0,
  "name": "string",
  "group_id": 0,
  "group_name": "string",
  "blackout": true,
  "status": "UP",
  "alerts": {
    "total": 0,
    "acknowledged": 0,
    "high": 0,
    "medium": 0,
    "low": 0,
    "high_acknowledged": 0,
    "medium_acknowledged": 0,
    "low_acknowledged": 0
  },
  "version": "string",
  "number_connections": 0,
  "remote_monitoring": true,
  "agent_id": 0,
  "sessions": {
    "last_recorded_time": 0,
    "sessions": [
      {
        "database_name": "string",
        "procpid": 0,
        "usename": "string",
        "backend_start": 0,
        "xact_start": 0,
        "query_start": 0,
        "is_waiting": true,
        "is_idle": true,
        "is_idle_in_transaction": true,
        "is_vacuum": true,
        "is_autovacuum": true,
        "client_addr": "string",
        "client_port": 0,
        "memory_usage_mb": 0,
        "swap_usage_mb": 0,
        "cpu_usage": 0,
        "io_read_bytes": 0,
        "io_write_bytes": 0,
        "state": "string",
        "state_change": 0
      }
    ]
  }
}

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseServerStatus
400Bad RequestServer not found or visible to the userNone

Response Schema

Info

This operation does not require authentication