The tsd2InfluxDb Command Line Tool

The tool

tsd2InfluxDb.exe is a command line tool, located in the Silk Performer installation folder, that lets you export .tsd files and raw data files to either a database instance of InfluxDB directly or to a file, which can easily be imported into InfluxDB in a two-step approach.

The parameters

The tool accepts the following parameters:

Parameter name Parameter value
loadtestDir Full path to a load test directory.
exportTsds No value. Add this parameter to export .tsd files from the folder specified with the loadtestDir parameter.
exportRaw No value. Add this parameter to export raw data files from the folder specified with the loadtestDir parameter.
inputFile Full paths to selected input files, separated by a semicolon (;).
baseUrl URL of the InfluxDB instance. For example: https://myInfluxDB:8443/
Db Name of the database in InfluxDB.
Auth Authentication data in the format username:password
outputFile Full path to a text file receiving the measurements in Influx line protocol.
loadtestName Name of the load test. Used for the Loadtest tag.
customTags Custom tags in the format key1=value1; key2=value2;
Config Full path to a configuration file. Only applicable in command line parameters.
selectedMeasures Only available through the config file. Allows specifying exactly which measures are to be exported. The Copy to Clipboard button of the Tsd2InfluxDB tool helps you to generate the selectedMeasures node in your config file.

Working with config files

Note the following when working with config files:
  • The configuration file is an .xml file with base node InfluxDbParams.
  • The parameter names specified above are used as xml node names.
  • Use the Copy to Clipboard button of the Tsd2InfluxDB tool to get the configuration corresponding to the current dialog settings.
  • A configuration file cannot point to another configuration file. This means that the config parameter is only allowed in the command line.
  • You can specify some parameters in the command line and read the rest from a command file. If a parameter is set in both, the command line value has precedence over the value in the configuration file.

Examples

Export .tsd and raw data files from the specified load test to an output file and tag all measure points with tag Loadtest=MyDemoTest:

tsd2InfluxDb.exe
  -loadtestDir "D:/Users/myUser/Documents/Silk Performer 20.5/Projects/WebProject_2/MyDemoTest"
  -exportTsds
  -exportRaw
  -loadtestName MyDemoTest
  -outputFile "D:/myOutputFile.txt"

Export using a given config file:

tsd2InfluxDb.exe -config "D:/myInfluxConfigFile"

Example content of config file:

Export three selected measures from .tsd files and raw data files from a given load test directory to an InfluxDB database. Tag each measure point with a tag Loadtest=MyDemoTest.

<InfluxDbParams>
  <loadtestDir>D:/Users/myUser/Documents/Silk Performer 20.5/Projects/WebProject_2/MyDemoTest</loadtestDir>
  <exportTsds></exportTsds>
  <exportRaw></exportRaw>
  <loadtestName>MyDemoTest</loadtestName>
  <baseUrl>http://localhost:8086</baseUrl>
  <db>mydb</db>
  <auth>myUser:myPassword</auth>
  <selectedMeasures>
    <MeasuresCollection>
      <Measure type="8" name="TInit" />
      <Measure type="8" name="#Overall Response Time#" />
      <Measure type="8" name="TMain" />
    </MeasuresCollection>
  </selectedMeasures>
</InfluxDbParams>