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

get__agent_status_

Code samples

GET /agent/status/

Retrieve of the status of all the visible pem-agent

It returns the list of the 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 the list of information, and status about the 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
» blackoutbooleanfalsenoneEnabled/Disabled alert blackout for the agent
» statusstringfalsenoneAgent status can be UP, DOWN, or UNKNOWN
» alertsobjectfalsenoneList of alert configured for the agent and it's status and how many are acknowledged
»» totalintegerfalsenoneNumber of alerts configured for the agent
»» acknowledgedintegerfalsenoneNumber of alerts, which are already been acknowledged
»» highintegerfalsenoneNumber of alerts with state as 'High'
»» mediumintegerfalsenoneNumber of alerts with state as 'Medium'
»» lowintegerfalsenoneNumber of alerts with state as 'Low'
»» high_acknowledgedintegerfalsenoneNumber of alerts with state as 'High' and are acknowledged
»» medium_acknowledgedintegerfalsenoneNumber of alerts with state as 'Medium' and are acknowledged
»» low_acknowledgedintegerfalsenoneNumber of alerts with state as 'Low' and are acknowledged
» 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 of the status of the 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 of the status of all the visible database server

It returns the list of the information, and status for the database servers 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",
    "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 the list of information, and status about the 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 alert configured for the database server and it's status and how many are acknowledged
»» totalintegerfalsenoneNumber of alerts configured for the database server
»» acknowledgedintegerfalsenoneNumber of alerts, which are already been acknowledged
»» highintegerfalsenoneNumber of alerts with state as 'High'
»» mediumintegerfalsenoneNumber of alerts with state as 'Medium'
»» lowintegerfalsenoneNumber of alerts with state as 'Low'
»» high_acknowledgedintegerfalsenoneNumber of alerts with state as 'High' and are acknowledged
»» medium_acknowledgedintegerfalsenoneNumber of alerts with state as 'Medium' and are acknowledged
»» low_acknowledgedintegerfalsenoneNumber of alerts with state as 'Low' and are acknowledged
» versionstringfalsenoneCurrent version of the database server
» number_connectionsintegerfalsenoneNumber of connections on the database servers
» remote_monitoringbooleanfalsenoneWhether the database server is being monitored remotely by the pemAgent
» agent_idintegerfalsenoneAgent ID, which is monitoring the database server
» sessionsobjectfalsenoneAll the session information for the daabase servers
»» last_recorded_timenumberfalsenoneUnix time representing the last session information recorded time
»» sessions[object]falsenoneList of all the session information for the database server
»»» database_namestringfalsenoneDatabase name
»»» procpidintegerfalsenoneProcess ID
»»» usenamestringfalsenoneUser name
»»» backend_startnumberfalsenoneUnix time representing the session start time
»»» xact_startnumberfalsenoneUnix time representing the transaction start time
»»» query_startnumberfalsenoneUnix time representing the query start time (if any 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 a 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 monitoried locally)
»»» swap_usage_mbnumberfalsenoneSwap memory usage (in MB) of the session (available only when monitoried locally)
»»» cpu_usagenumberfalsenoneCPU Usage (in percentage) of the session (available only when monitoried locally)
»»» io_read_bytesnumberfalsenoneI/O Read (in bytes) of the session (available only when monitoried locally)
»»» io_write_bytesnumberfalsenoneI/O Write (in bytes) of the session (available only when monitoried locally)
»»» statestringfalsenoneCurrent state of the session (idle, active, idle in transcation, etc)
»»» state_changenumberfalsenoneUnix time representing the last state change time of 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}

Retrieve of the status of the 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