EDB Postgres Enterprise Manager REST APIs v3.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
}

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.

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
}

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.

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

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<

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

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": "sequence_name",
  "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