EDB Postgres Enterprise Manager REST APIs v4.0: Custom Probe v10.2

get__probe_

Code samples

GET /probe/

Get all the custom/system probes.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
[
  {
    "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"
      }
    ]
  }
]

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[CustomProbes]falsenonenone
» 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
»» 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
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
Info

This operation does not require authentication

post__probe_

Code samples

POST /probe/

Create new custom probe

Body parameter

{
  "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"
    }
  ]
}

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyCustomProbePostDatatruenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKStatus 200None

Response Schema

Info

This operation does not require authentication

get__probe_{probe_id}

Code samples

GET /probe/{probe_id}

Get probe information for specified probe id.

Parameters

NameInTypeRequiredDescription
probe_idpathintegertrueProbe ID for which probe information will be returned.
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "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"
    }
  ]
}

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseCustomProbes
Info

This operation does not require authentication

put__probe_{probe_id}

Code samples

PUT /probe/{probe_id}

Update custom/system probe information for specified probe id.

Body parameter

{
  "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"
      }
    ]
  }
}

Parameters

NameInTypeRequiredDescription
probe_idpathintegertrueProbe ID for which probe information will be returned.
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyCustomProbePutDatatruenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKStatus 200None

Response Schema

Info

This operation does not require authentication

delete__probe_{probe_id}

Code samples

DELETE /probe/{probe_id}

Delete the custom probe.

Parameters

NameInTypeRequiredDescription
probe_idpathintegertrueProbe ID for which probe information will be returned.
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

Responses

StatusMeaningDescriptionSchema
200OKSuccessful deletionNone

Response Schema

Info

This operation does not require authentication