Database
We use the PostgreSQL database with Timescale extension for many reasons. We believe it is an ideal partner to work with Grafana. Please refer to the following blog post to to learn our reasoning.
Schema
In the latest available version of the Business Engine, the database schema has 8 tables as shows on the image below.
Logically, these 8 tables can be be categorized into two groups: Business Engine and Alerting tables.
Alerting tables
alerts
- Contains alert rules configuration.
- One row for one alert rule.
action_relations
- Connects alert rules with alert actions.
- The same alert rule might trigger multiple actions, and vice versa; the same action might be triggered by multiple action rules.
alert_conditions
- Define evaluation rules for the alert. One row for one alert rule.
alert_events
- Grows with every alert rule execution, which makes it the biggest table.
- One row per an executed alert rule.
Business Engine tables
environments
- Contains overrides for the environment variables updated using Business Studio.
migration
- Track the database version updates using TypeORM framework.
actions
- Contains all configured actions.
- One row per action.
clustering
- Contains loads balancing configuration.
- The table is used if your system is configured for more than one Business Engine.