Events widget

You can use the Events widget to get analytics based on SQL queries.

When creating this widget, you must specify the settings described in the tables below.

General tab

The following table lists the settings on the General tab.

Description of parameters

Setting

Description

Graph

Graph type. The following graph types are available:

  • Pie chart.
  • Bar chart.
  • Counter.
  • Line chart.
  • Table.
  • Date Histogram.
  • Stacked Bar chart
  • Speedometer chart

Format

Data display format: Absolute values or Relative values, %. The setting is available for a Stacked Bar chart.

If you select the Absolute values format, the heights of the bars correspond to the sum of the values of the measured indicator. If you select the Relative values, % format, all bars have the same height of 100%, and the relative heights of colored zones on the bars correspond to the ratios of indicator values.

By default, Absolute values is selected.

Timeline view

Time data display format: Bar chart or Line chart. This setting is available for charts of the Date Histogram type.

When you select the Bar chart format, the data is displayed as vertical bars by default. If the SQL query contains an additional category field (for example, Type), the chart becomes a stacked bar chart, that is, each bar is divided into stripes in accordance with the values of this field.

If you select the Line chart format, data is displayed as a polyline connecting points on the time axis.

Bar chart is selected by default.

Tenant

The tenant for which data is displayed in the widget. You can select multiple tenants. By default, data is displayed for tenants selected in layout settings.

Time period

Period for which data is displayed in the widget. The default is As layout, meaning that data is displayed for the period selected for the layout.

You can also specify a period for the widget in one of the following ways:

  • Select the exact start and end date and time of the period in the calendar and click Apply.
  • Select a period relative to the present time in the Relative period list.
  • Specify a value manually: select an exact date and time or a relative period, or a combination of both.

For details, see the Configuring a period subsection below.

Show data for previous period

Enable the display of data for two periods at the same time: for the current period and for the previous period.

When using a Stacked Bar chart, the Show data for previous period setting is taken into account if the query contains standard aliases: value, category, metric. However, if instead of the standard metric, the query uses a custom metric calculation with non-standard aliases, the Show data for previous period is not taken into account.

Storage

Storage that is searched for events. The list displays the available spaces. You can select only one storage, but you can select one or more spaces. The values in the Storage field are independent of the selected tenants in the Tenant field. The field displays storages and spaces, like in the Events section.

When a new space is created in the storage, this new space is not selected by default in the widget settings. You must manually select the new space.

If the user has access to all spaces listed in the widget, the widget can display the event information for tenants specified in the space set in the user's permissions.

If the user does not have access rights to one or more spaces of the storage, the widget cannot display information; the user cannot edit the widget, but can duplicate the widget using the Duplicate button. Duplication does not depend on access rights to spaces. If a template is duplicated in widgets that have spaces specified that are not accessible to the user, the value in the Storage field is reset. Such widgets display an error: Access denied (Operation returns no results because of allowed and selected event spaces). To save the template, you need to specify spaces in widgets.

In widgets that have spaces that are accessible to the user, the value of the Storage field is not reset and is saved when the template is duplicated.

When the user downloads the template, the data of inaccessible files are hidden in the downloaded file.

If the user's email address is included in the list of recipients of the scheduled report, the user gets the full version of the report, regardless of which spaces are accessible.

SQL query field

Query for filtering and searching for events manually. You can create a query in Builder by clicking Use SQL builder.

You can use extended event schema fields to create a chart of the table type.

Example

For detailed information on creating an SQL query in the query constructor, see below.

The following limitations apply:

  • The metric and value aliases in SQL queries cannot be edited for any type of event analytics widget, except tables.
  • Aliases in widgets of the Table type can contain Latin and Cyrillic characters, as well as spaces. When using spaces or Cyrillic, the alias must be enclosed in quotation marks: "An alias with a space", `Another alias`.
  • ARRAY JOIN SQL queries are not supported.
  • When displaying data for the previous period, sorting by the count(ID) parameter may not work correctly. We recommend sorting by the metric parameter. For example, SELECT count(ID) AS "metric", Name AS "value" FROM `events` GROUP BY Name ORDER BY metric ASC LIMIT 250.
  • In widgets of the Counter type, you must specify the method of data processing for the values of the SELECT function: count, max, min, avg, sum.

Configuring a period

How to create a query in Builder

Example of search conditions in the query builder

Axes tab

The following table lists the settings on the Axes tab.

The tab is displayed if on the General tab in the Graph field you have selected one of the following values: Bar chart, Line chart, Date Histogram.

Description of parameters

Setting

Description

Point size

Point size on the graph. This field is displayed for the Line chart graph type.

Line-width

Width of the line on the graph. This field is displayed for the Line chart graph type.

Minimum and maximum values for the Y-axis

Scale of the Y axis.

Negative values can be displayed on chart axes. This is due to the scaling of charts on the widget and can be fixed by setting zero as the minimum chart values instead of Auto.

Minimum and maximum values for the X-axis

Scale of the X axis.

Negative values can be displayed on chart axes. This is due to the scaling of charts on the widget and can be fixed by setting zero as the minimum chart values instead of Auto.

Decimals

Number of decimals to which the displayed value must be rounded off.

Appearance tab

The following table lists the settings on the Appearance tab.

Description of parameters

Setting

Description

Name

Name of the widget.

Description

Description of the widget.

Show legend

Displays a legend for the analytics. The toggle switch is turned on by default.

Show nulls in legend

Displays parameters with a null value in the legend for analytics. The toggle switch is turned off by default.

Color

The color used for displaying the information:

  • default for your browser's default font color
  • green
  • red
  • blue
  • yellow

This setting is available for graphs such as Bar chart, Counter, Line chart, Date Histogram.

Gradient

Gradient fill of the chart:

  • Two-color
  • Three-color

You can adjust the direction of the fill by clicking the toggle direction icon (swap_arrow_icon); you can also set thresholds.

This setting is available for charts such as Bar chart, Date Histogram(with the Bar chart time chart type), Table.

Field for gradient indicator

The column of the table in which the cells are to be gradient-filled.

This setting is available for charts of the Table type.

Horizontal

Makes the histogram horizontal instead of vertical.

When this option is enabled, when a widget displays a large amount of data, horizontal scrolling is not available and all available information is fit into the fixed size of the widget. If there is a lot of data to display, it is recommended to increase the widget size.

Show total

Shows sums total of the values.

Period segments length

Duration of the segments into which you want to divide the period. Available for graphs of the Date Histogram type.

Scale

Scale for displaying data. Available for a Stacked Bar chart. The following values are possible:

  • Linear
  • Square
  • Logarithm

The default is Linear.

Regression

An option for indicating the average value on the chart. The following values are possible:

  • Not set
  • Linear
  • LOESS (curve with locally estimated scatterplot smoothing).

Available for the Date Histogram and Line chart types.

Page top