Defining notification templates is the next step after enabling Alerting at the platform level.

Notification templates are dynamically assigned at runtime when parsing metrics for each instance sharing the same TAG(s).

A notification template is composed of:

  • Filters (aka TAGs) corresponding to one or more instances

  • Rules to define criteria that determine whether a notification is triggered


To begin, you are required to set up one or more filters, commonly known as tags.

For tag assignment details, refer to Tags section.

The example below creates a notification template for all instances sharing the tag datacenter=dc1.

When adding a new instance, it will automatically be assigned this template if it shares the same tag.

When parsing metrics, Datasentinel searches for a corresponding notification template using the following sequence:

  1. A template containing the instance name directly in the filter list will always take precedence.

  2. The most recent rule that matches filters


Rules are categorized into two groups.

PostgreSQL metrics

  • Instance status

  • Max connections

  • Blocked sessions

  • Sessions consuming CPU

  • WAL files

  • WAL file-system

  • Old archived time

  • Failed archived files

  • Replication lag

System metrics

  • CPU usage

  • Load average

  • Memory usage

  • Swap usage

  • File systems

You can allocate both WARNING and CRITICAL thresholds to each rule and decide the occurrence count (for specific rules) that will activate an event.

Metrics undergo parsing every minute, making an occurrence equivalent to a one-minute interval.

Every rule can be toggled on or off.

In cases where WARNING and CRITICAL values match, only CRITICAL problems are generated.

Upon saving a template, it becomes active instantly.

Last updated