EDB Postgres Enterprise Manager REST APIs v6.0: Schemas v10.2

AlertPayload

{
  "id": 0,
  "alert_name": "string",
  "alert_template": 0,
  "description": "string",
  "enabled": true,
  "history_retention": 0,
  "frequency_min": 0,
  "operator": "string",
  "low_threshold_value": 0,
  "medium_threshold_value": 0,
  "high_threshold_value": 0,
  "all_alert_enable": true,
  "email_group_id": 0,
  "low_alert_enable": true,
  "low_email_group_id": 0,
  "med_alert_enable": true,
  "med_email_group_id": 0,
  "high_alert_enable": true,
  "high_email_group_id": 0,
  "send_trap": true,
  "snmp_trap_version": 0,
  "low_send_trap": true,
  "med_send_trap": true,
  "high_send_trap": true,
  "params": [
    {
      "paramname": "string",
      "paramvalue": "string"
    }
  ],
  "execute_script": true,
  "execute_script_on_clear": true,
  "execute_script_on_pem_server": true,
  "script_code": "string",
  "submit_to_nagios": true,
  "override_default_config": true,
  "send_notification": true,
  "low_webhook_ids": [
    0
  ],
  "med_webhook_ids": [
    0
  ],
  "high_webhook_ids": [
    0
  ],
  "cleared_webhook_ids": [
    0
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
idintegerfalsenoneAlert Id. NOTE: It is not applicable for POST request.
alert_namestringfalsenoneName of the alert. NOTE: It is a mandatory parameter for the POST request.
alert_templateintegerfalsenoneID of the alert template, positive integer value. NOTE: It is a mandatory parameter for the POST request.
descriptionstringfalsenonenone
enabledbooleanfalsenoneDefines whether this alert is enabled/disabled. NOTE: It is a mandatory parameter for the POST request.
history_retentionintegerfalsenoneFor 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_minintegerfalsenoneDefines 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.
operatorstringfalsenoneDefines the operator for checking the threshold values. Valid string are ">" and "<". NOTE: It is a mandatory parameter for the POST request.
low_threshold_valuenumberfalsenoneThreshold 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_valuenumberfalsenoneThreshold 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_valuenumberfalsenoneThreshold value for triggering the high alert. It can be any valid integer/float value. NOTE: It is a mandatory parameter for the POST request.
all_alert_enablebooleanfalsenoneDefines 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_idintegerfalsenoneDefines to which email group the email notification will be sent, when state of alert is changed.
low_alert_enablebooleanfalsenoneDefines 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_idintegerfalsenoneDefines to which email group the email notification will be sent, when state of the alert is changed to LOW.
med_alert_enablebooleanfalsenoneDefines 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_idintegerfalsenoneDefines to which email group the email notification will be sent, when state of the alert is changed to MEDIUM.
high_alert_enablebooleanfalsenoneDefines 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_idintegerfalsenoneDefines to which email group the email notification will be sent, when state of the alert is changed to HIGH.
send_trapbooleanfalsenoneDefines whether to send the SNMP trap notification when the state of the alert changes.
snmp_trap_versionintegerfalsenoneDefines the SNMP trap version. Supported SNMP trap version is 1, 2 or 3
low_send_trapbooleanfalsenoneDefines whether to send the SNMP trap notification when state of the alert chagnes to LOW.
med_send_trapbooleanfalsenoneDefines whether to send the SNMP trap notification when state of the alert chagnes to MEDIUM.
high_send_trapbooleanfalsenoneDefines whether to send the SNMP trap notification when state of the alert chagnes to HIGH.
params[AlertParams]falsenoneList 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.
execute_scriptbooleanfalsenoneDefines whether to execute the provided script if the state of the alert is changed to LOW/MEDIUM/HIGH.
execute_script_on_clearbooleanfalsenoneDefines whether to execute the provided script if the state of the alert is cleared.
execute_script_on_pem_serverbooleanfalsenoneDefines 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_codestringfalsenoneThe script, which will be executed. It could be a shell/batch script. Please read the documention for detailed information.
submit_to_nagiosbooleanfalsenoneDefines whether to send notification to the nagios, when state of the alert is chagned.
override_default_configbooleanfalsenoneDefines whether the default webhook configuration is override or not.
send_notificationbooleanfalsenoneDefines whether the webhook send notification enabled.
low_webhook_ids[integer]falsenoneDefines webhook ids for which low alerts to be configured.
med_webhook_ids[integer]falsenoneDefines webhook ids for which medium alerts to be configured.
high_webhook_ids[integer]falsenoneDefines webhook ids for which high alerts to be configured.
cleared_webhook_ids[integer]falsenoneDefines webhook ids for which cleared alerts to be configured.

Alert

{
  "id": 0,
  "alert_name": "string",
  "alert_template": 0,
  "description": "string",
  "enabled": true,
  "history_retention": 0,
  "frequency_min": 0,
  "operator": "string",
  "low_threshold_value": 0,
  "medium_threshold_value": 0,
  "high_threshold_value": 0,
  "send_email": true,
  "all_alert_enable": true,
  "email_group_id": 0,
  "low_alert_enable": true,
  "low_email_group_id": 0,
  "med_alert_enable": true,
  "med_email_group_id": 0,
  "high_alert_enable": true,
  "high_email_group_id": 0,
  "send_trap": true,
  "snmp_trap_version": 0,
  "low_send_trap": true,
  "med_send_trap": true,
  "high_send_trap": true,
  "params": [
    {
      "paramname": "string",
      "paramvalue": "string"
    }
  ],
  "execute_script": true,
  "execute_script_on_clear": true,
  "execute_script_on_pem_server": true,
  "script_code": "string",
  "submit_to_nagios": true,
  "override_default_config": true,
  "send_notification": true,
  "low_webhook_ids": [
    0
  ],
  "med_webhook_ids": [
    0
  ],
  "high_webhook_ids": [
    0
  ],
  "cleared_webhook_ids": [
    0
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
idintegerfalsenoneAlert Id. NOTE: It is not applicable for POST request.
alert_namestringfalsenoneName of the alert. NOTE: It is a mandatory parameter for the POST request.
alert_templateintegerfalsenoneID of the alert template, positive integer value. NOTE: It is a mandatory parameter for the POST request.
descriptionstringfalsenonenone
enabledbooleanfalsenoneDefines whether this alert is enabled/disabled. NOTE: It is a mandatory parameter for the POST request.
history_retentionintegerfalsenoneFor 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_minintegerfalsenoneDefines 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.
operatorstringfalsenoneDefines the operator for checking the threshold values. Valid string are ">" and "<". NOTE: It is a mandatory parameter for the POST request.
low_threshold_valuenumberfalsenoneThreshold 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_valuenumberfalsenoneThreshold 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_valuenumberfalsenoneThreshold 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_emailbooleanfalsenoneDefines whether to send an email, when the state of alert is changed.
all_alert_enablebooleanfalsenoneDefines 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_idintegerfalsenoneDefines to which email group the email notification will be sent, when state of alert is changed.
low_alert_enablebooleanfalsenoneDefines 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_idintegerfalsenoneDefines to which email group the email notification will be sent, when state of the alert is changed to LOW.
med_alert_enablebooleanfalsenoneDefines 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_idintegerfalsenoneDefines to which email group the email notification will be sent, when state of the alert is changed to MEDIUM.
high_alert_enablebooleanfalsenoneDefines 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_idintegerfalsenoneDefines to which email group the email notification will be sent, when state of the alert is changed to HIGH.
send_trapbooleanfalsenoneDefines whether to send the SNMP trap notification when the state of the alert changes.
snmp_trap_versionintegerfalsenoneDefines the SNMP trap version. Supported SNMP trap version is 1, 2 or 3
low_send_trapbooleanfalsenoneDefines whether to send the SNMP trap notification when state of the alert chagnes to LOW.
med_send_trapbooleanfalsenoneDefines whether to send the SNMP trap notification when state of the alert chagnes to MEDIUM.
high_send_trapbooleanfalsenoneDefines whether to send the SNMP trap notification when state of the alert chagnes to HIGH.
params[AlertParams]falsenoneList 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.
execute_scriptbooleanfalsenoneDefines whether to execute the provided script if the state of the alert is changed to LOW/MEDIUM/HIGH.
execute_script_on_clearbooleanfalsenoneDefines whether to execute the provided script if the state of the alert is cleared.
execute_script_on_pem_serverbooleanfalsenoneDefines 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_codestringfalsenoneThe script, which will be executed. It could be a shell/batch script. Please read the documention for detailed information.
submit_to_nagiosbooleanfalsenoneDefines whether to send notification to the nagios, when state of the alert is chagned.
override_default_configbooleanfalsenoneDefines whether the default webhook configuration is override or not.
send_notificationbooleanfalsenoneDefines whether the webhook send notification enabled.
low_webhook_ids[integer]falsenoneWebhook ids for which low alerts are configured.
med_webhook_ids[integer]falsenoneWebhook ids for which medium alerts are configured.
high_webhook_ids[integer]falsenoneWebhook ids for which high alerts are configured.
cleared_webhook_ids[integer]falsenoneWebhook ids for which cleared alerts are configured.

AlertParams

{
  "paramname": "string",
  "paramvalue": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
paramnamestringfalsenoneName of the parameter. NOTE: This has to present on the alert template parameter list.
paramvaluestringfalsenoneValue for the given parameter

AlternateServerProbeCode

{
  "server_version_id": 0,
  "server_probe_code": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
server_version_idintegerfalsenoneServer version id for the support monitored server
server_version_idDatabase Server
10905PostgreSQL 9.5
10906PostgreSQL 9.6
11000PostgreSQL 10
11100PostgreSQL 11
11200PostgreSQL 12
11300PostgreSQL 13
20905Postgres Plus Advanced Server 9.5
20906Postgres Plus Advanced Server 9.6
21000EDB Postgres Advanced Server 10
21100EDB Postgres Advanced Server 11
21200EDB Postgres Advanced Server 12
21300EDB Postgres Advanced Server 13
server_probe_codestringfalsenoneSQL query to run on the specified server version

DeletedAlternateServerProbeCode

{
  "server_version_id": 0
}

Properties

NameTypeRequiredRestrictionsDescription
server_version_idintegerfalsenoneServer version id for the support monitored server
server_version_idDatabase Server
10905PostgreSQL 9.5
10906PostgreSQL 9.6
11000PostgreSQL 10
11100PostgreSQL 11
11200PostgreSQL 12
11300PostgreSQL 13
20905Postgres Plus Advanced Server 9.5
20906Postgres Plus Advanced Server 9.6
21000EDB Postgres Advanced Server 10
21100EDB Postgres Advanced Server 11
21200EDB Postgres Advanced Server 12
21300EDB Postgres Advanced Server 13

AlertImportExportTemplate

{
  "name": "string",
  "description": "string",
  "reference_id": "string",
  "default_history_retention": 0,
  "object_type": 0,
  "sql": "string",
  "applicable_on_server": "ALL",
  "default_check_frequency": 0,
  "threshold_unit": "string",
  "is_system_template": true,
  "is_auto_create": true,
  "thresholds": [
    0
  ],
  "operator": ">",
  "high_threshold_value": "string",
  "medium_threshold_value": "string",
  "low_threshold_value": "string",
  "info_sql": "string",
  "probes": [
    {
      "probe_name": "string",
      "collection_method": "w",
      "enabled": true,
      "target_type": 0,
      "any_server_version": true,
      "interval": 0,
      "lifetime": 0,
      "discard_history": true,
      "platform": "string",
      "probe_code": "string",
      "probe_columns": [
        {
          "pc_name": "string",
          "pc_data_type": "bigint",
          "pc_unit": "string",
          "pc_col_type": "m",
          "pc_graphable": true,
          "pc_calc_pit": true,
          "pc_pit_default": true
        }
      ],
      "alternate_code": [
        {
          "server_version_id": 0,
          "server_probe_code": "string"
        }
      ],
      "internal_name": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
namestringfalsenoneName of the alert template. NOTE: It is a mandatory parameter for the POST request.
descriptionstringfalsenoneDescription about the alert template. NOTE: It is a mandatory parameter for the POST request.
reference_idstringfalsenoneInternal identifier for the alert template.
default_history_retentionintegerfalsenoneDefines the history retention period in days for this type of alerts. NOTE: It is a mandatory parameter for the POST request.
object_typeintegerfalsenoneDefines the type of the object on which this alert template is applicable to.
  • System wide alert template will be 50.
  • An alert template applicable to an agent will be 100.
  • An alert template applicable to a managed server will be 200.
  • An alert template applicable to a database for a particular monitored server will be 300.
  • An alert template applicable to a schema on a particular database for the managed server will be 400.
  • An alert template applicable to a table on a particular schema for the database on a monitored server will be 500.
  • An alert template applicable to an index on a particular schema for the database on a monitored server will be 600.
  • An alert template applicable to a sequence on a particular schema for the database on a monitored server will be 700.
  • An alert template applicable to a function on a particular schema for the database on a monitored server will be 800.
NOTE: It is a mandatory parameter for the POST request.
sqlstringfalsenoneSQL query, possibly parameterized, to get a numeric indicating threshold reached. NOTE: It is a mandatory parameter for the POST request.
applicable_on_serverstringfalsenoneTemplate is applicable on which type of monitored server. Possible values are ALL, POSTGRES_SERVER, ADVANCED_SERVER. NOTE: It is a mandatory parameter for the POST request.
default_check_frequencyintegerfalsenoneDefines how frequently to check for the alert defined from this template (in minutes). NOTE: It is a mandatory parameter for the POST request.
threshold_unitstringfalsenoneUnit in which threshold is calculated; purely for GUI, like MB/kB/seconds/days/...
is_system_templatebooleanfalsenoneDefines whether the given template is system defined or user defined. NOTE: It is not applicable for the the POST/PUT requests.
is_auto_createbooleanfalsenoneWhether alert should be created as soon as agent or server is added to pem.
thresholds[number]falsenoneDefault threshold values. Values in the thresholds array must be in the sorted order based on the operator.
operatorstringfalsenoneOperator to compare threshold values.
high_threshold_valuestringfalsenoneHigh threshold value.
medium_threshold_valuestringfalsenoneMedium threshold value.
low_threshold_valuestringfalsenoneLow threshold value.
info_sqlstringfalsenoneSpecify the SQL query that will provide the detailed information about that alert on Dashboard.
probes[CustomProbeImportPostData]falsenonenone
Enumerated Values
PropertyValue
applicable_on_serverALL
applicable_on_serverPOSTGRES_SERVER
applicable_on_serverADVANCED_SERVER
operator>
operator<

CustomAlertTemplateExportData

{
  "alert_templates": [
    0
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
alert_templates[integer]falsenoneList of the alert template ids

CustomAlertTemplateExportResponseData

{
  "version": 1,
  "alert_templates": [
    {
      "name": "string",
      "description": "string",
      "reference_id": "string",
      "default_history_retention": 0,
      "object_type": 0,
      "sql": "string",
      "applicable_on_server": "ALL",
      "default_check_frequency": 0,
      "threshold_unit": "string",
      "is_system_template": true,
      "is_auto_create": true,
      "thresholds": [
        0
      ],
      "operator": ">",
      "high_threshold_value": "string",
      "medium_threshold_value": "string",
      "low_threshold_value": "string",
      "info_sql": "string",
      "probes": [
        {
          "probe_name": "string",
          "collection_method": "w",
          "enabled": true,
          "target_type": 0,
          "any_server_version": true,
          "interval": 0,
          "lifetime": 0,
          "discard_history": true,
          "platform": "string",
          "probe_code": "string",
          "probe_columns": [
            {
              "pc_name": "string",
              "pc_data_type": "bigint",
              "pc_unit": "string",
              "pc_col_type": "m",
              "pc_graphable": true,
              "pc_calc_pit": true,
              "pc_pit_default": true
            }
          ],
          "alternate_code": [
            {
              "server_version_id": 0,
              "server_probe_code": "string"
            }
          ],
          "internal_name": "string"
        }
      ]
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
versionintegerfalsenoneVersion of the alert template export.
alert_templates[AlertImportExportTemplate]falsenonenone

CustomAlertTemplateImportPostData

{
  "version": 1,
  "skip_overwrite": true,
  "skip_overwrite_probe": true,
  "alert_templates": [
    {
      "name": "string",
      "description": "string",
      "reference_id": "string",
      "default_history_retention": 0,
      "object_type": 0,
      "sql": "string",
      "applicable_on_server": "ALL",
      "default_check_frequency": 0,
      "threshold_unit": "string",
      "is_system_template": true,
      "is_auto_create": true,
      "thresholds": [
        0
      ],
      "operator": ">",
      "high_threshold_value": "string",
      "medium_threshold_value": "string",
      "low_threshold_value": "string",
      "info_sql": "string",
      "probes": [
        {
          "probe_name": "string",
          "collection_method": "w",
          "enabled": true,
          "target_type": 0,
          "any_server_version": true,
          "interval": 0,
          "lifetime": 0,
          "discard_history": true,
          "platform": "string",
          "probe_code": "string",
          "probe_columns": [
            {
              "pc_name": "string",
              "pc_data_type": "bigint",
              "pc_unit": "string",
              "pc_col_type": "m",
              "pc_graphable": true,
              "pc_calc_pit": true,
              "pc_pit_default": true
            }
          ],
          "alternate_code": [
            {
              "server_version_id": 0,
              "server_probe_code": "string"
            }
          ],
          "internal_name": "string"
        }
      ]
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
versionintegerfalsenoneVersion of the alert template export.
skip_overwritebooleanfalsenoneWhether existing alert template can be skipped
skip_overwrite_probebooleanfalsenoneWhether existing dependant probes can be skipped
alert_templates[AlertImportExportTemplate]falsenonenone

AlertTemplate

{
  "id": 0,
  "name": "string",
  "description": "string",
  "default_history_retention": 0,
  "object_type": 0,
  "sql": "string",
  "applicable_on_server": "ALL",
  "default_check_frequency": 0,
  "threshold_unit": "string",
  "is_system_template": true,
  "is_auto_create": true,
  "thresholds": [
    0
  ],
  "operator": ">",
  "high_threshold_value": "string",
  "medium_threshold_value": "string",
  "low_threshold_value": "string",
  "info_sql": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
idintegerfalsenoneIdentifier for the alert template. NOTE: It is not applicable while creating the alert template.
namestringfalsenoneName of the alert template. NOTE: It is a mandatory parameter for the POST request.
descriptionstringfalsenoneDescription about the alert template. NOTE: It is a mandatory parameter for the POST request.
default_history_retentionintegerfalsenoneDefines the history retention period in days for this type of alerts. NOTE: It is a mandatory parameter for the POST request.
object_typeintegerfalsenoneDefines the type of the object on which this alert template is applicable to.
  • System wide alert template will be 50.
  • An alert template applicable to an agent will be 100.
  • An alert template applicable to a managed server will be 200.
  • An alert template applicable to a database for a particular monitored server will be 300.
  • An alert template applicable to a schema on a particular database for the managed server will be 400.
  • An alert template applicable to a table on a particular schema for the database on a monitored server will be 500.
  • An alert template applicable to an index on a particular schema for the database on a monitored server will be 600.
  • An alert template applicable to a sequence on a particular schema for the database on a monitored server will be 700.
  • An alert template applicable to a function on a particular schema for the database on a monitored server will be 800.
NOTE: It is a mandatory parameter for the POST request.
sqlstringfalsenoneSQL query, possibly parameterized, to get a numeric indicating threshold reached. NOTE: It is a mandatory parameter for the POST request.
applicable_on_serverstringfalsenoneTemplate is applicable on which type of monitored server. Possible values are ALL, POSTGRES_SERVER, ADVANCED_SERVER. NOTE: It is a mandatory parameter for the POST request.
default_check_frequencyintegerfalsenoneDefines how frequently to check for the alert defined from this template (in minutes). NOTE: It is a mandatory parameter for the POST request.
threshold_unitstringfalsenoneUnit in which threshold is calculated; purely for GUI, like MB/kB/seconds/days/...
is_system_templatebooleanfalsenoneDefines whether the given template is system defined or user defined. NOTE: It is not applicable for the the POST/PUT requests.
is_auto_createbooleanfalsenoneWhether alert should be created as soon as agent or server is added to pem.
thresholds[number]falsenoneDefault threshold values. Values in the thresholds array must be in the sorted order based on the operator.
operatorstringfalsenoneOperator to compare threshold values.
high_threshold_valuestringfalsenoneHigh threshold value.
medium_threshold_valuestringfalsenoneMedium threshold value.
low_threshold_valuestringfalsenoneLow threshold value.
info_sqlstringfalsenoneSpecify the SQL query that will provide the detailed information about that alert on Dashboard.
Enumerated Values
PropertyValue
applicable_on_serverALL
applicable_on_serverPOSTGRES_SERVER
applicable_on_serverADVANCED_SERVER
operator>
operator<

AlertHistory

{
  "alert_id": 0,
  "state": "High",
  "value": "string",
  "actual_value": 0
}

Properties

NameTypeRequiredRestrictionsDescription
alert_idintegerfalsenoneAlert ID
statestringfalsenoneState
valuestringfalsenoneUser presentable value
actual_valuenumberfalsenoneActual value at the time of state change.
Enumerated Values
PropertyValue
stateHigh
stateMedium
stateLow

ServerStatus

{
  "id": 0,
  "name": "string",
  "group_id": 0,
  "group_name": "string",
  "blackout": true,
  "status": "UP",
  "alerts": {
    "total": 0,
    "acknowledged": 0,
    "high": 0,
    "medium": 0,
    "low": 0,
    "high_acknowledged": 0,
    "medium_acknowledged": 0,
    "low_acknowledged": 0
  },
  "version": "string",
  "number_connections": 0,
  "remote_monitoring": true,
  "agent_id": 0,
  "sessions": {
    "last_recorded_time": 0,
    "sessions": [
      {
        "database_name": "string",
        "procpid": 0,
        "usename": "string",
        "backend_start": 0,
        "xact_start": 0,
        "query_start": 0,
        "is_waiting": true,
        "is_idle": true,
        "is_idle_in_transaction": true,
        "is_vacuum": true,
        "is_autovacuum": true,
        "client_addr": "string",
        "client_port": 0,
        "memory_usage_mb": 0,
        "swap_usage_mb": 0,
        "cpu_usage": 0,
        "io_read_bytes": 0,
        "io_write_bytes": 0,
        "state": "string",
        "state_change": 0
      }
    ]
  }
}

Properties

NameTypeRequiredRestrictionsDescription
idintegerfalsenoneServer ID
namestringfalsenoneServer name
group_idintegerfalsenoneGroup ID under which database server is visible to the user
group_namestringfalsenoneGroup name
blackoutbooleanfalsenoneStatus of the alert blackout for the database server
statusstringfalsenoneServer status can be UP, DOWN, UNKNOWN, or UNMANAGED,
alertsobjectfalsenoneList of alert configured for the database server and it's status and how many are acknowledged
» totalintegerfalsenoneNumber of alerts configured for the database server
» acknowledgedintegerfalsenoneNumber of alerts, which are already been acknowledged
» highintegerfalsenoneNumber of alerts with state as 'High'
» mediumintegerfalsenoneNumber of alerts with state as 'Medium'
» lowintegerfalsenoneNumber of alerts with state as 'Low'
» high_acknowledgedintegerfalsenoneNumber of alerts with state as 'High' and are acknowledged
» medium_acknowledgedintegerfalsenoneNumber of alerts with state as 'Medium' and are acknowledged
» low_acknowledgedintegerfalsenoneNumber of alerts with state as 'Low' and are acknowledged
versionstringfalsenoneCurrent version of the database server
number_connectionsintegerfalsenoneNumber of connections on the database servers
remote_monitoringbooleanfalsenoneWhether the database server is being monitored remotely by the pemAgent
agent_idintegerfalsenoneAgent ID, which is monitoring the database server
sessionsobjectfalsenoneAll the session information for the daabase servers
» last_recorded_timenumberfalsenoneUnix time representing the last session information recorded time
» sessions[object]falsenoneList of all the session information for the database server
»» database_namestringfalsenoneDatabase name
»» procpidintegerfalsenoneProcess ID
»» usenamestringfalsenoneUser name
»» backend_startnumberfalsenoneUnix time representing the session start time
»» xact_startnumberfalsenoneUnix time representing the transaction start time
»» query_startnumberfalsenoneUnix time representing the query start time (if any running)
»» is_waitingbooleanfalsenoneIs the sesion waiting?
»» is_idlebooleanfalsenoneIs the session idle?
»» is_idle_in_transactionbooleanfalsenoneIs the session idle in a transaction?
»» is_vacuumbooleanfalsenoneIs this a VACUUM session?
»» is_autovacuumbooleanfalsenoneIs this a AUTO VACUUM session?
»» client_addrstringfalsenoneHost address for the client of the session
»» client_portintegerfalsenoneClient port for the session
»» memory_usage_mbnumberfalsenoneMemory usage (in MB) of the session (available only when monitoried locally)
»» swap_usage_mbnumberfalsenoneSwap memory usage (in MB) of the session (available only when monitoried locally)
»» cpu_usagenumberfalsenoneCPU Usage (in percentage) of the session (available only when monitoried locally)
»» io_read_bytesnumberfalsenoneI/O Read (in bytes) of the session (available only when monitoried locally)
»» io_write_bytesnumberfalsenoneI/O Write (in bytes) of the session (available only when monitoried locally)
»» statestringfalsenoneCurrent state of the session (idle, active, idle in transcation, etc)
»» state_changenumberfalsenoneUnix time representing the last state change time of the session
Enumerated Values
PropertyValue
statusUP
statusDOWN
statusUNKNOWN
statusUNMANAGED

AgentStatus

{
  "id": 0,
  "name": "string",
  "group_id": 0,
  "group_name": "string",
  "blackout": true,
  "status": "UP",
  "alerts": {
    "total": 0,
    "acknowledged": 0,
    "high": 0,
    "medium": 0,
    "low": 0,
    "high_acknowledged": 0,
    "medium_acknowledged": 0,
    "low_acknowledged": 0
  },
  "version": "string",
  "processes": 0,
  "threads": 0,
  "cpu_utilization": 0,
  "memory_utilization": 0,
  "swap_utilization": 0,
  "disk_utilization": 0
}

Properties

NameTypeRequiredRestrictionsDescription
idintegerfalsenoneAgent ID
namestringfalsenoneAgent name
group_idintegerfalsenoneGroup ID under which Agent is visible to the user
group_namestringfalsenoneGroup name
blackoutbooleanfalsenoneEnabled/Disabled alert blackout for the agent
statusstringfalsenoneAgent status can be UP, DOWN, or UNKNOWN
alertsobjectfalsenoneList of alert configured for the agent and it's status and how many are acknowledged
» totalintegerfalsenoneNumber of alerts configured for the agent
» acknowledgedintegerfalsenoneNumber of alerts, which are already been acknowledged
» highintegerfalsenoneNumber of alerts with state as 'High'
» mediumintegerfalsenoneNumber of alerts with state as 'Medium'
» lowintegerfalsenoneNumber of alerts with state as 'Low'
» high_acknowledgedintegerfalsenoneNumber of alerts with state as 'High' and are acknowledged
» medium_acknowledgedintegerfalsenoneNumber of alerts with state as 'Medium' and are acknowledged
» low_acknowledgedintegerfalsenoneNumber of alerts with state as 'Low' and are acknowledged
versionstringfalsenoneCurrent version of the agent
processesintegerfalsenoneNumber of processes running
threadsintegerfalsenoneNumber of threads for all the running processes
cpu_utilizationnumberfalsenoneCPU utilization (Percentage)
memory_utilizationnumberfalsenoneMemory utilization (Percentage)
swap_utilizationnumberfalsenoneSwap memory utilization (Percentage)
disk_utilizationnumberfalsenoneOverall disk utilization (Percentage)
Enumerated Values
PropertyValue
statusUP
statusDOWN
statusUNKNOWN

AlertStatus

{
  "alert_since": "string",
  "alert_id": 0,
  "alert_name": "string",
  "alert_state": "High",
  "value": "string",
  "object_description": "string",
  "server_id": 0,
  "agent_id": 0,
  "database": "string",
  "schema": "string",
  "package": "string",
  "object": "string",
  "alert_target_level": "Global",
  "last_processed": "string",
  "info": "string",
  "info_cols": [
    "string"
  ],
  "info_vals": [
    [
      "string"
    ]
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
alert_sincestringfalsenoneUnix Time at which alert state has last changed.
alert_idintegerfalsenoneAlert internal identification number
alert_namestringfalsenoneName of the alert.
alert_statestringfalsenoneCurrent state of the alert. 'null' value suggested alert threshold values has not been violated for the alert at the moments.
valuestringfalsenoneCurrent value of the alert
object_descriptionstringfalsenoneMonitoring object description/name
server_idintegerfalsenonenull or ID of the server
agent_idintegerfalsenonenull or ID of the agent
databasestringfalsenonenull or name of the database
schemastringfalsenonenull or name of the schema/namespace
packagestringfalsenonenull or name of the EDB package
objectstringfalsenonenull or name of any other type of object
alert_target_levelstringfalsenoneAlert target level
last_processedstringfalsenoneString reprenting unix time at which the alert has been processed
infostringfalsenoneSome information at the time of alert generated
info_cols[string]falsenoneArray of column names for the information
info_vals[array]falsenoneDetailed information associalted with the alert in the form of table (array of array)
Enumerated Values
PropertyValue
alert_stateHigh
alert_stateMedium
alert_stateLow
alert_target_levelGlobal
alert_target_levelAgent
alert_target_levelServer
alert_target_levelDatabase
alert_target_levelSchema
alert_target_levelTable
alert_target_levelIndex
alert_target_levelSequence
alert_target_levelFunction
alert_target_levelView

CustomProbes

{
  "probe_id": 0,
  "probe_name": "string",
  "enabled": true,
  "target_type": 0,
  "internal_name": "string",
  "is_system_probe": true,
  "any_server_version": true,
  "collection_method": "w",
  "interval": 0,
  "lifetime": 0,
  "discard_history": true,
  "platform": "string",
  "probe_code": "string",
  "probe_columns": [
    {
      "pc_id": 0,
      "pc_name": "string",
      "pc_data_type": "bigint",
      "pc_internal_name": "string",
      "pc_unit": "string",
      "pc_col_type": "m",
      "pc_position": 0,
      "pc_graphable": true,
      "pc_calc_pit": true,
      "pc_pit_default": true
    }
  ],
  "alternate_code": [
    {
      "server_version_id": 0,
      "server_probe_code": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
probe_idintegerfalsenoneIdentifier for a probe.
probe_namestringfalsenoneName of the probe.
enabledbooleanfalsenoneDefines whether the probe is enabled/disabled by default.
target_typeintegerfalsenoneDefines the type of the object on which the probe is applicable to.
  • A probe with target_type 100 is responsible for collecting statistics for an agent.
  • A probe with target_type 200 is responsible for collecting statistics for a monitored server.
  • A probe with target_type 300 is responsible for collecting statistics for a database.
  • A probe with target_type 400 is responsible for collecting statistics for a schema.
  • A probe with target_type 500 is responsible for collecting statistics for a table.
  • A probe with target_type 600 is responsible for collecting statistics for a index.
  • A probe with target_type 700 is responsible for collecting statistics for a sequence.
  • A probe with target_type 800 is responsible for collecting statistics for a function.
  • A probe with target_type 900 is responsible for collecting statistics for a view.
internal_namestringfalsenoneDefines the internal name of the probe. PEM system creates internal tables for storing the probe statistics in 'pemdata', and 'pemhistory' schema, and name of those table will be same as internal name.
is_system_probebooleanfalsenoneDefines whether this probe is user defined, or not. Value for this flag will always be false for a user defined probe.
any_server_versionbooleanfalsenoneDefines whether this probe is applicable to any version of Postgres variant. For more details, please follow the documenation.
collection_methodstringfalsenoneDefines the method of statistics collection. PEM supports three methods for custom made probes. i.e. SQL, WMI, Batch/Shell script.
  • 'w' stands for WMI script.
    It is applicable for the windows platform only, and target_type will be 100 (i.e. agent).
  • 'b' stands for Batch/Shell script. 'target_type' for this will be always be 100 (i.e. agent). It will behave as batch script on windows otherwise as a shell script.
  • 's' stands for SQL script. It will applicable only for 200 (i.e. server), 300 (i.e. database), 400 (i.e. schema), 500 (i.e. table), 600 (i.e. index), 700 (i.e. sequence), 800 (i.e. function), 900 (i.e. view).
intervalintegerfalsenoneDefines how frequently the probe will collect the statistics (in seconds).
lifetimeintegerfalsenoneDefines the history data retention time (in days). It does not have any effect, if 'discard_history' is set to true.
discard_historybooleanfalsenoneDefines whether to discard the history data. It will not store the history of the data for this probe, when 'discard_history' is set to false.
platformstringfalsenoneDefines on which platform this probe can run on. It is only applicable to an agent level probe.
probe_codestringfalsenoneA SQL/Batch script/Shell script/WMI script to collect the statistics as per definition of the code.
probe_columns[object]falsenonenone
» pc_idintegerfalsenoneIdentifier of the column
» pc_namestringfalsenoneName of the column
» pc_data_typestringfalsenoneData type of the column.
Supported datatypes are:
      bigint
      char
      decimal
      double precision
      integer
      numeric
      real
      text
      text[]
      timestamp
      timestamptz
» pc_internal_namestringfalsenoneReturns the internal name of the column.
» pc_unitstringfalsenoneReturns the unit of the column.
» pc_col_typestringfalsenoneReturns the columns is part of the primary key of the internal table, or not. 'k' stands for a key column, and 'm' stands for a member/normal column.
» pc_positionintegerfalsenoneReturns the position of the column in the internal table.
» pc_graphablebooleanfalsenoneReturns whether the data of the column is graphable on a chart, or not.
» pc_calc_pitbooleanfalsenoneReturns whether server calculates the point-in-time for the metric data for this column.
» pc_pit_defaultbooleanfalsenoneReturns the metric is stored by point-in-time by default. Please refer the 'Custom Probes' section in the documentation for detailed information.
alternate_code[AlternateServerProbeCode]falsenonenone
Enumerated Values
PropertyValue
collection_methodw
collection_methodb
collection_methods
pc_data_typebigint
pc_data_typechar
pc_data_typedecimal
pc_data_typedouble precision
pc_data_typeinteger
pc_data_typenumeric
pc_data_typereal
pc_data_typetext
pc_data_typetext[]
pc_data_typetimestamp
pc_data_typetimestamptz
pc_col_typem
pc_col_typek

CustomProbeExportData

{
  "probes": [
    0
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
probes[integer]falsenoneList of the probe ids for the custom probes

CustomProbeImportData

{
  "version": 1,
  "skip_overwrite": true,
  "probes": [
    {
      "probe_name": "string",
      "collection_method": "w",
      "enabled": true,
      "target_type": 0,
      "any_server_version": true,
      "interval": 0,
      "lifetime": 0,
      "discard_history": true,
      "platform": "string",
      "probe_code": "string",
      "probe_columns": [
        {
          "pc_name": "string",
          "pc_data_type": "bigint",
          "pc_unit": "string",
          "pc_col_type": "m",
          "pc_graphable": true,
          "pc_calc_pit": true,
          "pc_pit_default": true
        }
      ],
      "alternate_code": [
        {
          "server_version_id": 0,
          "server_probe_code": "string"
        }
      ],
      "internal_name": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
versionintegerfalsenoneVersion of the probe export.
skip_overwritebooleanfalsenoneWhether existing probes can be skipped
probes[CustomProbeImportPostData]falsenonenone

CustomProbeImportPostData

{
  "probe_name": "string",
  "collection_method": "w",
  "enabled": true,
  "target_type": 0,
  "any_server_version": true,
  "interval": 0,
  "lifetime": 0,
  "discard_history": true,
  "platform": "string",
  "probe_code": "string",
  "probe_columns": [
    {
      "pc_name": "string",
      "pc_data_type": "bigint",
      "pc_unit": "string",
      "pc_col_type": "m",
      "pc_graphable": true,
      "pc_calc_pit": true,
      "pc_pit_default": true
    }
  ],
  "alternate_code": [
    {
      "server_version_id": 0,
      "server_probe_code": "string"
    }
  ],
  "internal_name": "string"
}

Properties

allOf

NameTypeRequiredRestrictionsDescription
anonymousCustomProbePostDatafalsenonenone

and

NameTypeRequiredRestrictionsDescription
anonymousobjectfalsenonenone
» internal_namestringfalsenoneInternal name of the probe from the system where probe was exported.

CustomProbePostData

{
  "probe_name": "string",
  "collection_method": "w",
  "enabled": true,
  "target_type": 0,
  "any_server_version": true,
  "interval": 0,
  "lifetime": 0,
  "discard_history": true,
  "platform": "string",
  "probe_code": "string",
  "probe_columns": [
    {
      "pc_name": "string",
      "pc_data_type": "bigint",
      "pc_unit": "string",
      "pc_col_type": "m",
      "pc_graphable": true,
      "pc_calc_pit": true,
      "pc_pit_default": true
    }
  ],
  "alternate_code": [
    {
      "server_version_id": 0,
      "server_probe_code": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
probe_namestringfalsenoneName of the probe.
collection_methodstringfalsenoneDefines the method of statistics collection. PEM supports three methods for custom made probes. i.e. SQL, WMI, Batch/Shell script.
  • 'w' stands for WMI script.
    It is applicable for the windows platform only, and target_type will be 100 (i.e. agent).
  • 'b' stands for Batch/Shell script. 'target_type' for this will be always be 100 (i.e. agent). It will behave as batch script on windows otherwise as a shell script.
  • 's' stands for SQL script. It will applicable only for 200 (i.e. server), 300 (i.e. database), 400 (i.e. schema), 500 (i.e. table), 600 (i.e. index), 700 (i.e. sequence), 800 (i.e. function), 900 (i.e. view).
enabledbooleanfalsenoneDefines whether the probe is enabled/disabled by default.
target_typeintegerfalsenoneDefines the type of the object on which the probe is applicable to.
  • A probe with target_type 100 is responsible for collecting statistics for an agent.
  • A probe with target_type 200 is responsible for collecting statistics for a monitored server.
  • A probe with target_type 300 is responsible for collecting statistics for a database.
  • A probe with target_type 400 is responsible for collecting statistics for a schema.
  • A probe with target_type 500 is responsible for collecting statistics for a table.
  • A probe with target_type 600 is responsible for collecting statistics for a index.
  • A probe with target_type 700 is responsible for collecting statistics for a sequence.
  • A probe with target_type 800 is responsible for collecting statistics for a function.
  • A probe with target_type 900 is responsible for collecting statistics for a view.
any_server_versionbooleanfalsenoneDefines whether this probe is applicable to any version of Postgres variant. For more details, please follow the documenation.
intervalintegerfalsenoneDefines how frequently the probe will collect the statistics (in seconds).
lifetimeintegerfalsenoneDefines the history data retention time (in days). It does not have any effect, if 'discard_history' is set to true.
discard_historybooleanfalsenoneDefines whether to discard the history data. It will not store the history of the data for this probe, when 'discard_history' is set to false.
platformstringfalsenoneDefines on which platform this probe can run on. It is only applicable to an agent level probe.
probe_codestringfalsenoneA SQL/Batch script/Shell script/WMI script to collect the statistics as per definition of the code.
probe_columns[object]falsenonenone
» pc_namestringfalsenoneName of the column
» pc_data_typestringfalsenoneData type of the column.
Supported datatypes are:
      bigint
      char
      decimal
      double precision
      integer
      numeric
      real
      text
      text[]
      timestamp
      timestamptz
» pc_unitstringfalsenoneReturns the unit of the column.
» pc_col_typestringfalsenoneReturns the columns is part of the primary key of the internal table, or not. 'k' stands for a key column, and 'm' stands for a member/normal column.
» pc_graphablebooleanfalsenoneReturns whether the data of the column is graphable on a chart, or not.
» pc_calc_pitbooleanfalsenoneReturns whether server calculates the point-in-time for the metric data for this column.
» pc_pit_defaultbooleanfalsenoneReturns the metric is stored by point-in-time by default. Please refer the 'Custom Probes' section in the documentation for detailed information.
alternate_code[AlternateServerProbeCode]falsenonenone
Enumerated Values
PropertyValue
collection_methodw
collection_methodb
collection_methods
pc_data_typebigint
pc_data_typechar
pc_data_typedecimal
pc_data_typedouble precision
pc_data_typeinteger
pc_data_typenumeric
pc_data_typereal
pc_data_typetext
pc_data_typetext[]
pc_data_typetimestamp
pc_data_typetimestamptz
pc_col_typem
pc_col_typek

CustomProbePutData

{
  "interval_min": 0,
  "interval_sec": 0,
  "lifetime": 0,
  "enabled": true,
  "probe_code": "string",
  "probe_columns": {
    "changed": {
      "pc_id": 0,
      "pc_unit": "string",
      "pc_graphable": true
    }
  },
  "alternate_code": {
    "changed": [
      {
        "server_version_id": 0,
        "server_probe_code": "string"
      }
    ],
    "deleted": [
      {
        "server_version_id": 0
      }
    ],
    "added": [
      {
        "server_version_id": 0,
        "server_probe_code": "string"
      }
    ]
  }
}

Properties

NameTypeRequiredRestrictionsDescription
interval_minintegerfalsenoneDefines how frequently the probe will collect the statistics (in minutes). Possible values are from 0 to 2880.
interval_secintegerfalsenoneDefines how frequently the probe will collect the statistics (in seconds). Possible values are from 0 to 59.
lifetimeintegerfalsenoneDefines the history data retention time (in days). It does not have any effect, if 'discard_history' is set to true.
enabledbooleanfalsenoneDefines whether the probe is enabled/disabled by default.
probe_codestringfalsenoneA SQL/Batch script/Shell script/WMI script to collect the statistics as per definition of the code.
probe_columnsobjectfalsenonenone
» changedobjectfalsenonenone
»» pc_idintegerfalsenoneIdentifier of the column
»» pc_unitstringfalsenoneReturns the unit of the column.
»» pc_graphablebooleanfalsenoneReturns whether the data of the column is graphable on a chart, or not.
alternate_codeobjectfalsenonenone
» changed[AlternateServerProbeCode]falsenoneList of the changed alternate probe code for some server version.
» deleted[DeletedAlternateServerProbeCode]falsenoneList of the delete alternate probe code for some server versions.
» added[AlternateServerProbeCode]falsenoneList of the alternate probe code added for some server versions.

Probes

{
  "probe_id": 0,
  "probe_name": "string",
  "default_interval_min": 0,
  "interval_min": 0,
  "default_interval_sec": 0,
  "interval_sec": 0,
  "default_interval": 0,
  "interval": 0,
  "default_lifetime": 0,
  "lifetime": 0,
  "default_enabled": true,
  "enabled": true,
  "target_type_id_returned": 0
}

Properties

NameTypeRequiredRestrictionsDescription
probe_idintegerfalsenoneUnique id of the probe.
probe_namestringfalsenoneName of the probe.
default_interval_minintegerfalsenoneDefines default interval for the probe to collect the statistics (in minutes). Possible values are from 0 to 2880.
interval_minintegerfalsenoneDefines how frequently the probe will collect the statistics (in minutes). Possible values are from 0 to 2880.
default_interval_secintegerfalsenoneDefines default interval for the probe to collect the statistics (in seconds). Possible values are from 0 to 59.
interval_secintegerfalsenoneDefines how frequently the probe will collect the statistics (in seconds). Possible values are from 0 to 59.
default_intervalintegerfalsenoneDefines default interval for the probe to collect the statistics (in seconds).
intervalintegerfalsenoneDefines how frequently the probe will collect the statistics (in seconds).
default_lifetimeintegerfalsenoneDefines the default history data retention time (in days).
lifetimeintegerfalsenoneDefines the history data retention time (in days). It does not have any effect, if 'discard_history' is set to true.
default_enabledbooleanfalsenoneDefines the default probe enabled/disabled value.
enabledbooleanfalsenoneDefines whether the probe is enabled/disabled by default.
target_type_id_returnedintegerfalsenoneDefines return target type value.
  • A probe with target_type 100 is responsible for collecting statistics for an agent.
  • A probe with target_type 200 is responsible for collecting statistics for a monitored server.
  • A probe with target_type 300 is responsible for collecting statistics for a database.
  • A probe with target_type 400 is responsible for collecting statistics for a schema.
  • A probe with target_type 500 is responsible for collecting statistics for a table.
  • A probe with target_type 600 is responsible for collecting statistics for a index.
  • A probe with target_type 700 is responsible for collecting statistics for a sequence.
  • A probe with target_type 800 is responsible for collecting statistics for a function.
  • A probe with target_type 900 is responsible for collecting statistics for a view.

ProbeConfigData

{
  "interval_min": 0,
  "interval_sec": 0,
  "lifetime": 0,
  "enabled": true
}

Properties

NameTypeRequiredRestrictionsDescription
interval_minintegerfalsenoneProbe execution frequency (in minutes). Allowed interval value (in minutes) is 0-2880 minutes. NOTE: Total interval must be greater than 10 seconds. i.e. 10 >= interval_min * 60 + interval_sec >= 172800.
interval_secintegerfalsenoneProbe execution frequency (in seconds). Allowed interval value (in seconds) is 0-59 seconds. NOTE: Total interval must be greater than 10 seconds. i.e. 10 >= interval_min * 60 + interval_sec >= 172800.
lifetimeintegerfalsenoneProbe history data retention period (in days). i.e. 1 >= lifetime >= 365.
enabledbooleanfalsenoneEnable/Disable probe for the given object.

CopyAgentData

{
  "type": "string",
  "agent_id": 0
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "agent"
agent_idintegerfalsenonenone

CopyServerData

{
  "type": "string",
  "server_id": 0
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "server"
server_idintegerfalsenonenone

CopyDatabaseData

{
  "type": "string",
  "server_id": 0,
  "database_name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "database"
server_idintegerfalsenonenone
database_namestringfalsenonenone

CopySchemaData

{
  "type": "string",
  "server_id": 0,
  "database_name": "string",
  "schema_name": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "schema"
server_idintegerfalsenonenone
database_namestringfalsenonenone
schema_namestringfalsenonenone

CopyAlertAgentData

{
  "type": "string",
  "agent_id": 0,
  "ignore_duplicate_alerts": true
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "agent"
agent_idintegerfalsenonenone
ignore_duplicate_alertsbooleanfalsenoneDefines whether to ignore the duplicate alerts to be copied.

CopyAlertServerData

{
  "type": "string",
  "server_id": 0,
  "ignore_duplicate_alerts": true
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "server"
server_idintegerfalsenonenone
ignore_duplicate_alertsbooleanfalsenoneDefines whether to ignore the duplicate alerts to be copied.

CopyAlertDatabaseData

{
  "type": "string",
  "server_id": 0,
  "database_name": "string",
  "ignore_duplicate_alerts": true
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "database"
server_idintegerfalsenonenone
database_namestringfalsenonenone
ignore_duplicate_alertsbooleanfalsenoneDefines whether to ignore the duplicate alerts to be copied.

CopyAlertSchemaData

{
  "type": "string",
  "server_id": 0,
  "database_name": "string",
  "schema_name": "string",
  "ignore_duplicate_alerts": true
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "schema"
server_idintegerfalsenonenone
database_namestringfalsenonenone
schema_namestringfalsenonenone
ignore_duplicate_alertsbooleanfalsenoneDefines whether to ignore the duplicate alerts to be copied.

CopyAlertTableData

{
  "type": "string",
  "server_id": 0,
  "database_name": "string",
  "schema_name": "string",
  "table_name": "string",
  "ignore_duplicate_alerts": true
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "table"
server_idintegerfalsenonenone
database_namestringfalsenonenone
schema_namestringfalsenonenone
table_namestringfalsenonenone
ignore_duplicate_alertsbooleanfalsenoneDefines whether to ignore the duplicate alerts to be copied.

CopyAlertIndexData

{
  "type": "string",
  "server_id": 0,
  "database_name": "string",
  "schema_name": "string",
  "index_name": "string",
  "ignore_duplicate_alerts": true
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "index"
server_idintegerfalsenonenone
database_namestringfalsenonenone
schema_namestringfalsenonenone
index_namestringfalsenonenone
ignore_duplicate_alertsbooleanfalsenoneDefines whether to ignore the duplicate alerts to be copied.

CopyAlertFunctionData

{
  "type": "string",
  "server_id": 0,
  "database_name": "string",
  "schema_name": "string",
  "function_name": "string",
  "function_arguments": "string",
  "ignore_duplicate_alerts": true
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "function"
server_idintegerfalsenonenone
database_namestringfalsenonenone
schema_namestringfalsenonenone
function_namestringfalsenonenone
function_argumentsstringfalsenonenone
ignore_duplicate_alertsbooleanfalsenoneDefines whether to ignore the duplicate alerts to be copied.

CopyAlertSequenceData

{
  "type": "string",
  "server_id": 0,
  "database_name": "string",
  "schema_name": "string",
  "sequence_name": "string",
  "ignore_duplicate_alerts": true
}

Properties

NameTypeRequiredRestrictionsDescription
typestringfalsenoneValue must be "sequence"
server_idintegerfalsenonenone
database_namestringfalsenonenone
schema_namestringfalsenonenone
sequence_namestringfalsenonenone
ignore_duplicate_alertsbooleanfalsenoneDefines whether to ignore the duplicate alerts to be copied.

Agent

[
  {
    "id": 0,
    "name": "string",
    "version": "string",
    "active": true,
    "heartbeat_int": 0,
    "alert_blackout": true,
    "owner": "string",
    "team": "string",
    "group": 0
  }
]

Returns the list of the objects, which contains the agent information, version, capabilities, and details about the host on which it has been installed.

For example:
\

[{
  /* Agent information */
  "id": 1,
  "gid": 0,
  "name": "Postgres Enterprise Manager Host"
  "version": "6.0.1",
  "active": True,
  "heartbeat_int": 30,
  "alert_blackout": False,
  "owner": "postgres",
  "team": None,

  /* Deatils about the Host, on which it is installed */
  "operating_sys": "Ubuntu 12.04.5 LTS",
  "host_name": "akshay-ubuntu",
  "boot_time": "2016-09-19 12:28:27+05:30",
   "domain_name": "(none)",
   "window_domain": None,

  /* Agent capabilities */
  "capability_list": "unix, getloadavg, disk_space, memory_usage, cpu_usage, network_statistics, io_analysis, data_log_file_analysis, disk_busy_info, 
os_statistics, os_info, slony_replication, auto_discover_servers, allow_server_restart",

  /* Monitored servers */
  "server_bind": "Postgres Enterprise Manager Server, PostgreSQL 9.3, PostgreSQL 9.4"
}]

a

Properties

NameTypeRequiredRestrictionsDescription
idintegertruenoneIdentity of the pem-agent
namestringtruenoneDescription (name) of the agent.
versionstringtruenoneVersion of the pem-agent
activebooleantruenoneWhether the agent is active, or not.
An active agent is responsible for collecting the statistics for the host, and the monitored server..
heartbeat_intintegertruenoneheartbeat interval (in seconds) for the agent.
How frequently the agent will send the heartbeat status to the PEM database server about itself, and the monitoring database server.
alert_blackoutbooleantruenoneFlag to indicates about the alert blacked out for the agent
ownerstringtruenoneUsername, using whom the agent was installed, is called owner.
teamstringtruenoneName of the role/user, who can see this agent.
null/empty value suggest, all user can see this agent.
groupintegerfalsenoneIdentity of the group

Server

{
  "id": 0,
  "name": "string",
  "host": "string",
  "port": 0,
  "database": "string",
  "ssl": 0,
  "serviceid": "string",
  "active": true,
  "alert_blackout": true,
  "owner": 0,
  "team": "string",
  "server_owner": "string",
  "is_remote_monitoring": true,
  "efm_cluster_name": "string",
  "efm_service_name": "string",
  "efm_installation_path": "string",
  "comment": "string",
  "username": "string",
  "gid": 0,
  "db_restriction": "string",
  "role": "string",
  "is_edb": true,
  "agent_id": 0,
  "asb_host": "string",
  "asb_port": 0,
  "asb_username": "string",
  "asb_database": "string",
  "asb_sslmode": "string",
  "asb_password": "string",
  "asb_allowtakeover": "string",
  "agent_capability_list": [
    "string"
  ],
  "agent_description": "string",
  "fgcolor": "string",
  "bgcolor": "string",
  "sslcompression": true
}

Properties

NameTypeRequiredRestrictionsDescription
idintegerfalsenoneServer id
namestringfalsenoneServer name
hoststringfalsenoneServer host
portintegerfalsenoneServer port
databasestringfalsenoneMaintenance databse
sslintegerfalsenoneSSL mode
serviceidstringfalsenoneServer service id
activebooleanfalsenoneDefines whether the server is active, or not.
alert_blackoutbooleanfalsenoneDefines whether the alerts on the server are blacked out, or not.
ownerintegerfalsenoneID of the owner, who registered the server with PEM.
teamstringfalsenoneDefines the role/username, who can see the server information.
server_ownerstringfalsenoneName of the user, who registered the server on the PEM database server.
is_remote_monitoringbooleanfalsenoneDefines whether this server is being monitored remotely (i.e. the monitoring pemAgent does not resides on the same host on the monitored server).
efm_cluster_namestringfalsenoneCluster name of EFM
efm_service_namestringfalsenoneService name of EFM
efm_installation_pathstringfalsenoneInstallation Path of EFM
commentstringfalsenoneDescription about the Server.
usernamestringfalsenoneUsername for connecting the database server.
gidintegerfalsenoneID of the Server group
db_restrictionstringfalsenoneDatabase restriction SQL clause
rolestringfalsenoneThe role the connection will use
is_edbbooleanfalsenoneIs server an EDB Advanced Server?
agent_idintegerfalsenoneAgent id bound to the server
asb_hoststringfalsenonePEM database host used by agent while creating PEM connection.
asb_portintegerfalsenonePEM database port used by agent while creating PEM connection.
asb_usernamestringfalsenonePEM database user name used by agent while creating PEM connection.
asb_databasestringfalsenonePEM database to which agent will connect.
asb_sslmodestringfalsenonePEM database ssl mode.
asb_passwordstringfalsenoneempty string.
asb_allowtakeoverstringfalsenoneWhether server allowed to take over by another agent.
agent_capability_list[string]falsenoneArray of capabilities the agent has
agent_descriptionstringfalsenoneAgent description
fgcolorstringfalsenoneForeground color of server node in browser tree
bgcolorstringfalsenoneBackground color of server node in browser tree
sslcompressionbooleanfalsenoneWhether data sent over ssl should be compressed or not.

Database

{
  "database_name": "string",
  "connections_allowed": true,
  "system_database": true,
  "recorded_time": "2019-08-24T14:15:22Z",
  "encoding": "string",
  "server_id": 0
}

Properties

NameTypeRequiredRestrictionsDescription
database_namestringfalsenoneDatabase name
connections_allowedbooleanfalsenoneIs connection to database allowed
system_databasebooleanfalsenoneIs database system database
recorded_timestring(date-time)falsenoneWhen database was first detected by PEM agent
encodingstringfalsenoneDatabase encoding
server_idintegerfalsenoneServer id of database

Schema

{
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "recorded_time": "2019-08-24T14:15:22Z"
}

Properties

NameTypeRequiredRestrictionsDescription
schema_namestringfalsenoneSchema name
database_namestringfalsenoneDatabase name of schema
server_idintegerfalsenoneServer id schmea
recorded_timestring(date-time)falsenoneWhen schema was first detected by PEM agent

Table

{
  "table_name": "string",
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "has_primary_key": true,
  "recorded_time": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
table_namestringfalsenoneTable name
schema_namestringfalsenoneschema name
database_namestringfalsenoneDatabase name
server_idintegerfalsenoneServer id
has_primary_keybooleanfalsenoneWeather table has primary key
recorded_timestringfalsenoneWhen table was first detected by PEM agent

Index

{
  "index_name": "string",
  "ind_keys": [
    0
  ],
  "table_name": "string",
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "recorded_time": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
index_namestringfalsenoneIndex name
ind_keys[integer]falsenoneindexed column positions in table
table_namestringfalsenoneTable name
schema_namestringfalsenoneSchema
database_namestringfalsenoneDatabase name
server_idintegerfalsenoneServer id
recorded_timestringfalsenoneWhen index was first detected by PEM agent

Sequence

{
  "sequence_name": "string",
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "recorded_time": "2019-08-24T14:15:22Z"
}

Properties

NameTypeRequiredRestrictionsDescription
sequence_namestringfalsenoneSequence name
schema_namestringfalsenoneSchema name
database_namestringfalsenoneDatabase name
server_idintegerfalsenoneServer id
recorded_timestring(date-time)falsenoneWhen sequence was first detected by PEM agent

Function

{
  "function_name": "string",
  "function_type": "string",
  "return_type": "string",
  "arg_types": [
    "string"
  ],
  "function_binary": "string",
  "extension_name": "string",
  "package_name": "string",
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "recorded_time": "2019-08-24T14:15:22Z"
}

Properties

NameTypeRequiredRestrictionsDescription
function_namestringfalsenoneFunction name
function_typestringfalsenoneFunction type
return_typestringfalsenoneFunction return type
arg_types[string]falsenoneFunction argument types
function_binarystringfalsenonenone
extension_namestringfalsenonenone
package_namestringfalsenoneFunction package name
schema_namestringfalsenoneFunction schema
database_namestringfalsenoneFunction database name
server_idintegerfalsenoneFunction server id
recorded_timestring(date-time)falsenoneWhen function was first detected by PEM agent

View

{
  "view_name": "string",
  "view_type": "string",
  "ispopulated": true,
  "view_owner": "string",
  "definition": "string",
  "tablespace_name": "string",
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "recorded_time": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
view_namestringfalsenoneView name
view_typestringfalsenoneView type
ispopulatedbooleanfalsenoneIs view populated
view_ownerstringfalsenoneView owner
definitionstringfalsenoneView definition
tablespace_namestringfalsenoneView tablespace
schema_namestringfalsenoneView schema
database_namestringfalsenoneView database
server_idintegerfalsenoneView server id
recorded_timestringfalsenoneWhen view was first detected by PEM agent

Webhook

{
  "id": 0,
  "name": "string",
  "url": "string",
  "enabled": true,
  "method": "string",
  "http_headers": [
    {
      "http_header_id": 0,
      "http_header_key": "string",
      "http_header_value": "string"
    }
  ],
  "payload_template": "string",
  "low_alert": true,
  "med_alert": true,
  "high_alert": true,
  "cleared_alert": true
}

Properties

NameTypeRequiredRestrictionsDescription
idintegerfalsenoneWebhook id
namestringfalsenoneWebhook name
urlstringfalsenoneWebhook url
enabledbooleanfalsenoneDefines whether the webhook is enabled, or not.
methodstringfalsenoneRequest method
http_headers[WebhookGetHTTPHeaders]falsenoneList of the http header key/value pair to be used by the webhook.
payload_templatestringfalsenonePayload template
low_alertbooleanfalsenoneDefines whether the low alert is enabled, or not.
med_alertbooleanfalsenoneDefines whether the medium alert is enabled, or not.
high_alertbooleanfalsenoneDefines whether the high alert is enabled, or not.
cleared_alertbooleanfalsenoneDefines whether the cleared alert is enabled, or not.

WebhookPostData

{
  "name": "string",
  "url": "string",
  "enabled": true,
  "method": "string",
  "http_headers": [
    {
      "http_header_key": "string",
      "http_header_value": "string"
    }
  ],
  "payload_template": "string",
  "low_alert": true,
  "med_alert": true,
  "high_alert": true,
  "cleared_alert": true
}

Properties

NameTypeRequiredRestrictionsDescription
namestringfalsenoneWebhook name
urlstringfalsenoneWebhook url
enabledbooleanfalsenoneDefines whether the webhook is enabled, or not.
methodstringfalsenoneRequest method
http_headers[WebhookHTTPHeaders]falsenoneList of the http header key/value pair to be used by the webhook.
payload_templatestringfalsenonePayload template
low_alertbooleanfalsenoneDefines whether the low alert is enabled, or not.
med_alertbooleanfalsenoneDefines whether the medium alert is enabled, or not.
high_alertbooleanfalsenoneDefines whether the high alert is enabled, or not.
cleared_alertbooleanfalsenoneDefines whether the cleared alert is enabled, or not.

WebhookPutData

{
  "id": 0,
  "name": "string",
  "url": "string",
  "enabled": true,
  "method": "string",
  "http_headers": {
    "added": [
      {
        "http_header_key": "string",
        "http_header_value": "string"
      }
    ],
    "changed": [
      {
        "http_header_id": 0,
        "http_header_key": "string",
        "http_header_value": "string"
      }
    ],
    "deleted": [
      {
        "http_header_id": 0
      }
    ]
  },
  "payload_template": "string",
  "low_alert": true,
  "med_alert": true,
  "high_alert": true,
  "cleared_alert": true
}

Properties

NameTypeRequiredRestrictionsDescription
idintegerfalsenoneWebhook id
namestringfalsenoneWebhook name
urlstringfalsenoneWebhook url
enabledbooleanfalsenoneDefines whether the webhook is enabled, or not.
methodstringfalsenoneRequest method
http_headersobjectfalsenonenone
» added[WebhookHTTPHeaders]falsenoneList of the http header key/value pair to be added.
» changed[WebhookGetHTTPHeaders]falsenoneList of the http header key/value pair to be updated.
» deleted[object]falsenoneList of the http headerids to be deleted.
»» http_header_idintegerfalsenoneID of the http header
payload_templatestringfalsenonePayload template
low_alertbooleanfalsenoneDefines whether the low alert is enabled, or not.
med_alertbooleanfalsenoneDefines whether the medium alert is enabled, or not.
high_alertbooleanfalsenoneDefines whether the high alert is enabled, or not.
cleared_alertbooleanfalsenoneDefines whether the cleared alert is enabled, or not.

WebhookGetHTTPHeaders

{
  "http_header_id": 0,
  "http_header_key": "string",
  "http_header_value": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
http_header_idintegerfalsenoneID of the http header
http_header_keystringfalsenoneName of the http header key
http_header_valuestringfalsenoneName of the http header key

WebhookHTTPHeaders

{
  "http_header_key": "string",
  "http_header_value": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
http_header_keystringfalsenoneName of the http header key
http_header_valuestringfalsenoneName of the http header key

EmailGroups

{
  "id": 0,
  "oid": 0,
  "gid": 0,
  "name": "string",
  "to_addr": "string",
  "cc_addr": "string",
  "bcc_addr": "string",
  "from_addr": "string",
  "reply_to_addr": "string",
  "subject_prefix": "string",
  "from_time": "string",
  "to_time": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
idintegerfalsenoneEmail group id
oidintegerfalsenoneEmail group options id
gidintegerfalsenoneEmail group id
namestringfalsenoneEmail group name
to_addrstringfalsenoneEmail group options receiver address
cc_addrstringfalsenoneEmail group options CC address
bcc_addrstringfalsenoneEmail group options BCC address
from_addrstringfalsenoneEmail group options sender address
reply_to_addrstringfalsenoneEmail group options reply to address
subject_prefixstringfalsenoneEmail group options subject prefix
from_timestringfalsenoneEmail group options from time to select time range for members
to_timestringfalsenoneEmail group options to time to select time range for members

EmailGroupsPostData

{
  "name": "string",
  "options": [
    {
      "to_addr": "string",
      "cc_addr": "string",
      "bcc_addr": "string",
      "from_addr": "string",
      "reply_to_addr": "string",
      "subject_prefix": "string",
      "from_time": "string",
      "to_time": "string"
    }
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
namestringfalsenoneEmail group name
options[EmailGroupOptions]falsenoneList of the email group options to be used by the email group.

EmailGroupsPutData

{
  "id": 0,
  "name": "string",
  "options": {
    "added": [
      {
        "to_addr": "string",
        "cc_addr": "string",
        "bcc_addr": "string",
        "from_addr": "string",
        "reply_to_addr": "string",
        "subject_prefix": "string",
        "from_time": "string",
        "to_time": "string"
      }
    ],
    "changed": [
      {
        "oid": 0,
        "to_addr": "string",
        "cc_addr": "string",
        "bcc_addr": "string",
        "from_addr": "string",
        "reply_to_addr": "string",
        "subject_prefix": "string",
        "from_time": "string",
        "to_time": "string"
      }
    ],
    "deleted": [
      {
        "oid": 0
      }
    ]
  }
}

Properties

NameTypeRequiredRestrictionsDescription
idintegerfalsenoneEmail group id
namestringfalsenoneEmail group name
optionsobjectfalsenonenone
» added[EmailGroupOptions]falsenoneEmail group options to be added.
» changed[EmailGroupOptionsChanged]falsenoneEmail group options to be updated.
» deleted[object]falsenoneList of the http headerids to be deleted.
»» oidintegerfalsenoneEmail group options ID

EmailGroupOptions

{
  "to_addr": "string",
  "cc_addr": "string",
  "bcc_addr": "string",
  "from_addr": "string",
  "reply_to_addr": "string",
  "subject_prefix": "string",
  "from_time": "string",
  "to_time": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
to_addrstringfalsenoneEmail group options receiver address
cc_addrstringfalsenoneEmail group options CC address
bcc_addrstringfalsenoneEmail group options BCC address
from_addrstringfalsenoneEmail group options sender address
reply_to_addrstringfalsenoneEmail group options reply to address
subject_prefixstringfalsenoneEmail group options subject prefix
from_timestringfalsenoneEmail group options from time to select time range for members
to_timestringfalsenoneEmail group options to time to select time range for members

EmailGroupOptionsChanged

{
  "oid": 0,
  "to_addr": "string",
  "cc_addr": "string",
  "bcc_addr": "string",
  "from_addr": "string",
  "reply_to_addr": "string",
  "subject_prefix": "string",
  "from_time": "string",
  "to_time": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
oidintegerfalsenoneEmail group options ID
to_addrstringfalsenoneEmail group options receiver address
cc_addrstringfalsenoneEmail group options CC address
bcc_addrstringfalsenoneEmail group options BCC address
from_addrstringfalsenoneEmail group options sender address
reply_to_addrstringfalsenoneEmail group options reply to address
subject_prefixstringfalsenoneEmail group options subject prefix
from_timestringfalsenoneEmail group options from time to select time range for members
to_timestringfalsenoneEmail group options to time to select time range for members

ExcludeDatabases

{
  "server_id": 0,
  "name": "string",
  "exclude_databases": [
    "string"
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
server_idintegerfalsenoneServer id
namestringfalsenoneServer name
exclude_databases[string]falsenoneExclude database names(Comma separated)

ExcludeDatabasesPutData

{
  "exclude_databases": [
    "string"
  ]
}

Properties

NameTypeRequiredRestrictionsDescription
exclude_databases[string]falsenoneExclude database names(Comma separated)