Community Articles
Find and share helpful community-sourced technical articles.
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.
Labels (1)

Accessing data from industrial control devices can be made easier and safer by utilizing an OPC Server. OPC Servers provide protocol proxy services by translating requests for data from a standardized protocol like OPC to the native protocol of the industrial control device. Since the typical OPC Server can proxy many requests into many different protocols each for a different family of data sources they also make ideal aggregation points for control system data. Centralized data access also has advantages in security that should not be overlooked. The OPC Sever and Nifi can work together to provide certificate based authentication and role based data access to devices in process control networks. Nifi's unique pedigree is capable of complying with the stringent network ingress and regress rules.

Get started fast with Kepware and Apache Nifi

Out of the box tools available in KepServer Ex can make data available via HTTP and MQTT.

----|Kepware|---HTTP REST API-----|NIFI|



Data can also be acquired via OPC UA but this requires you to build the Nifi processor available at

First Get Kepware

Download and install a copy of Kepware's Kepserver on a Windows VM host. You can download the application at at The installation is straightforward but be sure to install select the optional IoT Gateway Plug-in.

Start KepServer Configuration from the Windows Start menu. After being started a unlicensed demo will run for 2 hours before “timing out”. Restarting the server will restore it.

Open the KepServerEX Configuration tool and select IoT Gateway

Right click on the default agent and select New IoT Item

Select Sin1 from the simulation functions and apply this tag. Selecting a scan rate and ok applies this tag configuration to this agent. From here you can export a CSV file that can be used for batch imports of IoT Item configurations

Again right click on the Agent but select Properties this time. On the Endpoint tab of the dialogue box you will find the port configuration and option to enable HTTPS. Here you can also find a test link for the server which will bring you to a docs page that explains the available queries and JSON response format

Now the data has been exposed over HTTP you may make REST requests to KepServer for data.

Configure Get HTTP processor

The URL is something of the form: http://YOUR.KEPSERVER.ADDRESS:39320/iotgateway/read?ids=Simulation%20Examples.Functions.Sine1

Review the acquired data in the data providence section of Nifi


the default JSON from Kepware puts [] around the inner document like this:

{"readResults":[{"id":"Simulation Examples.Functions.Sine1","s":true,"r":"","v":33.705616,"t":1462251936055}]}

Using MQTT or OPC UA is a very similar process requiring only changes in the Nifi processors used.


Don't have an account?
Version history
Last update:
‎04-26-2017 12:26 PM
Updated by:
Top Kudoed Authors