Prometheus parameters
In this article:
Prometheus parameters#
Note
Parameters can be specified in snake_case notation. Parameters that are passed are automatically converted to camelCase.
Parameters for creating a service#
These parameters are provided as parameters in the method CreateService.
When creating a new service, the parameters marked as Required should be provided.
remoteWriteReceiver#
Indicates whether this Prometheus service can receive metrics from other services via the Remote-Write protocol.
Note
The remoteWriteReceiver parameter is supported for environment versions paas_v4_0 or later.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
No |
Yes |
Boolean |
true |
Parameters for creating and modifying a notification channel#
These parameters are specified as parameters in the CreateNotificationChannel and ModifyNotificationChannel methods
When creating a new notification channel, be sure to specify all parameters marked as Necessary. When modifying an existing notification channel, be sure to pass all parameters that can be edited. If a parameter is not passed, its value will be cleared. Parameters that cannot be edited are not required to be passed, but their values must match the current values if passed.
type#
Channel type.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes |
No |
String |
email |
isDefault#
Specifies whether to use the notification channel as the default one.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
No |
Yes |
Boolean |
true |
sendResolved#
Specifies whether to notify of resolved problems.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
No |
Yes |
Boolean |
true |
botToken#
Role for anonymous access.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
Yes |
Yes |
String |
Telegram |
Correct Telegram token |
chatId#
Telegram chat ID.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
Yes |
Yes |
Integer |
Telegram |
Valid Telegram chat ID |
url#
URL to which the request is routed when an alert is triggered.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
Yes |
Yes |
String |
webhook |
Valid URL |
maxAlerts#
Maximum number of alerts per message. Alerts beyond this number will be lost.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
No |
Yes |
Integer |
webhook |
Positive number |
to#
E-mail address.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
Yes |
Yes |
String |
Valid e-mail address |
from#
E-mail address that will be specified as a sender.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
No |
Yes |
String |
Valid e-mail address |
smarthost#
Address of the SMTP server via which e-mails will be sent.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
Yes |
Yes |
String |
A valid SMTP server address with mandatory indication of the port |
hello#
Host name used for identification on the SMTP server.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
No |
Yes |
String |
Valid host name or IP address |
requireTls#
Use an encrypted connection to the SMTP server.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
Yes, if auth_username and auth_password are specified |
Yes |
Boolean |
true |
authUsername#
User name used for authentication on the SMTP server.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
No |
Yes |
String |
String of 256 characters max |
authPassword#
User password used for authentication on the SMTP server.
Required |
Editable |
Datatype |
Channel type |
Valid values |
|---|---|---|---|---|
No |
Yes |
String |
String of 256 characters max |
Parameters for creating and modifying a route#
These parameters are specified as parameters in the CreatePrometheusRoute and ModifyPrometheusRoute methods
When creating a new route, make sure to specify all parameters marked as Required. When modifying an existing route, make sure to pass all parameters that are editable. If a parameter is not passed, its value will be cleared. Parameters that cannot be edited are not required to be passed, but their values must match the current values if passed.
matchers#
Criteria used to select the notification recipient. The matchers filter may contain one or more conditions that determine whether an alert will be sent to this recipient. A condition consists of a label name, operator, and value. Supported operators: =, !=, =~, !~. If there are several conditions, the “logical AND” operation is used.
Examples of matchers:
alertname = "Node down"severity =~ "warning|critical"
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes |
Yes |
List of strings |
Valid criterion for selecting a Prometheus route |
receiver#
Notification recipient.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes |
Yes |
String |
It must be the name of one of notification channels of the particular service |
continue#
Specifies whether to continue iterating through the route selection criteria after the first match is found.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes |
Yes |
Boolean |
true |
groupBy#
List of labels by which alerts will be grouped to send notifications.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
No |
Yes |
Array of strings |
List of correct Prometheus labels |
groupWait#
Time to wait before sending the first notification about an alert group. Specified in Time duration format
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
No |
Yes |
String |
String in Time duration format. Valid ranges: 1-30d, 1-24h, 1-60m, 1-60s, 1-99999ms. Combining is available, for example 30d24h60m60s99999ms. |
groupInterval#
Time to wait before sending a notification after adding an alert to a group for which a notification has already been sent. Specified in Time duration format
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
No |
Yes |
String |
String in Time duration format. Valid ranges: 1-30d, 1-24h, 1-60m, 1-60s, 1-99999ms. Combining is available, for example 30d24h60m60s99999ms. |
repeatInterval#
Time to wait before sending the second notification about an alert group. Specified in Time duration format
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
No |
Yes |
String |
String in Time duration format. Valid ranges: 1-30d, 1-24h, 1-60m, 1-60s, 1-99999ms. Combining is available, for example 30d24h60m60s99999ms. |
Parameters for creating and modifying a scrape job#
These parameters are specified as parameters in the CreatePrometheusScrapeJob and ModifyPrometheusScrapeJob methods
When creating a new data scrape job, be sure to specify all parameters marked as Necessary. When modifying an existing data scrape job, be sure to pass all parameters that can be edited. If a parameter is not passed, its value will be cleared. Parameters that cannot be edited are not required to be passed, but their values must match the current values if passed.
targets#
List of addresses of third-party services to connect to monitoring.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes |
Yes |
Array of strings |
List of valid addresses |
labels#
Labels to be assigned to the received metrics. The label names may contain digits, Latin letters, and underscores. The name cannot start with a double underscore. The length of label value must not exceed 256 characters.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes |
Yes |
Dict |
List of valid labels (see the parameter description) |
Parameters for creating and modifying a Remote Write target#
These parameters are specified as parameters in the CreatePrometheusRemoteWriteTarget and ModifyPrometheusRemoteWriteTarget methods
When creating a new Remote Write target, make sure to specify all parameters marked as Required. When modifying an existing Remote Write target, make sure to pass all parameters that are editable. If a parameter is not passed, its value will be cleared. Parameters that cannot be edited are not required to be passed, but their values must match the current values if passed.
url#
The address of the remote system endpoint to which the metrics should be sent from the current server.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes |
Yes |
String |
Valid URL |
username#
The username for basic authentication on the remote server.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes, if password is specified |
Yes |
String |
String of 256 characters max |
password#
The password for basic authentication on the remote server.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes, if username is specified |
Yes |
String |
String of 256 characters max |
write_relabel_configs#
The list of rules for relabeling metrics before sending those to the remote server.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
No |
Yes |
List of dicts |
The metric relabeling parameters when creating and editing a Remote Write target.#
These parameters are specified in the items of the write_relabel_configs list, which is nested in the parameters field of the CreatePrometheusRemoteWriteTarget and ModifyPrometheusRemoteWriteTarget methods.
action#
The action to be performed in case of match with regex.
Required |
Editable |
Datatype |
Valid values |
Defaults |
|---|---|---|---|---|
Yes |
Yes |
String |
replace |
replace |
source_labels#
The list of labels whose values are mapped to a regular expression. The label values are concatenated by separator before applying regex. The label names may contain numbers, Latin letters, and underscores. The names may not start with a number.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
No, if the |
Yes |
Array of strings |
List of valid labels (see the parameter description) |
separator#
The separator used to concatenate the source_labels label values.
Required |
Editable |
Datatype |
Valid values |
Defaults |
|---|---|---|---|---|
Yes, if the source_labels parameter is passed |
Yes |
String |
String of 256 characters max |
; |
target_label#
The label to which the action result is written. The label name may contain numbers, Latin letters, and underscores. The name may not start with a number.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes, if the |
Yes |
String |
List of valid labels (see the parameter description) |
regex#
The regular expression for matching with a value from source_labels.
Required |
Editable |
Datatype |
Valid values |
Defaults |
|---|---|---|---|---|
Yes, if the |
Yes |
String |
Valid regular expression |
(.*) |
modulus#
The modulus to calculate hash from the source_labels values.
Required |
Editable |
Datatype |
Valid values |
|---|---|---|---|
Yes, if the |
Yes |
Integer |
1–48 |
replacement#
The value that replaces target_label when it matches regex.
Required |
Editable |
Datatype |
Valid values |
Defaults |
|---|---|---|---|---|
No. The parameter can be passed if |
Yes |
String |
String of 256 characters max |
$1 |