Configuring file destinations

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

Configure the file destination

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.
    • Create a new destination: Specify a unique name to save the configuration information as a new destination. Select New and then enter a Destination Name

    • Copy an existing destination: Select New, and then click Copy Settings. Select a destination, click Apply, and update the Destination Name.

    • Reuse an existing destination: Select Existing, and then select a Destination Name.

      Note: Configure a unique destination per connection. If you edit the settings for a shared destination for one connection, any other connections that use the shared destination are affected, and connection runs might fail.
    Example Connect configuration for a file destination
  2. Enter the file name with extension, or use a variable as listed in Reference: Variables. 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 Configure solution module file share mounts. 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:

      CODE
      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.

  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) Replace or compress files, or remove empty 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. You can also choose whether to create an empty file if the connection run generates no results and no file exists, based on the following configuration:

    • In all cases, create a new file if none exists and the connection run generated results.

    • If you clear Replace File, append to the existing file if the connection run generated results, or do nothing to the existing file if the connection run generated no results.

    • If you select Replace File and clear Skip If Empty, overwrite the existing file if the connection run generated results, or delete the existing file if the connection run generated no results.

    • If you select Replace File and select Skip If Empty, do nothing to the existing file, whether the connection run generated results or generated no results.

    Note: 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.

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.