User-defined variables

Overview

User-defined variables are parameters that connect input controls and query widgets on dashboards. Values entered in input controls are stored in variables, and query widgets reference those values to dynamically change the displayed data.

For example, to view only events from a specific IP address on a security monitoring dashboard, create a string-type user-defined variable named src_ip and connect it to a text input control. When a dashboard user enters an IP address in the input control, the value is stored in the variable, and query widgets use that value as a filter condition to display only matching events.

Variable values are injected into queries through dashboard dynamic filters. When a filter is activated, the variable value is prepended to the query as a set <variable_name> = <value> command, changing the query widget output. You can view or reset currently set variables and values in the dashboard filter panel.

The type of variable that can be connected depends on the input control type.

Input controlVariables shown in the list
Date input controlDate-type variables and the reserved variables _from, _to
Text input controlVariables of all types and the reserved variable _span
List input controlVariables of all types and the reserved variable _span

Because a text input control passes a string value, connecting a string-type variable is typical.

Accounts with any of the Dashboard Admin, Dashboard Edit, Widget Edit, Dashboard View, or Widget View permissions can view the variable list. To add, edit, or delete variables, you need the Dashboard Admin or Widget Edit permission.

View and search variables

You can view the user-defined variable list under Dashboards > User-Defined Variables.

User-defined variable list

  • Name: Name of the user-defined variable. Click the variable row to open the edit side panel.
  • Type: Data type of the variable
  • Description: Description of the variable
  • Owner: Account that created the variable
  • Created At: Date the variable was created (yyyy-MM-dd format)
  • Modified At: Date the variable was last modified (yyyy-MM-dd format)

To find a specific variable, enter a keyword in the Search search box in the toolbar. The search finds variables whose Name contains the keyword. The search is not case-sensitive. If you enter multiple words separated by spaces, only names that contain all of the words are listed.

Download list

To download the variable list as a file, click Download in the toolbar.

Refresh list

To refresh the list with the latest data, click Refresh in the toolbar.

Add variable

To add a user-defined variable:

  1. Click Add in the toolbar of the variable list.

  2. Enter the variable properties in the side panel, then click OK.

    Add user-defined variable

    • Name: Unique name of the variable (required, up to 50 characters). Only Korean, English, numbers, and underscores (_) are allowed. The name cannot start with an underscore.
    • Type: Data type of the variable (default: String). Available types are:
      • String: Text data
      • Boolean: True/false value
      • Short (16 bits): 16-bit integer
      • Integer (32 bits): 32-bit integer
      • Long (64 bits): 64-bit integer
      • Float (32 bits): 32-bit floating-point number
      • Double (64 bits): 64-bit floating-point number
      • Date: Date and time
      • Country: Country code
      • Port: Port number
      • IP address: IP address
    • Description: Detailed description of the variable (up to 2,000 characters)
Note
Three reserved variables exist that are not displayed in the variable list: _from, _to, and _span. _from and _to are date-type variables used to specify the start and end of a search period. _span is a string-type variable used to specify a time unit.
Note
When you set up a dynamic filter, the variable list in the dialog shows only variables of types that can be searched against the target field (for example, String and Country types for a string field, and Integer (32 bits), Long (64 bits), and Port types for a port field). When you set up a time truncation formula, only String-type variables and the reserved variable _span are shown regardless of the target field type.

Edit variable

To edit a user-defined variable:

  1. Click the row of the variable you want to edit in the variable list.
  2. Modify the information in the side panel, then click OK. The Name cannot be changed.

Delete variable

To delete a user-defined variable:

  1. Select the checkbox of the variable row you want to delete in the variable list.
  2. Click Delete in the toolbar.
  3. In the Remove User-Defined Variable dialog, confirm the list of variables to delete, then click Delete. Click Cancel to cancel the operation.

Accounts other than administrators can delete only the variables they own. If you select a variable owned by another account, that item is not deleted and appears in the failure list.

Caution
Deletion proceeds even if an input control widget references the variable. Widgets that referenced the deleted variable no longer work correctly, so before deleting, switch those widgets to another variable or clean them up.