EDB Postgres Enterprise Manager REST APIs v3.0: Alerts v10.2
get__alert_config_global_
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/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/v3/alert/config/global/', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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 } ]
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. |
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/v3/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/v3/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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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 }
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/v3/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/v3/alert/config/global/{id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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 }
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/v3/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/v3/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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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 }
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/v3/alert/config/global/{id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v3/alert/config/global/{id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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/v3/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/v3/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/v3/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 } ]
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. |
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/v3/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/v3/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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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 }
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/v3/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/v3/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/v3/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 }
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/v3/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/v3/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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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 }
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/v3/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/v3/alert/config/agent/{agent_id}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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/v3/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/v3/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/v3/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 } ]
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. |
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/v3/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/v3/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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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 }
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/v3/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/v3/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/v3/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 }
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/v3/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/v3/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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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 }
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/v3/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/v3/alert/config/server/{server_id}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/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/v3/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/v3/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/v3/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 } ]
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. |
Info
This operation does not require authentication
post__alert_config_server_{server_id}_database_{database_name}
Code samples
# You can also use wget curl -X POST https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name} \ -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/v3/alert/config/server/{server_id}/database/{database_name}', 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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
POST /alert/config/server/{server_id}/database/{database_name}
Create Alert
for database 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 }
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 |
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}_database_{database_name}_{alert_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/{alert_id}', { 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}/{alert_id}
Gets Alerts
for database level by server_id, database_name and alert_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
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 }
Responses
Info
This operation does not require authentication
put__alert_config_server_{server_id}_database_{database_name}_{alert_id}
Code samples
# You can also use wget curl -X PUT https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/{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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/{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}/database/{database_name}/{alert_id}
Update Alert
for database 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
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}_database_{database_name}_{alert_id}
Code samples
# You can also use wget curl -X DELETE https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/{alert_id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/{alert_id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
DELETE /alert/config/server/{server_id}/database/{database_name}/{alert_id}
Delete the Alert
object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
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}_schema_{schema_name}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_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}/schema/{schema_name}
Gets Alerts
for schema level by server_id, database_name and schema_name.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema 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 } ]
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. |
Info
This operation does not require authentication
post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}
Code samples
# You can also use wget curl -X POST https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name} \ -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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}', 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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}
Create Alert
for schema 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
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}_database_{database_name}_schema_{schema_name}_{alert_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}', { 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}/schema/{schema_name}/{alert_id}
Gets Alerts
for schema level by server_id, database_name, schema_name and alert_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
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 }
Responses
Info
This operation does not require authentication
put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_{alert_id}
Code samples
# You can also use wget curl -X PUT https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{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}/database/{database_name}/schema/{schema_name}/{alert_id}
Update Alert
for schema 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
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}_database_{database_name}_schema_{schema_name}_{alert_id}
Code samples
# You can also use wget curl -X DELETE https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/{alert_id}
Delete the Alert
object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
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}_schema_{schema_name}_table_{table_name}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_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}/schema/{schema_name}/table/{table_name}
Gets Alerts
for table level by server_id, database_name, schema_name and table_name.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
table_name | path | string | true | Table 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 } ]
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. |
Info
This operation does not require authentication
post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_table_{table_name}
Code samples
# You can also use wget curl -X POST https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name} \ -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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}', 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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}
Create Alert
for table 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
table_name | path | string | true | Table Name |
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}_database_{database_name}_schema_{schema_name}_table_{table_name}_{alert_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}', { 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}/schema/{schema_name}/table/{table_name}/{alert_id}
Gets Alerts
for table level by server_id, database_name, schema_name, table_name and alert_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
table_name | path | string | true | Table Name |
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 }
Responses
Info
This operation does not require authentication
put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_table_{table_name}_{alert_id}
Code samples
# You can also use wget curl -X PUT https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{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}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}
Update Alert
for table 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
table_name | path | string | true | Table Name |
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}_database_{database_name}_schema_{schema_name}_table_{table_name}_{alert_id}
Code samples
# You can also use wget curl -X DELETE https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/table/{table_name}/{alert_id}
Delete the Alert
object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
table_name | path | string | true | Table Name |
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}_schema_{schema_name}_index_{index_name}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_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}/schema/{schema_name}/index/{index_name}
Gets Alerts
for index level by server_id, database_name, schema_name and index_name.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
index_name | path | string | true | Index 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 } ]
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. |
Info
This operation does not require authentication
post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_index_{index_name}
Code samples
# You can also use wget curl -X POST https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name} \ -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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}', 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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}
Create Alert
for index 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
index_name | path | string | true | Index Name |
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}_database_{database_name}_schema_{schema_name}_index_{index_name}_{alert_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}', { 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}/schema/{schema_name}/index/{index_name}/{alert_id}
Gets Alerts
for index level by server_id, database_name, schema_name, index_name and alert_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
index_name | path | string | true | Index Name |
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 }
Responses
Info
This operation does not require authentication
put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_index_{index_name}_{alert_id}
Code samples
# You can also use wget curl -X PUT https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{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}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}
Update Alert
for index 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
index_name | path | string | true | Index Name |
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}_database_{database_name}_schema_{schema_name}_index_{index_name}_{alert_id}
Code samples
# You can also use wget curl -X DELETE https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/index/{index_name}/{alert_id}
Delete the Alert
object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
index_name | path | string | true | Index Name |
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}_schema_{schema_name}_sequence_{sequence_name}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_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}/schema/{schema_name}/sequence/{sequence_name}
Gets Alerts
for sequence level by server_id, database_name, schema_name and sequence_name.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
sequence_name | path | string | true | Sequence 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 } ]
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. |
Info
This operation does not require authentication
post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_sequence_{sequence_name}
Code samples
# You can also use wget curl -X POST https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name} \ -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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}', 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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}
Create Alert
for sequence 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
sequence_name | path | string | true | Sequence Name |
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}_database_{database_name}_schema_{schema_name}_sequence_{sequence_name}_{alert_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}', { 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}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}
Gets Alerts
for sequence level by server_id, database_name, schema_name, sequence_name and alert_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
sequence_name | path | string | true | Sequence Name |
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 }
Responses
Info
This operation does not require authentication
put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_sequence_{sequence_name}_{alert_id}
Code samples
# You can also use wget curl -X PUT https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{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}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}
Update Alert
for sequence 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
sequence_name | path | string | true | Sequence Name |
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}_database_{database_name}_schema_{schema_name}_sequence_{sequence_name}_{alert_id}
Code samples
# You can also use wget curl -X DELETE https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/sequence/{sequence_name}/{alert_id}
Delete the Alert
object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
sequence_name | path | string | true | Sequence Name |
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}_schema_{schema_name}_view_{view_name}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_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}/schema/{schema_name}/view/{view_name}
Gets Alerts
for view level by server_id, database_name, schema_name and view_name.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
view_name | path | string | true | View 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 } ]
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. |
Info
This operation does not require authentication
post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_view_{view_name}
Code samples
# You can also use wget curl -X POST https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name} \ -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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}', 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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}
Create Alert
for view 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
view_name | path | string | true | View Name |
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}_database_{database_name}_schema_{schema_name}_view_{view_name}_{alert_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}/{alert_id}', { 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}/schema/{schema_name}/view/{view_name}/{alert_id}
Gets Alerts
for view level by server_id, database_name, schema_name, view_name and alert_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
view_name | path | string | true | View Name |
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 }
Responses
Info
This operation does not require authentication
put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_view_{view_name}_{alert_id}
Code samples
# You can also use wget curl -X PUT https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}/{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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}/{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}/database/{database_name}/schema/{schema_name}/view/{view_name}/{alert_id}
Update Alert
for view 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
view_name | path | string | true | View Name |
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}_database_{database_name}_schema_{schema_name}_view_{view_name}_{alert_id}
Code samples
# You can also use wget curl -X DELETE https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}/{alert_id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}/{alert_id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/view/{view_name}/{alert_id}
Delete the Alert
object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
view_name | path | string | true | View Name |
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}_schema_{schema_name}_function_{function_name}_args_{function_arguments}_
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/ \ -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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/', { 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}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/
Gets Alerts
for function level by server_id, database_name, schema_name and function_name.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
function_name | path | string | true | Function Name |
function_arguments | path | string | true | Function arguments comma separated |
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 } ]
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. |
Info
This operation does not require authentication
post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_function_{function_name}_args_{function_arguments}_
Code samples
# You can also use wget curl -X POST https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/ \ -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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/', 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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
POST /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/
Create Alert
for function 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
function_name | path | string | true | Function Name |
function_arguments | path | string | true | Function arguments comma separated |
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}_database_{database_name}_schema_{schema_name}_function_{function_name}_args_{function_arguments}_{alert_id}
Code samples
# You can also use wget curl -X GET https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}', headers = headers) print(r.json())
const headers = { 'Accept':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}', { 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}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}
Gets Alerts
for function level by server_id, database_name, schema_name, function_name and alert_id.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
function_name | path | string | true | Function Name |
function_arguments | path | string | true | Function arguments comma separated |
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 }
Responses
Info
This operation does not require authentication
put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_function_{function_name}_args_{function_arguments}_{alert_id}
Code samples
# You can also use wget curl -X PUT https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{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/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{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 }'; const headers = { 'Content-Type':'application/json', 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{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}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}
Update Alert
for function 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 }
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
function_name | path | string | true | Function Name |
function_arguments | path | string | true | Function arguments comma separated |
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}_database_{database_name}_schema_{schema_name}_function_{function_name}_args_{function_arguments}_{alert_id}
Code samples
# You can also use wget curl -X DELETE https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id} \ -H 'X-Auth-Token: string'
import requests headers = { 'X-Auth-Token': 'string' } r = requests.delete('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}', headers = headers) print(r.json())
const headers = { 'X-Auth-Token':'string' }; fetch('https://PEM-SERVER-IP/api/v3/alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}', { method: 'DELETE', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); });
DELETE /alert/config/server/{server_id}/database/{database_name}/schema/{schema_name}/function/{function_name}/args/{function_arguments}/{alert_id}
Delete the Alert
object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
server_id | path | integer | true | Server ID |
database_name | path | string | true | Database Name |
schema_name | path | string | true | Schema Name |
function_name | path | string | true | Function Name |
function_arguments | path | string | true | Function arguments comma separated |
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
- On this page
- get__alert_config_global_
- post__alert_config_global_
- get__alert_config_global_{id}
- put__alert_config_global_{id}
- delete__alert_config_global_{id}
- get__alert_config_agent_{agent_id}
- post__alert_config_agent_{agent_id}
- get__alert_config_agent_{agent_id}_{alert_id}
- put__alert_config_agent_{agent_id}_{alert_id}
- delete__alert_config_agent_{agent_id}_{alert_id}
- get__alert_config_server_{server_id}
- post__alert_config_server_{server_id}
- get__alert_config_server_{server_id}_{alert_id}
- put__alert_config_server_{server_id}_{alert_id}
- delete__alert_config_server_{server_id}_{alert_id}
- get__alert_config_server_{server_id}_database_{database_name}
- post__alert_config_server_{server_id}_database_{database_name}
- get__alert_config_server_{server_id}_database_{database_name}_{alert_id}
- put__alert_config_server_{server_id}_database_{database_name}_{alert_id}
- delete__alert_config_server_{server_id}_database_{database_name}_{alert_id}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}
- post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_{alert_id}
- put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_{alert_id}
- delete__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_{alert_id}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_table_{table_name}
- post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_table_{table_name}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_table_{table_name}_{alert_id}
- put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_table_{table_name}_{alert_id}
- delete__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_table_{table_name}_{alert_id}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_index_{index_name}
- post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_index_{index_name}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_index_{index_name}_{alert_id}
- put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_index_{index_name}_{alert_id}
- delete__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_index_{index_name}_{alert_id}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_sequence_{sequence_name}
- post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_sequence_{sequence_name}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_sequence_{sequence_name}_{alert_id}
- put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_sequence_{sequence_name}_{alert_id}
- delete__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_sequence_{sequence_name}_{alert_id}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_view_{view_name}
- post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_view_{view_name}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_view_{view_name}_{alert_id}
- put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_view_{view_name}_{alert_id}
- delete__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_view_{view_name}_{alert_id}
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_function_{function_name}_args_{function_arguments}_
- post__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_function_{function_name}_args_{function_arguments}_
- get__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_function_{function_name}_args_{function_arguments}_{alert_id}
- put__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_function_{function_name}_args_{function_arguments}_{alert_id}
- delete__alert_config_server_{server_id}_database_{database_name}_schema_{schema_name}_function_{function_name}_args_{function_arguments}_{alert_id}