Query widget

Overview

Query widgets visualize collected logs so that security operations analysts can immediately identify anomalous indicators on a dashboard. Clicking or dragging a chart or grid element can pass filters to other widgets or run related queries, enabling interactive dashboards where multiple widgets work together.

Editing query widgets requires an administrator account or an account with the dashboard management or widget editing permission. An account with only the widget viewing permission can view widget settings but cannot make changes. The widget editor is accessed from Settings > Widgets on the dashboard. For information on creating widgets, see Widgets.

Widget editor

The query widget editor screen consists of a left panel and a right pivot table editor.

Query widget editor

Basic settings

Set the basic widget information in the left panel.

  • Name: Widget name (required, up to 50 characters)
  • Description: Widget description (up to 2,000 characters)
  • Display Interval: Interval at which the widget data is automatically refreshed (in seconds, required, range: 1–2,147,483)
  • Granted Users: Select the accounts to share this widget with.
  • Granted Groups: Select the account groups to share this widget with.
Data source and visualization

Select a data source and configure the visualization in the right pivot table editor. For instructions on using the pivot table editor, see Pivots.

Chart types

You can switch between Grid view grid view and Chart view chart view in the pivot table editor. Grid displays query results in a table format. When you select chart view, you can choose one of the following chart types in the chart settings modal.

TypeDescription
LineLine graph
SplineCurved line graph
AreaGraph with the area below the line filled
Area (Spline)Curved area graph
Stacked AreaArea graph with multiple series stacked
Stacked Area (Spline)Curved stacked area graph
BarHorizontal bar graph
Stacked BarHorizontal stacked bar graph
ColumnVertical bar graph
Stacked ColumnVertical stacked bar graph
ScatterplotVisualizes data distribution on X/Y coordinates
PieDisplays proportions as a circle
TreemapDisplays hierarchical data as nested rectangles
Alert BoxDisplays alert status when thresholds are exceeded
World Map (Marker)Places markers on a map by latitude/longitude
World Map (Bubble)Displays data on a map with bubble sizes by country

Chart settings

All chart types except Grid use a chart settings modal to configure visualization options. The chart settings modal contains the following tabs:

TabDescriptionSupported types
VariablesSet the fields used in the chart (independent variable, dependent variables)All types
ViewZoom direction for selected area, how to connect empty valuesLine series, bar series, scatterplot
ChartTitle, subtitle, background color, borderAll types
AxisX/Y axis title, display format, min/max valuesLine series, bar series, scatterplot
Color AxisTreemap color range settingsTreemap
SeriesSeries type, color, marker, border styleAll types except treemap
LabelWhether to display value labels on all seriesLine series, bar series, scatterplot
LegendWhether to display the legend, layout, positionAll types
EventClick and drag event action settingsAll types

For detailed settings of each chart type, refer to the corresponding chart type page.

Event settings

Configuring events enables actions such as applying dashboard filters, running queries, and opening URLs when a user clicks or drags within a widget. Use events to link multiple widgets on a dashboard or build interactive dashboards that navigate to detailed analysis screens with a single click.

Events are configured on the Event tab of the chart settings modal.

Event tab

Event types
On Click
Fires when a user clicks an item in a chart or grid. Supports all actions: Apply Filter, Run Query, Open Web Browser, and Switch view.
Drag
Fires when a user drags a range on a chart. Available only on charts where the independent variable is a time type. Only the Apply Filter and Run Query actions are supported. The start time and end time of the drag range are provided as reserved words.
Apply Filter

When a click or drag event occurs, a dashboard filter is automatically added with the specified conditions. Click the + button to add a filter — you can add multiple filters to the same action.

Apply Filter event settings

Each filter entry consists of Scope, Type, and Target Field/Query Statement.

Scope
Specifies the target to which the filter is applied.
  • Global: Applies to all widgets on the dashboard.
  • Dataset: Applies only to widgets that use the same dataset as this widget. Available only for dataset-based widgets.
Type
Specifies the format of the filter condition.
  • Filter: Generates a comparison expression based on the field name entered in the target field. For click events, it creates a search <field> == <clicked value> expression; for drag events, a time range expression is generated automatically.
  • Query: Enter a Logpresso query command directly in the query statement field. Reserved words in the query are replaced with actual values at execution time.

The following reserved words are available for the Query type:

On Click reserved words

Reserved wordDescription
$series$Field name of the clicked item
$field_name$Value displayed for that field (e.g., $src_ip$ → the src_ip value of the clicked row)

Drag reserved words

Reserved wordDescription
$xfield$Name of the time field
$from$Drag start time
$to$Drag end time
Run Query

When a click or drag event occurs, a specified query runs in a new window. Enter the Logpresso query command to run in the Settings area.

Run Query event settings

Reserved words in the query are replaced with actual values at execution time.

On Click reserved words

Reserved wordDescription
$series$Field name of the clicked item
$field_name$Value displayed for that field (e.g., $src_ip$ → the src_ip value of the clicked row)

Drag reserved words

Reserved wordDescription
$xfield$Name of the time field
$from$Drag start time
$to$Drag end time

In an Alert Box widget, the reserved words $value$ (displayed value), $field$ (field name), and $threshold$ (threshold value) are also available.

Open Web Browser

When a click event occurs, the URL stored in the specified field opens in a new window. Select the field containing the URL value from the Fields with URLs dropdown. Available for click events only.

Switch view

When a click event occurs, the screen navigates to the specified URL path. Enter the destination URL directly in the Set Screen Navigation URL area. You can use reserved words in the URL to pass the clicked item's values as query parameters. Available for click events only.

Reserved wordDescription
$field_name$Value of the corresponding field in the clicked chart or grid item
$series$Field name of the clicked item

In an Alert Box widget, the reserved words $value$ (displayed value), $field$ (field name), and $threshold$ (threshold value) are also available.