EDB Postgres Enterprise Manager REST APIs v4.0: Monitored Object Status v10.2
get__agent_status_
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v4/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/v4/agent/status/', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v4/agent/status/', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
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
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 the list of information, and status about the 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 | Enabled/Disabled alert blackout for the agent |
» status | string | false | none | Agent status can be UP, DOWN, or UNKNOWN |
» alerts | object | false | none | List of alert configured for the agent and it's status and how many are acknowledged |
»» total | integer | false | none | Number of alerts configured for the agent |
»» acknowledged | integer | false | none | Number of alerts, which are already been acknowledged |
»» 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 alerts with state as 'High' and are acknowledged |
»» medium_acknowledged | integer | false | none | Number of alerts with state as 'Medium' and are acknowledged |
»» low_acknowledged | integer | false | none | Number of alerts with state as 'Low' and are acknowledged |
» 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/v4/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/v4/agent/status/{agent_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v4/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 of the status of the 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/v4/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/v4/server/status/', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v4/server/status/', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
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
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", "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 the list of information, and status about the 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 alert configured for the database server and it's status and how many are acknowledged |
»» total | integer | false | none | Number of alerts configured for the database server |
»» acknowledged | integer | false | none | Number of alerts, which are already been acknowledged |
»» 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 alerts with state as 'High' and are acknowledged |
»» medium_acknowledged | integer | false | none | Number of alerts with state as 'Medium' and are acknowledged |
»» low_acknowledged | integer | false | none | Number of alerts with state as 'Low' and are acknowledged |
» 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 | Whether the database server is being monitored remotely by the pemAgent |
» agent_id | integer | false | none | Agent ID, which is monitoring the database server |
» sessions | object | false | none | All the session information for the daabase servers |
»» last_recorded_time | number | false | none | Unix time representing the last session information recorded time |
»» 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 representing the session start time |
»»» xact_start | number | false | none | Unix time representing the transaction start time |
»»» query_start | number | false | none | Unix time representing the query start time (if any 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 a 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 monitoried locally) |
»»» swap_usage_mb | number | false | none | Swap memory usage (in MB) of the session (available only when monitoried locally) |
»»» cpu_usage | number | false | none | CPU Usage (in percentage) of the session (available only when monitoried locally) |
»»» io_read_bytes | number | false | none | I/O Read (in bytes) of the session (available only when monitoried locally) |
»»» io_write_bytes | number | false | none | I/O Write (in bytes) of the session (available only when monitoried locally) |
»»» state | string | false | none | Current state of the session (idle, active, idle in transcation, etc) |
»»» state_change | number | false | none | Unix time representing the last state change time of 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/v4/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/v4/server/status/{server_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v4/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}
Retrieve of the status of the 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