In the navigation panel, go to Monitoring → Alerts.
In the top-right corner of the page, click Create alert.
In Configuration, specify parameters of the new alert (parameters marked with an asterisk are required):
Name.
Priority.
Possible values:
Not classified (default)
Low
Medium
High
Critical
Data source type: The type of the data source that will be used for the alert trigger.
Currently, you can only use the Metrics type.
Data source.
State: The state of the alert after creation.
Possible values:
Disabled
Enabled
Check interval, sec.: The interval in seconds for checking the data source of the alert trigger.
Minimum and default value: 60.
Flap check, count: The number of repeated triggers required for stopping the alert.
The value of 0 means that this limitation is
disabled.
Default value: 3.
Notify after, sec.: The time in seconds during which the trigger must continually fire for the alert to be sent.
The value must be greater or equal to the Check interval, sec. value.
Default value: 300.
Cooldown period, sec.: The time in seconds during which the alert will not be sent after the last firing trigger.
0 means that this limitation is disabled.
Default value: 300.
Click Next.
In Rules and check objects, configure the rules to fire the alert trigger and select the objects to check (parameters marked with an asterisk are required):
Rules:
Metric name: The name of the metric without any additional characters, used for the alert trigger.
You can use the following pgpro-otel-collector
metrics from the monitoring.metrics table
of the repository database:
postgresql.archiver.archived_count
postgresql.archiver.failed_count
postgresql.bgwriter.buffers_checkpoint
postgresql.bgwriter.buffers_clean
postgresql.bgwriter.buffers_backend
postgresql.bgwriter.buffers_allocated
postgresql.bgwriter.maxwritten_clean
postgresql.bgwriter.buffers_backend_fsync
postgresql.bgwriter.checkpoints_requested
postgresql.bgwriter.checkpoints_timed
postgresql.bgwriter.checkpoint_sync_time_milliseconds
postgresql.bgwriter.checkpoint_write_time_milliseconds
postgresql.databases.blocks_hit
postgresql.databases.blocks_read
postgresql.databases.conflicts
postgresql.databases.deadlocks
postgresql.databases.checksum_failures
postgresql.databases.tuples_fetched
postgresql.databases.tuples_returned
postgresql.databases.tuples_inserted
postgresql.databases.tuples_updated
postgresql.databases.tuples_deleted
postgresql.databases.temp_bytes
postgresql.databases.temp_files
postgresql.wal.bytes
postgresql.databases.rollbacks
system.cpu.utilization
system.memory.usage
system.paging.usage
postgresql.wal.records
postgresql.databases.commits
Operator • Threshold value: The alert condition containing a logical operator and value.
Possible logical operators:
= (eq)
> (gt)
>= (gte)
< (lt)
<= (lte)
!= (neq)
For example, if you select > and specify
0, the alert is sent when the value of the
specified metric exceeds 0.
You can add multiple alert trigger rule conditions by clicking
Add. A condition can be deleted
by clicking .
Rule condition: The logical connectives for the specified alert trigger rule conditions.
Possible values:
And
Or
This parameter is available only if you added multiple alert trigger rule conditions.
Objects to check: The objects to be checked against the configured rules.
Select one of the following object types:
Instances.
Clusters.
Tags.
Then select one or more objects from the Available list.
If no objects are selected, then the alert is configured to check all objects of the selected type.
Notification settings:
Notify users: The users that will receive alerts.
Notify groups: The user groups that will receive alerts.
Alert template: The template of the alert text.
You can use the following variables in the alert text:
{{.Title}}: The name of the metric used for
the alert trigger.
{{.Timestamp}}: The date and time when the
alert trigger fired.
{{.HostName}}: The name of the host
where the trigger fired.
{{.AgentName}}: The agent that caused the
trigger to fire.
{{.InstanceName}}: The name of the instance
where the trigger fired.
{{.Status}}: The status of the alert trigger.
{{.ThresholdValue}}: The threshold value
of the metric that caused the alert trigger to fire.
{{.ActualValue}}: The actual value of
the metric that caused the alert trigger to fire.
{{.TargetValue}}: The type of
the checked objects.
{{.MetricName}}: The name of the metric.
Default alert template:
{{.Title}} [{{.Timestamp}}]: {{.HostName}} status is {{.Status}}
Notify resolved: Specifies whether the alert is sent once the trigger is resolved.
Possible values:
Enabled.
For this value, in Resolved template, enter the template of the alert text.
You can use the same variables in this alert text as in Alert template.
Disabled.
Click Next.
In Confirmation, review the alert parameters.
Click Save.