No description
Find a file
2025-05-05 23:06:44 +02:00
.gitignore Initial commit 2025-05-05 21:26:26 +02:00
base_telegraf.conf.toml Initial commit 2025-05-05 21:26:26 +02:00
go.mod Initial commit 2025-05-05 21:26:26 +02:00
go.sum Initial commit 2025-05-05 21:26:26 +02:00
main.go Generate CSV docs, tag non-room PLCs with "plc" instead of "room" 2025-05-05 23:06:44 +02:00
nodes.csv Generate CSV docs, tag non-room PLCs with "plc" instead of "room" 2025-05-05 23:06:44 +02:00
README.md Generate CSV docs, tag non-room PLCs with "plc" instead of "room" 2025-05-05 23:06:44 +02:00

kepware-opc-telegraf

Generate a Telegraf config file to ingest OPC-UA data based on a KEPServerEX project file.

The generated config includes two inputs, one based on opcua_listener (event-based, instant updates, no initial values or periodic polling) and one based on opcua (polling-based, slow, but provides initial values and outputs a value at least every interval).

It also generates a CSV with a list of all the different data points and their descriptions: ./nodes.csv

Inputs

  • kepware_export.xml - list of OPC nodes from KEPServerEX (see below)
  • base_telegraf.conf.toml - base Telegraf conf (should contain at least one of inputs.opcua or inputs.opcua_listener)
  • generated_telegraf.conf.toml - path where to save the generated Telegraf conf
  • nodes.csv - path where to save a CSV with a list of nodes and descriptions

Getting the project file

Open KEPServerEX, go to File > Save as > select XML in the file type dropdown. Save it as kepware_export.xml.

Base Telegraf configuration

You'll need to configure the base Telegraf config according to your setup. This probably means changing at least outputs.influxdb_v2.{urls,organization,bucket,token}.

You will also need to set your OPC-UA connection parameters in both of the input config blocks. If you want to disable one of the inputs, remove or comment out the entire block.

Running the converter

If you're running from source, build it first:

go build

Once you have the executable:

./kepware-opc-telegraf -csv_out nodes.csv -telegraf_template ./base_telegraf.conf.toml -telegraf_out ./generated_telegraf.conf.toml ./kepware_export.xml