EDB Postgres Enterprise Manager REST APIs v6.0: Alerts v10.2
get__alert_config_global_
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v6/alert/config/global/ \ -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/v6/alert/config/global/', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/global/', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
GET /alert/config/global/
Gets Alerts
for global level.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Auth-Token | header | string | true | Token of authorization |
Example responses
200 Response
[ { "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "send_email": true, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] } ]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful response | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [Alert] | false | none | none |
» id | integer | false | none | Alert Id. NOTE: It is not applicable for POST request. |
» alert_name | string | false | none | Name of the alert. NOTE: It is a mandatory parameter for the POST request. |
» alert_template | integer | false | none | ID of the alert template, positive integer value. NOTE: It is a mandatory parameter for the POST request. |
» description | string | false | none | none |
» enabled | boolean | false | none | Defines whether this alert is enabled/disabled. NOTE: It is a mandatory parameter for the POST request. |
» history_retention | integer | false | none | For how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: It is a mandatory parameter for the POST request. |
» frequency_min | integer | false | none | Defines how frequently the alert needs to be checked on PEM database server. Possible values are from 1 to 65534 minutes. NOTE: It is a mandatory parameter for the POST request. |
» operator | string | false | none | Defines the operator for checking the threshold values. Valid string are ">" and "<". NOTE: It is a mandatory parameter for the POST request. |
» low_threshold_value | number | false | none | Threshold value for triggering the low alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» medium_threshold_value | number | false | none | Threshold value for triggering the medium alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» high_threshold_value | number | false | none | Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» send_email | boolean | false | none | Defines whether to send an email, when the state of alert is changed. |
» all_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'email_group_id' when state of the alert is changed. |
» email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of alert is changed. |
» low_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'low_email_group_id' when state of the alert is set to LOW. |
» low_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to LOW. |
» med_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'medium_email_group_id' when state of the alert is set to MEDIUM. |
» med_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to MEDIUM. |
» high_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'high_email_group_id' when state of the alert is set to HIGH. |
» high_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to HIGH. |
» send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when the state of the alert changes. |
» snmp_trap_version | integer | false | none | Defines the SNMP trap version. Supported SNMP trap version is 1, 2 or 3 |
» low_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to LOW. |
» med_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to MEDIUM. |
» high_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to HIGH. |
» params | [AlertParams] | false | none | List of the parameter/value pair to be used by the alert template for checking the alerts. NOTE: The all parameter must be defined as per the alert template. |
»» paramname | string | false | none | Name of the parameter. NOTE: This has to present on the alert template parameter list. |
»» paramvalue | string | false | none | Value for the given parameter |
» execute_script | boolean | false | none | Defines whether to execute the provided script if the state of the alert is changed to LOW/MEDIUM/HIGH. |
» execute_script_on_clear | boolean | false | none | Defines whether to execute the provided script if the state of the alert is cleared. |
» execute_script_on_pem_server | boolean | false | none | Defines whether to execute the provided script on the PEM Host, or on the host from where the object is being monitored by the agent. |
» script_code | string | false | none | The script, which will be executed. It could be a shell/batch script. Please read the documention for detailed information. |
» submit_to_nagios | boolean | false | none | Defines whether to send notification to the nagios, when state of the alert is chagned. |
» override_default_config | boolean | false | none | Defines whether the default webhook configuration is override or not. |
» send_notification | boolean | false | none | Defines whether the webhook send notification enabled. |
» low_webhook_ids | [integer] | false | none | Webhook ids for which low alerts are configured. |
» med_webhook_ids | [integer] | false | none | Webhook ids for which medium alerts are configured. |
» high_webhook_ids | [integer] | false | none | Webhook ids for which high alerts are configured. |
» cleared_webhook_ids | [integer] | false | none | Webhook ids for which cleared alerts are configured. |
Info
This operation does not require authentication
post__alert_config_global_
Code samples
# You can also use wget curl -X POST https://PEM-SERVER-IP/api/v6/alert/config/global/ \ -H 'Content-Type: application/json' \ -H 'X-Auth-Token: string'
import requests headers = { 'Content-Type': 'application/json', 'X-Auth-Token': 'string' } r = requests.post('https://PEM-SERVER-IP/api/v6/alert/config/global/', headers = headers) print(r.json())
const inputBody = '{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/global/', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
POST /alert/config/global/
Create Alert
for global level.
Body parameter
{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Auth-Token | header | string | true | Token of authorization |
body | body | AlertPayload | true | none |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Status 200 | None |
Response Schema
Info
This operation does not require authentication
get__alert_config_global_{id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v6/alert/config/global/{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/v6/alert/config/global/{id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/global/{id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
GET /alert/config/global/{id}
Gets Alerts
for global level by alert_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer | true | Alert ID |
X-Auth-Token | header | string | true | Token of authorization |
Example responses
200 Response
{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "send_email": true, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }
Responses
Info
This operation does not require authentication
put__alert_config_global_{id}
Code samples
# You can also use wget curl -X PUT https://PEM-SERVER-IP/api/v6/alert/config/global/{id} \ -H 'Content-Type: application/json' \ -H 'X-Auth-Token: string'
import requests headers = { 'Content-Type': 'application/json', 'X-Auth-Token': 'string' } r = requests.put('https://PEM-SERVER-IP/api/v6/alert/config/global/{id}', headers = headers) print(r.json())
const inputBody = '{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/global/{id}', { method: 'PUT', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
PUT /alert/config/global/{id}
Update Alert
for global level.
Body parameter
{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer | true | Alert ID |
X-Auth-Token | header | string | true | Token of authorization |
body | body | AlertPayload | true | none |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Status 200 | None |
Response Schema
Info
This operation does not require authentication
delete__alert_config_global_{id}
Code samples
# You can also use wget curl -X DELETE https://PEM-SERVER-IP/api/v6/alert/config/global/{id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v6/alert/config/global/{id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/global/{id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
DELETE /alert/config/global/{id}
Delete the Alert
object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer | true | Alert ID |
X-Auth-Token | header | string | true | Token of authorization |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful deletion | None |
Response Schema
Info
This operation does not require authentication
get__alert_config_agent_{agent_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v6/alert/config/agent/{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/v6/alert/config/agent/{agent_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
GET /alert/config/agent/{agent_id}
Gets Alerts
for agent level by agent_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
agent_id | path | integer | true | Agent ID |
X-Auth-Token | header | string | true | Token of authorization |
Example responses
200 Response
[ { "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "send_email": true, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] } ]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful response | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [Alert] | false | none | none |
» id | integer | false | none | Alert Id. NOTE: It is not applicable for POST request. |
» alert_name | string | false | none | Name of the alert. NOTE: It is a mandatory parameter for the POST request. |
» alert_template | integer | false | none | ID of the alert template, positive integer value. NOTE: It is a mandatory parameter for the POST request. |
» description | string | false | none | none |
» enabled | boolean | false | none | Defines whether this alert is enabled/disabled. NOTE: It is a mandatory parameter for the POST request. |
» history_retention | integer | false | none | For how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: It is a mandatory parameter for the POST request. |
» frequency_min | integer | false | none | Defines how frequently the alert needs to be checked on PEM database server. Possible values are from 1 to 65534 minutes. NOTE: It is a mandatory parameter for the POST request. |
» operator | string | false | none | Defines the operator for checking the threshold values. Valid string are ">" and "<". NOTE: It is a mandatory parameter for the POST request. |
» low_threshold_value | number | false | none | Threshold value for triggering the low alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» medium_threshold_value | number | false | none | Threshold value for triggering the medium alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» high_threshold_value | number | false | none | Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» send_email | boolean | false | none | Defines whether to send an email, when the state of alert is changed. |
» all_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'email_group_id' when state of the alert is changed. |
» email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of alert is changed. |
» low_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'low_email_group_id' when state of the alert is set to LOW. |
» low_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to LOW. |
» med_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'medium_email_group_id' when state of the alert is set to MEDIUM. |
» med_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to MEDIUM. |
» high_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'high_email_group_id' when state of the alert is set to HIGH. |
» high_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to HIGH. |
» send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when the state of the alert changes. |
» snmp_trap_version | integer | false | none | Defines the SNMP trap version. Supported SNMP trap version is 1, 2 or 3 |
» low_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to LOW. |
» med_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to MEDIUM. |
» high_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to HIGH. |
» params | [AlertParams] | false | none | List of the parameter/value pair to be used by the alert template for checking the alerts. NOTE: The all parameter must be defined as per the alert template. |
»» paramname | string | false | none | Name of the parameter. NOTE: This has to present on the alert template parameter list. |
»» paramvalue | string | false | none | Value for the given parameter |
» execute_script | boolean | false | none | Defines whether to execute the provided script if the state of the alert is changed to LOW/MEDIUM/HIGH. |
» execute_script_on_clear | boolean | false | none | Defines whether to execute the provided script if the state of the alert is cleared. |
» execute_script_on_pem_server | boolean | false | none | Defines whether to execute the provided script on the PEM Host, or on the host from where the object is being monitored by the agent. |
» script_code | string | false | none | The script, which will be executed. It could be a shell/batch script. Please read the documention for detailed information. |
» submit_to_nagios | boolean | false | none | Defines whether to send notification to the nagios, when state of the alert is chagned. |
» override_default_config | boolean | false | none | Defines whether the default webhook configuration is override or not. |
» send_notification | boolean | false | none | Defines whether the webhook send notification enabled. |
» low_webhook_ids | [integer] | false | none | Webhook ids for which low alerts are configured. |
» med_webhook_ids | [integer] | false | none | Webhook ids for which medium alerts are configured. |
» high_webhook_ids | [integer] | false | none | Webhook ids for which high alerts are configured. |
» cleared_webhook_ids | [integer] | false | none | Webhook ids for which cleared alerts are configured. |
Info
This operation does not require authentication
post__alert_config_agent_{agent_id}
Code samples
# You can also use wget curl -X POST https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id} \ -H 'Content-Type: application/json' \ -H 'X-Auth-Token: string'
import requests headers = { 'Content-Type': 'application/json', 'X-Auth-Token': 'string' } r = requests.post('https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}', headers = headers) print(r.json())
const inputBody = '{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
POST /alert/config/agent/{agent_id}
Create Alert
for agent level.
Body parameter
{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
agent_id | path | integer | true | Agent ID |
X-Auth-Token | header | string | true | Token of authorization |
body | body | AlertPayload | true | none |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Status 200 | None |
Response Schema
Info
This operation does not require authentication
get__alert_config_agent_{agent_id}_{alert_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}/{alert_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/v6/alert/config/agent/{agent_id}/{alert_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}/{alert_id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
GET /alert/config/agent/{agent_id}/{alert_id}
Gets Alerts
for agent level by agent_id and alert_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
agent_id | path | integer | true | Agent ID |
alert_id | path | integer | true | Alert ID |
X-Auth-Token | header | string | true | Token of authorization |
Example responses
200 Response
{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "send_email": true, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }
Responses
Info
This operation does not require authentication
put__alert_config_agent_{agent_id}_{alert_id}
Code samples
# You can also use wget curl -X PUT https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}/{alert_id} \ -H 'Content-Type: application/json' \ -H 'X-Auth-Token: string'
import requests headers = { 'Content-Type': 'application/json', 'X-Auth-Token': 'string' } r = requests.put('https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}/{alert_id}', headers = headers) print(r.json())
const inputBody = '{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}/{alert_id}', { method: 'PUT', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
PUT /alert/config/agent/{agent_id}/{alert_id}
Update Alert
for agent level.
Body parameter
{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
agent_id | path | integer | true | Agent ID |
alert_id | path | integer | true | Alert ID |
X-Auth-Token | header | string | true | Token of authorization |
body | body | AlertPayload | true | none |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Status 200 | None |
Response Schema
Info
This operation does not require authentication
delete__alert_config_agent_{agent_id}_{alert_id}
Code samples
# You can also use wget curl -X DELETE https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}/{alert_id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/agent/{agent_id}/{alert_id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
DELETE /alert/config/agent/{agent_id}/{alert_id}
Delete the Alert
object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
agent_id | path | integer | true | Agent ID |
alert_id | path | integer | true | Alert ID |
X-Auth-Token | header | string | true | Token of authorization |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful deletion | None |
Response Schema
Info
This operation does not require authentication
get__alert_config_server_{server_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v6/alert/config/server/{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/v6/alert/config/server/{server_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
GET /alert/config/server/{server_id}
Gets Alerts
for server level by server_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
X-Auth-Token | header | string | true | Token of authorization |
Example responses
200 Response
[ { "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "send_email": true, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] } ]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful response | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [Alert] | false | none | none |
» id | integer | false | none | Alert Id. NOTE: It is not applicable for POST request. |
» alert_name | string | false | none | Name of the alert. NOTE: It is a mandatory parameter for the POST request. |
» alert_template | integer | false | none | ID of the alert template, positive integer value. NOTE: It is a mandatory parameter for the POST request. |
» description | string | false | none | none |
» enabled | boolean | false | none | Defines whether this alert is enabled/disabled. NOTE: It is a mandatory parameter for the POST request. |
» history_retention | integer | false | none | For how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: It is a mandatory parameter for the POST request. |
» frequency_min | integer | false | none | Defines how frequently the alert needs to be checked on PEM database server. Possible values are from 1 to 65534 minutes. NOTE: It is a mandatory parameter for the POST request. |
» operator | string | false | none | Defines the operator for checking the threshold values. Valid string are ">" and "<". NOTE: It is a mandatory parameter for the POST request. |
» low_threshold_value | number | false | none | Threshold value for triggering the low alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» medium_threshold_value | number | false | none | Threshold value for triggering the medium alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» high_threshold_value | number | false | none | Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» send_email | boolean | false | none | Defines whether to send an email, when the state of alert is changed. |
» all_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'email_group_id' when state of the alert is changed. |
» email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of alert is changed. |
» low_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'low_email_group_id' when state of the alert is set to LOW. |
» low_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to LOW. |
» med_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'medium_email_group_id' when state of the alert is set to MEDIUM. |
» med_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to MEDIUM. |
» high_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'high_email_group_id' when state of the alert is set to HIGH. |
» high_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to HIGH. |
» send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when the state of the alert changes. |
» snmp_trap_version | integer | false | none | Defines the SNMP trap version. Supported SNMP trap version is 1, 2 or 3 |
» low_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to LOW. |
» med_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to MEDIUM. |
» high_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to HIGH. |
» params | [AlertParams] | false | none | List of the parameter/value pair to be used by the alert template for checking the alerts. NOTE: The all parameter must be defined as per the alert template. |
»» paramname | string | false | none | Name of the parameter. NOTE: This has to present on the alert template parameter list. |
»» paramvalue | string | false | none | Value for the given parameter |
» execute_script | boolean | false | none | Defines whether to execute the provided script if the state of the alert is changed to LOW/MEDIUM/HIGH. |
» execute_script_on_clear | boolean | false | none | Defines whether to execute the provided script if the state of the alert is cleared. |
» execute_script_on_pem_server | boolean | false | none | Defines whether to execute the provided script on the PEM Host, or on the host from where the object is being monitored by the agent. |
» script_code | string | false | none | The script, which will be executed. It could be a shell/batch script. Please read the documention for detailed information. |
» submit_to_nagios | boolean | false | none | Defines whether to send notification to the nagios, when state of the alert is chagned. |
» override_default_config | boolean | false | none | Defines whether the default webhook configuration is override or not. |
» send_notification | boolean | false | none | Defines whether the webhook send notification enabled. |
» low_webhook_ids | [integer] | false | none | Webhook ids for which low alerts are configured. |
» med_webhook_ids | [integer] | false | none | Webhook ids for which medium alerts are configured. |
» high_webhook_ids | [integer] | false | none | Webhook ids for which high alerts are configured. |
» cleared_webhook_ids | [integer] | false | none | Webhook ids for which cleared alerts are configured. |
Info
This operation does not require authentication
post__alert_config_server_{server_id}
Code samples
# You can also use wget curl -X POST https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id} \ -H 'Content-Type: application/json' \ -H 'X-Auth-Token: string'
import requests headers = { 'Content-Type': 'application/json', 'X-Auth-Token': 'string' } r = requests.post('https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}', headers = headers) print(r.json())
const inputBody = '{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
POST /alert/config/server/{server_id}
Create Alert
for server level.
Body parameter
{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
X-Auth-Token | header | string | true | Token of authorization |
body | body | AlertPayload | true | none |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Status 200 | None |
Response Schema
Info
This operation does not require authentication
get__alert_config_server_{server_id}_{alert_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}/{alert_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/v6/alert/config/server/{server_id}/{alert_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}/{alert_id}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
GET /alert/config/server/{server_id}/{alert_id}
Gets Alerts
for server level by server_id and alert_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
alert_id | path | integer | true | Alert ID |
X-Auth-Token | header | string | true | Token of authorization |
Example responses
200 Response
{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "send_email": true, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }
Responses
Info
This operation does not require authentication
put__alert_config_server_{server_id}_{alert_id}
Code samples
# You can also use wget curl -X PUT https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}/{alert_id} \ -H 'Content-Type: application/json' \ -H 'X-Auth-Token: string'
import requests headers = { 'Content-Type': 'application/json', 'X-Auth-Token': 'string' } r = requests.put('https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}/{alert_id}', headers = headers) print(r.json())
const inputBody = '{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}/{alert_id}', { method: 'PUT', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
PUT /alert/config/server/{server_id}/{alert_id}
Update Alert
for server level.
Body parameter
{ "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
alert_id | path | integer | true | Alert ID |
X-Auth-Token | header | string | true | Token of authorization |
body | body | AlertPayload | true | none |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Status 200 | None |
Response Schema
Info
This operation does not require authentication
delete__alert_config_server_{server_id}_{alert_id}
Code samples
# You can also use wget curl -X DELETE https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}/{alert_id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}/{alert_id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
DELETE /alert/config/server/{server_id}/{alert_id}
Delete the Alert
object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
alert_id | path | integer | true | Alert ID |
X-Auth-Token | header | string | true | Token of authorization |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful deletion | None |
Response Schema
Info
This operation does not require authentication
get__alert_config_server_{server_id}_database_{database_name}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}/database/{database_name} \ -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/v6/alert/config/server/{server_id}/database/{database_name}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v6/alert/config/server/{server_id}/database/{database_name}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
GET /alert/config/server/{server_id}/database/{database_name}
Gets Alerts
for database level by server_id and database_name.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
X-Auth-Token | header | string | true | Token of authorization |
Example responses
200 Response
[ { "id": 0, "alert_name": "string", "alert_template": 0, "description": "string", "enabled": true, "history_retention": 0, "frequency_min": 0, "operator": "string", "low_threshold_value": 0, "medium_threshold_value": 0, "high_threshold_value": 0, "send_email": true, "all_alert_enable": true, "email_group_id": 0, "low_alert_enable": true, "low_email_group_id": 0, "med_alert_enable": true, "med_email_group_id": 0, "high_alert_enable": true, "high_email_group_id": 0, "send_trap": true, "snmp_trap_version": 0, "low_send_trap": true, "med_send_trap": true, "high_send_trap": true, "params": [ { "paramname": "string", "paramvalue": "string" } ], "execute_script": true, "execute_script_on_clear": true, "execute_script_on_pem_server": true, "script_code": "string", "submit_to_nagios": true, "override_default_config": true, "send_notification": true, "low_webhook_ids": [ 0 ], "med_webhook_ids": [ 0 ], "high_webhook_ids": [ 0 ], "cleared_webhook_ids": [ 0 ] } ]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful response | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [Alert] | false | none | none |
» id | integer | false | none | Alert Id. NOTE: It is not applicable for POST request. |
» alert_name | string | false | none | Name of the alert. NOTE: It is a mandatory parameter for the POST request. |
» alert_template | integer | false | none | ID of the alert template, positive integer value. NOTE: It is a mandatory parameter for the POST request. |
» description | string | false | none | none |
» enabled | boolean | false | none | Defines whether this alert is enabled/disabled. NOTE: It is a mandatory parameter for the POST request. |
» history_retention | integer | false | none | For how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: It is a mandatory parameter for the POST request. |
» frequency_min | integer | false | none | Defines how frequently the alert needs to be checked on PEM database server. Possible values are from 1 to 65534 minutes. NOTE: It is a mandatory parameter for the POST request. |
» operator | string | false | none | Defines the operator for checking the threshold values. Valid string are ">" and "<". NOTE: It is a mandatory parameter for the POST request. |
» low_threshold_value | number | false | none | Threshold value for triggering the low alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» medium_threshold_value | number | false | none | Threshold value for triggering the medium alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» high_threshold_value | number | false | none | Threshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request. |
» send_email | boolean | false | none | Defines whether to send an email, when the state of alert is changed. |
» all_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'email_group_id' when state of the alert is changed. |
» email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of alert is changed. |
» low_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'low_email_group_id' when state of the alert is set to LOW. |
» low_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to LOW. |
» med_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'medium_email_group_id' when state of the alert is set to MEDIUM. |
» med_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to MEDIUM. |
» high_alert_enable | boolean | false | none | Defines whether to send an email notification to the group, specified by the parameter 'high_email_group_id' when state of the alert is set to HIGH. |
» high_email_group_id | integer | false | none | Defines to which email group the email notification will be sent, when state of the alert is changed to HIGH. |
» send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when the state of the alert changes. |
» snmp_trap_version | integer | false | none | Defines the SNMP trap version. Supported SNMP trap version is 1, 2 or 3 |
» low_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to LOW. |
» med_send_trap | boolean | false | none | Defines whether to send the SNMP trap notification when state of the alert chagnes to MEDIUM. |