EDB Postgres Enterprise Manager REST APIs v10.0: Monitored Object Status v10.2
get__agent_status_
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v10/agent/status/ \ -H 'Accept: application/json' \ -H 'X-Auth-Token: string'
import requests headers = { 'Accept': 'application/json', 'X-Auth-Token': 'string' } r = requests.get('https://PEM-SERVER-IP/api/v10/agent/status/', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v10/agent/status/', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
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
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Auth-Token | header | string | true | Token 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns a list of information and status about pem-agents. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [AgentStatus] | false | none | none |
» id | integer | false | none | Agent ID |
» name | string | false | none | Agent name |
» group_id | integer | false | none | Group ID under which agent is visible to the user |
» group_name | string | false | none | Group name |
» blackout | boolean | false | none | Determines whether an alert blackout for the agent is enabled or disabled. |
» status | string | false | none | Agent status can be UP, DOWN, or UNKNOWN |
» alerts | object | false | none | List of alerts configured for the agent, including alert status and number of alerts that are acknowledged |
»» total | integer | false | none | Number of alerts configured for the agent |
»» acknowledged | integer | false | none | Number of acknowledged alerts |
»» high | integer | false | none | Number of alerts with state as 'High' |
»» medium | integer | false | none | Number of alerts with state as 'Medium' |
»» low | integer | false | none | Number of alerts with state as 'Low' |
»» high_acknowledged | integer | false | none | Number of acknowledged alerts with state as 'High' |
»» medium_acknowledged | integer | false | none | Number of acknowledged alerts with state as 'Medium' |
»» low_acknowledged | integer | false | none | Number of acknowledged alerts with state as 'Low' |
» version | string | false | none | Current version of the agent |
» processes | integer | false | none | Number of processes running |
» threads | integer | false | none | Number of threads for all the running processes |
» cpu_utilization | number | false | none | CPU utilization (percentage) |
» memory_utilization | number | false | none | Memory utilization (percentage) |
» swap_utilization | number | false | none | Swap memory utilization (percentage) |
» disk_utilization | number | false | none | Overall disk utilization (percentage) |
Enumerated Values
Property | Value |
---|---|
status | UP |
status | DOWN |
status | UNKNOWN |
Info
This operation does not require authentication
get__agent_status_{agent_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v10/agent/status/{agent_id} \ -H 'Accept: application/json' \ -H 'X-Auth-Token: string'
import requests headers = { 'Accept': 'application/json', 'X-Auth-Token': 'string' } r = requests.get('https://PEM-SERVER-IP/api/v10/agent/status/{agent_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v10/agent/status/{agent_id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
GET /agent/status/{agent_id}
Retrieve the status of a pem-agent, identified by the agent_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
agent_id | path | integer | true | none |
X-Auth-Token | header | string | true | Token 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful response | AgentStatus |
400 | Bad Request | Agent not found or visible to the user | None |
Response Schema
Info
This operation does not require authentication
get__server_status_
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v10/server/status/ \ -H 'Accept: application/json' \ -H 'X-Auth-Token: string'
import requests headers = { 'Accept': 'application/json', 'X-Auth-Token': 'string' } r = requests.get('https://PEM-SERVER-IP/api/v10/server/status/', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v10/server/status/', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
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
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Auth-Token | header | string | true | Token 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns a list of information for and status of database servers. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ServerStatus] | false | none | none |
» id | integer | false | none | Server ID |
» name | string | false | none | Server name |
» group_id | integer | false | none | Group ID under which database server is visible to the user |
» group_name | string | false | none | Group name |
» blackout | boolean | false | none | Status of the alert blackout for the database server |
» status | string | false | none | Server status can be UP, DOWN, UNKNOWN, or UNMANAGED, |
» alerts | object | false | none | List of alerts configured for the database server, including alert status and number of alerts that are acknowledged |
»» total | integer | false | none | Number of alerts configured for the database server |
»» acknowledged | integer | false | none | Number of acknowledged alerts |
»» high | integer | false | none | Number of alerts with state as 'High' |
»» medium | integer | false | none | Number of alerts with state as 'Medium' |
»» low | integer | false | none | Number of alerts with state as 'Low' |
»» high_acknowledged | integer | false | none | Number of acknowledged alerts with state as 'High' |
»» medium_acknowledged | integer | false | none | Number of acknowledged alerts with state as 'Medium' |
»» low_acknowledged | integer | false | none | Number of acknowledged alerts with state as 'Low' |
» version | string | false | none | Current version of the database server |
» number_connections | integer | false | none | Number of connections on the database servers |
» remote_monitoring | boolean | false | none | Determines whether the database server is being monitored remotely by the pemAgent |
» agent_id | integer | false | none | Agent ID that is monitoring the database server |
» sessions | object | false | none | All the session information for database servers |
»» last_recorded_time | number | false | none | Unix time of the last recorded time for session information |
»» sessions | [object] | false | none | List of all the session information for the database server |
»»» database_name | string | false | none | Database name |
»»» procpid | integer | false | none | Process ID |
»»» usename | string | false | none | User name |
»»» backend_start | number | false | none | Unix time for the session start time |
»»» xact_start | number | false | none | Unix time for the transaction start time |
»»» query_start | number | false | none | Unix time for the query start time (if any queries are running) |
»»» is_waiting | boolean | false | none | Is the sesion waiting? |
»»» is_idle | boolean | false | none | Is the session idle? |
»»» is_idle_in_transaction | boolean | false | none | Is the session idle in a transaction? |
»»» is_vacuum | boolean | false | none | Is this a VACUUM session? |
»»» is_autovacuum | boolean | false | none | Is this an AUTO VACUUM session? |
»»» client_addr | string | false | none | Host address for the client of the session |
»»» client_port | integer | false | none | Client port for the session |
»»» memory_usage_mb | number | false | none | Memory usage (in MB) of the session (available only when monitored locally) |
»»» swap_usage_mb | number | false | none | Swap memory usage (in MB) of the session (available only when monitored locally) |
»»» cpu_usage | number | false | none | CPU Usage (in percentage) of the session (available only when monitored locally) |
»»» io_read_bytes | number | false | none | I/O Read (in bytes) of the session (available only when monitored locally) |
»»» io_write_bytes | number | false | none | I/O Write (in bytes) of the session (available only when monitored locally) |
»»» state | string | false | none | Current state of the session (idle, active, idle in transcation, and so forth) |
»»» state_change | number | false | none | Unix time of the last state change in the session |
Enumerated Values
Property | Value |
---|---|
status | UP |
status | DOWN |
status | UNKNOWN |
status | UNMANAGED |
Info
This operation does not require authentication
get__server_status_{server_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v10/server/status/{server_id} \ -H 'Accept: application/json' \ -H 'X-Auth-Token: string'
import requests headers = { 'Accept': 'application/json', 'X-Auth-Token': 'string' } r = requests.get('https://PEM-SERVER-IP/api/v10/server/status/{server_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v10/server/status/{server_id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
GET /server/status/{server_id}
Retrieves the status of a database server, identified by the server_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | none |
X-Auth-Token | header | string | true | Token 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful response | ServerStatus |
400 | Bad Request | Server not found or visible to the user | None |
Response Schema
Info
This operation does not require authentication