Configuring file destinations

File destinations are not supported with Tanium Cloud.

You can configure flat text or JSON files as your connection destination. By default, files are written to the \Program Files\Tanium\Tanium Module Server\services\connect-files\output directory on Windows. On a Tanium™ Appliance, files are written to /opt/mounts/connect by default, or you can specify a file share mount for Connect. For more information, see Tanium Appliance Deployment Guide: Configure solution module file share mounts.

Specify general connection information

  1. On the Connect Overview page, scroll to the Connections section and click Create Connection.
  2. Enter a name and description for the connection.
  3. (Optional) In the General Information section, expand Advanced to configure the following settings:

    Log Level

    By default, Log Level is set to Information. To reduce the amount of logging, you can set Log Level to Warning, Error, or Fatal.

    Override Log Level

    If you are debugging the connection, select Override Log Level to set a Temporary Log Level (such as Trace or Debug) on this connection for a selected Number of Runs (up to 24). A scheduled or manual connection run, once started, counts towards the number of runs, regardless of the connection status. After the number of runs elapse, the logging for this connection returns to the Log Level you selected to prevent finer-grained logging from consuming additional resources for an indefinite number of runs.

    Minimum Pass Percentage

    Minimum percentage of the expected rows that must be processed for the connection to succeed.

    Memory Ceiling (GB)

    Maximum memory for the node process to run the connection. This defaults to 1 GB per connection, and cannot exceed the global maximum sum of memory for all running connections (by default, 8 GB). Increase this setting if a connection frequently exhibits out of memory errors while running.

    If the sum of simultaneously scheduled connection Memory Ceiling values exceed the global Memory Ceiling, connections run until the global Memory Ceiling is reached, then any remaining connections enter a waiting queue if you select the Queue Connections configuration setting, or fail if you clear the Queue Connections configuration setting.

Configure the connection source

The connection source determines what data you are sending to the destination. This data is usually information from Tanium, such as a saved question, question log, client status, or event. The settings vary depending on which source you choose.

After you create a connection, you cannot update the connection source type, only the source configuration. If you want to change the source type, create a new connection.

Configure the file destination

After you create a connection, you cannot update the connection destination type, only the destination configuration. If you want to change the destination, create a new connection.

Specify details about the file that you want Connect to create, including the file name and how you want to save the file.

  1. Name the destination.
    • Specify a unique name to save the configuration information as a new destination. Select New, and then enter a Destination Name.

    • Select an existing destination. Select Existing, and then select a destination from the Destination Name drop-down list. If you edit the settings for an existing destination, all connections that use that destination are affected.

    • Copy an existing destination. Select New, and then click Copy Settings. Select a destination from the drop-down list, click Apply, and update the Destination Name.

  2. Enter the file name with extension, or use a variable as listed in Reference: Variables. On Windows, files are written to the \Program Files\Tanium\Tanium Module Server\services\connect-files\output directory.
    • The file name can include a subdirectory to create in the \Program Files\Tanium\Tanium Module Server\services\connect-files\output directory, or just the file name. For example, if you specify high_cpu_results\cpu_results.txt, the file is written to: \Program Files\Tanium\Tanium Module Server\services\connect-files\output\high_cpu_results\cpu_results.txt.
    • If you want to point to the file directory on the Module Server from another location, create a symbolic link with the mklink command. For example, if you wanted a symbolic link from the c:\logs\mylogs directory to the Connect logs directory, you might run: 

      mklink /d "c:\logs\mylogs" "c:\Program Files\Tanium\Tanium Module Server\services\connect-files\output\logs\mylogs"

    • Include a file extension with the file name. The file extension does not need to match the format option you select in the Format section. Note the option that you select in the Format section does not add or change the file extension.
    • You can choose to compress the resulting file as a gzip or zip file. If you select a compression method, the file extension for the compression method is automatically added to the end of the file name.

    On Tanium Appliance, files are written to /opt/mounts/connect or you can specify a file share mount for Connect. For more information, see Tanium Appliance Deployment Guide: Configure solution module file share mounts.

  3. (Optional) In the Advanced section, add a time stamp to the file name. Each time that the connection runs, it generates a new file with the time stamp in the file name.
    You can choose from the formats that are available, or enter your own time stamp format in ISO 8601 format.
  4. (Optional) Compress or replace files.

    Choose whether you want to replace the contents of the file when the connection runs, or if you want to append to the file contents. If you choose to replace the file contents, you can also compress the resulting file in zip or gzip format.

    If you configure the connection to add a time stamp to the file name, the Replace File option has no effect. The connection generates a new file with the time stamp in the file name each time that it runs.

Configure filters

(Optional) In the Configure Output > Filters section, you can specify filters to modify the data that you are getting from your connection source before it is sent to the destination.

For more information about the types of filters you can configure, see Reference: Filtering options.

Format data for file

You can choose to save your file in any of the available formats, as listed in Reference: Format types. Each format has slightly different configuration options, but all allow you to choose which column data to save.

In the Configure Output > Columns section, you can change the Destination Label of each column and Value Type to force the column to be a String, Numeric, or Date/Time value.

If you choose Numeric for the value, you can specify a default value that is used if the data cannot be coerced into a numeric value. You can specify any negative or positive number.

If you choose Date/Time for the value, specify the format that you want to use for the column. For more information about using a variable, see Time stamp variables.

For more information about column customizations, see Reference: Column customizations.

Schedule the connection

Connections can run at a highly configurable time interval, such as multiple times per hour, day, week, or month.

If you do not enable the schedule, the connection only runs when you manually run it, unless you configure an Event source. Connections with Event sources only run when a configured event is detected, and cannot be scheduled or manually run.

Use the Schedule section to update the schedule:

  • Select Enable schedule.
  • In the Schedule Type, select Basic to build a schedule with the provided controls.
  • To view or edit the Cron expression directly, select Advanced - Define as a Cron Expression, and use the Advanced field to edit the Cron expression.

If a user that owns a scheduled connection is deleted, future scheduled instances of that connection do not run. For more information, see Issue: Scheduled connection owned by a deleted user no longer runs.

For more information about Cron syntax, see Reference: Cron syntax.

Save and verify connection

  1. After you enter the details for the connection, click Save.

    To save the connection and immediately run the connection, click Run and Save.

    If needed, resolve any errors or missing information. After the connection creates successfully, the connection details display.

  2. To view details when the connection runs, click the Logs tab.
  3. To view an individual run log, expand the row table. For more information on resolving errors, see Troubleshooting.