Tailwind CSS on GitHub

Alerts and Notifications

Alerts are a powerful feature built into Datav, which currently only supports Graph charts.

Alert notification

When the alert status changes, the system will send an alert notification to the specified user channel. Each team can create and manage their own alert channels, as shown in the Global team example.

Before creating an alert channel, A very important configuration need to be completed : mail SMTP setup, go to the datav installation directory, open the file datav.conf, find the SMTP area, and then set it up.

Create alert notification

  1. In the side menu select Configuration -> Team -> View Global -> Channels -> Add Channel
  2. Enter the name, select type email, enter the target email addresses in the address area, and use ; to separate each address
  3. When Default is enabled, all alerts of the team will be pushed to the current channel by default. When Disable Resolve Message is enabled, only the alert trigger notification will be pushed, but not the alert recovery notification
  4. Click Test, we will send you a test email to the email addresses you set
  5. Click Save

Manage alert notification

  1. In the side menu select Configuration -> Team -> View Global -> Channels
  2. Click the corresponding row of the table to pop up the panel and edit

Alert rules

Alert rules control the trigger conditions and rules for alerts. They are tied to the dashboard chart, So when you delete the chart, you also delete the corresponding alert rule .

Before we can create an alert rule, we need to have a dashboard under the global team. If not, create a new dashboard.

Create alert rules

  1. Go to the Global team`s dashboard, create a Graph chart, and use the Prometheus data source or test data to generate the graph.
  2. Go to the chart editing page, select the Alert TAB at the bottom left, and click Create Alert

This page is quite complicated, let`s explain them one by one:

  • Name : Give the alert an appropriate name

  • Evaluate every + for :DATAV will query data every X minutes, and then judge whether the alert threshold has been reached according to Conditions. If the alert threshold has been reached, the current state will be changed from OK to PENDING, when the PENDING state is lasting more than Y minutes, an alert notification will be pushed

  • Conditions : When the AVG OF QUERY A matches WITH VALUES AND lasts for more than 5 minutes, the alert threshold is reached AND the current state is set to Pending.

    Grafana`s alert granularity is graph level, even if the graph has 1000 curves, only one curve can alert, so Grafana`s alert becomes extremely unusable with multiple curves. By contrast, the Datav is for each curve in the graph

    If you click With Labels AND Values, you can filter the curves on the graph according to the label. The default is _DEFAULT, which means that all the curves on the graph use this condition. e.g : ImageNow, we want to set the alert threshold `0.2` for the curve tag instance=, and the alert threshold `0.01` for other curves, which can be set as follows:Image
  • Channels :Common cases is the alert channel we created earlier, which is valid for all curves, while SET EXCEPTIONS can be set separately for the curve level.

  • Message : In addition to the alert content, you can also add a KV pair as a tag for searching

Global alerts manage

Click the alert icon in the side menu bar to enter the alert management page, then you can manage the alerts globally, without manually entering a dashboard to set up.

Alert rules

In this page, you can see the rules we have set. Next to the rule name, the team is indicated in brackets. Click the rule name to go to the rule editing page, and click the team name to go to the team page.

Alert histories

In this page, you can see the alarm push of the history. Click "push off" and you can go to the scene snapshot at that time, so that users can quickly view the scene where the problem occurred