Reference: Variables

You can use variables when you create a connection. For some connection destinations and formats, you can use variables for configured fields that can be replaced with new values when the connection run starts.

Connection variables

Use connection variables with supported fields to customize the information that Connect sends to a destination. Enclose a connection variable in curly bracket characters: { and }. For example:

  • {fileextension} is replaced in the output field as json.

  • {computer group} is replaced in the output field as Example computer group.

Note: Variables enclosed in curly brackets that do not match a connection variable, and that are not supported by the source, are interpreted as timestamp variables. Characters that match timestamp variables are replaced in the output, and other characters are passed through to the destination. For example, if you enter {sourcecomputergroup} as a variable, because it does not match either the {source} or the {computergroup} variable, characters that match timestamp variables are replaced in the output, such as 45ourc4co38put4rgroup.
Table 1. Connection variables

Variable

Supported fields

connection id connectionid

Numeric ID of the connection; unique only to a specific Module Server

  • AWS S3 source

    • S3 Bucket Name and Optional Path

    • AWS S3 File Name

  • Elasticsearch source

    • URL

  • Email (O365, SMTP) source

    • Subject

    • Attachment File Name

  • CEF format

    • Source

  • LEEF format

    • Source

  • Syslog RFC 5424 format

    • SD-ID

connection name connectionname

User-configured name of the connection

connection run id connectionrunid

Numeric ID of the connection run; unique only to a specific Module Server

source 1

Human-readable name of the connection source

computer group 2 computergroup 2

Name of the computer group from the Tanium Server

file extension 3 fileextension 3

File extension of the chosen format

1 The source variable is interpreted as the data source name (for example, Client Status) for most data sources. For saved question and TDS sources, the source variable is interpreted as the saved question name. If you configure the Syslog RFC 5424 format, you can select Send Question Source to add Question={Source} to the output.

2 The computer group and computergroup variables are available for only the saved question data source. No other data sources offer computer group filtering.

3 The file extension and fileextension variables are available only if you configure a CSV, HTML, or JSON format.

Time stamp variables

Use time stamp variables with the File Name Time Stamp Format, File Name, AWS S3 S3 Bucket Name and Optional Path, and Elasticsearch URL fields to customize the time stamp that Connect appends. Enclose one or more time stamp variables in curly bracket characters: { and }. For example:

  • {%m/%d/%y} is replaced in the output field as 010124.

  • {%A-%m/%d/%y-%l:%M:%S %p} is replaced in the output field as Monday-010124-102030PM.

Note: Time stamp variables are case sensitive.
Note: Any characters in the format string that are not associated with a timestamp variable are passed through to the destination. If you add special characters, such as a slash (/), hyphen (-), or colon (:), file name, file path, or URL fields might not render as expected, or fail to render.
Table 2. Common time stamp variable combinations

Variable combination1

Description

Example

%m/%d/%y

United States2: mm/dd/yy

01/15/00

%Y-%m-%d

ISO 86013: yyyy-mm-dd

2000-01-15

%d-%m-%Y dd-mm-yyyy

15-01-2000

%A, %B %e, %Y DAY, MONTH dd, yyyy

Saturday, January 15, 2000

%b %e %a mmm dd Day

Jan 15 Sat

%H:%M hh:mm

15:45

%I:%M %p hh:mm p

3:45 PM

1Time stamp variable combinations with special characters might not work properly if used for a file name, file path, or URL. Special characters might change how a file is saved, prevent a file from saving properly, create a non-standard URL format, or change how a URL is parsed.

2MM-DD-YYYY is supported as a legacy variable. For the best results, use %m/%d/%y for improved support.

3YYYY-MM-DD is supported as a legacy variable. For the best results, use %Y-%m-%d for improved support.