0

How to Configure the CSV Collector (version 23)

There are two files that need created/configured upon installing the CSV Collector:

  • SAF_ImportService.config
  • SAF_Import.config

SAF_ImportService.config

By default, the service config file is located in C:\Program Files\Canary\Collectors\CSV. Below is an example of how it is configured where

  • Interval = (seconds) how often the service checks the input directory for new CSV files to process
  • InputDirectory = the filepath of the directory the service will monitor for CSV files. (*Multiple input directories can be listed.)
<Settings>
    <Interval>10</Interval>
    <InputDirectory>C:\CSV Import</InputDirectory>
</Settings>

SAF_Import.config

The 'SAF_Import.config' will need to be created and must reside in every directory specified in the InputDirectory parameter from above. This config tells the service how to interpret the CSV files that will be placed in the directory to be processed. As CSV files can vary with different formats, there are over 30 parameters to choose from to match the file's particular structure. (See Canary CSV Collector Configuration.pdf above for these parameters. This PDF is also located in the install directory, C:\Program Files\Canary\Collectors\CSV.) Once a file is dropped into the specified directory, the service will attempt to read and log the data into the historian.

<Settings>
    <InputDelimiter>,</InputDelimiter>
    <HeaderCount>0</HeaderCount>
    <Historian>localhost</Historian>
    <DataSet>Demo</DataSet>
    <TagNameOffset>0</TagNameOffset>
    <TimestampOffset>1</TimestampOffset>
    <ValueOffset>2</ValueOffset>
    <QualityOffset>3</QualityOffset>
    <KeepProcessedFiles>True</KeepProcessedFiles>
    <ProcessedDirectory>C:\CSV Import\Processed</ProcessedDirectory>
    <AutoCreateDataSet>True</AutoCreateDataSet>
    <AllowInsertedData>True</AllowInsertedData>
</Settings>

 

If any modifications are made to either one of these files, the service will need restarted to pick up the changes.

4 replies

null
    • mattias_herrfurth
    • 9 days ago
    • Reported - view

    What is the protocol used for CSV collection from a network drive?

      • smason
      • 8 days ago
      • Reported - view

      Hi ,

      The CSV Collector service runs under the local system account. That account may not have permission to access the network drive. You could try running the CSV Collector on a service account that would have permission or have a job that would copy the files from the drive to a local directory on the server.

      • mattias_herrfurth
      • 8 days ago
      • Reported - view

       thanks for the info. I am wondering what network protocol the CSV Collector uses so that we can submit firewall rules allowing for connections to network drives.

      • smason
      • 8 days ago
      • Reported - view

      According to development, there isn't a protocol, it's just the operating system that would try to read the files from the network drive. In that case, you would need to make sure that the account on which the service runs would have permission to read and process files from the network drive. You would most likely need to use a UNC path to specify the location within InputDirectory parameter. I'm not aware of anyone trying to do this, so I can't say for certain it will work. Typically, the files are local to the CSV Collector.