1. Timebase Knowledge Base
  2. Data Collectors & Plugins

Configure the Collector and Create a Logging Session

Lets dive deep into the application and configuration settings of the Timebase Collector and create our first data logging session.

Configuring a Collector Session

Adjusting Data Collector Settings


 


 

Configuring a Collector Session

 

The Collector configuration file appconfig.json for Windows, or appconfig.Docker.json for Docker, contains the settings required to configure a Collector.

By default this file can be found within C:\Program Files\Flow Software\Timebase\Collector\ for Windows, or /config for Docker.

The configuration is structured as JSON and is done within the following main sections of the file.

{
"Historians": [
{
"Host": "localhost",
"Port": 4511,
"UseTls": false
}
],
 "Dataset": "The Juice Factory",
 "Active": true,
"Type": "Simulator",
"Settings":
{
Will vary based on the "Type"
}
}

The order of your file and file sections may vary from the example below depending on your Timebase version.

Historians

A Collector can send data to one or more Time Series Historians. This configuration allows for various redundant architectures to be implemented. The Historians property is an array of objects containing connection information.

In the example below, we have created a redundant session with two different historians.

{
"Historians": [
{
"Host": "HistorianHostnameOrIPAddress1",
"Port": 4511,
"UseTls": false
},
{
"Host": "HistorianHostnameOrIPAddress2",
"Port": 4511,
"UseTls": false
}
]

Properties include:

  • Host (string required): the hostname or IP address of the Historian to target.
  • Port (int): the port number of the Historian, default is 4511.
  • UseTls (bool): specifies whether to use TLS/SSL for secure communication with the broker, default value is false. Set to either true or false.

For the Beta version, TLS/SSL is not enabled, so set the UseTls property to false

Dataset

The Time Series Historian partitions its data into separate Datasets. This setting is the name of the Dataset to which this Collector will send data. Best practice is to map one Collector to one Dataset. If the Dataset does not exist in the Historian, it will be created.

The Dataset name should not use any of the following characters:

,  /  \  ` :  ;  ~  *  ?  !  |  '  "  <  >  (  )  {  }  [  ]  @  #  %  $  ^  &  null

"Dataset": "MQTT Data"

Active

Determines whether or not the Collector is active. Set to either true or false

"Active": true

Type

Collectors make use of "plugins" to connect to and process data to send to the Time Series Historians. This property specifies the type of plugin to be used by the Collector. By default, this value is set to the Simulator type.

"Type": "Simulator"

Settings

This property contains a number of settings specific to the plugin Type. See the following links for details of each plugin Type's setting:

 


 

Adjusting Data Collector Settings

 

The Timebase Collector uses settings stored in a file called appsettings.json to start up and initialize the Collector.

  • Open Windows File Explorer and navigate to the installation directory for the Data Collector. The default is C:\Program Files\Flow Software\Timebase\Collector\.
  • Within the Collector folder, open the file appsettings.json. Your file should look similar to the snippet below. 

 

{
  "DetailedErrors": true,
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning",
      "Timebase.Historian.*": "Debug"
    }
  },
  "Kestrel": {
    "Endpoints": {
      "Http": {
        "Url": "http://0.0.0.0:4521"
      }
    }
  },
  "Config": ".\\",
"Plugins": "..\\Plugins",
"SF": "C:\\Timebase\\Collector\\SF"
}

 

Each of the below section settings should be adjusted as necessary based on your environment.

 

Section: Detailed Errors

Enables detailed error messages during the operation of the Data Collector.

  "DetailedErrors": true,
  • Either true or false. If set to true, this option will provide more verbose error messages in the logs, which can help in troubleshooting issues during the Data Collector's operation.

 

Section: Logging Configuration

Configures logging levels for different components of the Data Collector.

"Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning",
      "Timebase.Historian.*": "Debug"
    }
},
  • LogLevel: Specifies the level of detail for logs for various components.
    • "Default": "Information": Logs informational messages, warnings, and errors, but not Debug messages by default.
    • "Microsoft.AspNetCore": "Warning": Limits logging from Microsoft's ASP.NET Core components to only warnings and errors, reducing unnecessary log noise.
    • "Timebase.Historian.*": "Debug": Enables detailed Debug logging for all components related to the Timebase Historian. This is helpful for developers or advanced users who need to monitor or troubleshoot the Historian's processes at a granular level.

 

Section: Kestrel

Configures how the Data Collector's web server (Kestrel) listens for HTTP requests.

"Kestrel": {
    "Endpoints": {
      "Http": {
        "Url": "http://0.0.0.0:4521"
      }
    }
  },
  • Endpoints: Defines where the application will listen for HTTP requests.
    • "Http": { "Url": "http://0.0.0.0:4521" }: This means that the web server will listen for HTTP requests on all network interfaces (0.0.0.0) on port 4521. This makes the application accessible from any IP address.

     

    Section: Config

    Stores the location for the config file.

    "Config": ".\\"

     

    Section: Plugins

    Specifies the directory where the Data Collector's plugins are stored.
    "Plugins": "..\\Plugins"
    • This setting points to a folder one level up ("..\\") from the current directory where the appsettings.json file is located and looks for a folder named Plugins. Plugins are extensions or modules that can enhance the functionality of the Data Collector, such as supporting additional data sources or processing methods.

     

    Section: SF

    Location to persist the Store andForward buffer to disk.

    "SF": "C:\\Timebase\\Collector\\SF"