-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for OPC-UA input and output plug-ins #3041
Comments
OPC-UA is the new standard, correct? There is also the older standard which was just OPC. A very common issue is that each OPC server is implemented a little different per vendor. |
Yes, OPC-UA is the "new" standard (formally IEC 62541 published between 2010 and 2012), and replaces the classical OPC which utilised Windows DCOM. OPC-UA allows non-Windows devices to communicate, which was not the case with the classical OPC. Good descriptions here: Free OPC test/simulations tools are available from Matrikon, including clients and servers: |
I would like to start an initiative for this. I will be starting with the node library as a base and attempting to translate it into Go. If anyone would like to help I will be storing my code here, |
Thanks for your efforts. Can I ask what you mean by the term “listener”? This sounds like telegraf would perform the role of server, and wait for a client to push data to telegraf. Generally industrial control systems would provide an OPC Server, so extracting data from them would be done by an OPC client sending queries for data for certain “tags”. A data historian collector like telegraf would normally perform the client role of regularly sending these queries to the server. |
To be honest, E&P companies are still using OPC DA/HDA protocol primarily, not the UA version, therefore it would be better to develop "legacy" windows only clients for telegraph to feed the database with data. I could start to develop this client but not sure if it would be useful for Linux oriented customers since it cannot be implemented without old DCOM+ bindings. |
While majority might be still using classic OPC, the new OPC UA standard is gaining traction more and more. Taking into account that development of the plugin will take some time, over that period the ratio will change more towards OPC UA. For that reason perhaps plugin should be for OPC UA. Classic OPC data sources can be accessed using existing in the market protocol converters, like OPC UA Proxy from Matrikon. |
Another alternative perhaps could be to build generic OPC UA adapter for SQL database, particularly PostgreSQL, for which there is already plugin. |
Another aspect is that OPC classic is based on Microsoft’s DCOM, so I believe telegraf could only realistically support it on Windows. OPC UA on the other hand does not rely on DCOM and works on any operating system. Yet another reason to focus on OPC UA. |
I believe that supporting OPC UA natively (not via a database middleman) should be a major priority for telegraf. This would effectively extend telegraf and influxdb from a purely IT monitoring historian, to a viable control system historian (OT). Control system historians is a BIG industry, and the competitors are largely older technology. There could be big demand for this. |
I would agree with the OPC-UA objective. There are lots of cases where having a low friction way to get industrial/manufacturing data into a time series database, would be valuable. One of the challenges would be coming up with a good way to map the data to the influx schema. |
Yes, it can be kind of enterprise historian. Concluding, the questions are: can OPC UA model and alarms/event be utilized in Influx ecosystem? If Chronograf could access them over generic API via some OPC UA plugin which connects directly to OPC UA servers to get model and events, and historian data via InfluxDB, perhaps that would be doable. |
The approach I have used is to use the tag set and field set to define these additional attributes. Keep in mind that most of the process historians (Pi, WW Historian) that I have dealt with don't consume all of this data from OPC-UA Either. That is why I made my comment about developing a good strategy in the telegraf connection on how the OPC-UA data would be mapped into influx's tagset and fieldset schema. |
I guess those historians are legacy and do not use all information provided by OPC UA Servers in full. |
We should keep this effort limited to identifying if data can be properly storred in InfluxDB. While many other products provide things like displays and alarming those pieces are typically provided as additional products and not features of the historian itself (ex. PI Notifications and Processbook.) As for the additional fields and data. Could we get away with serializing this data in something like a JSON format? And I’m sure there is a clever solution for deadband and compression |
I wasn't aware that there was a UI for telegraf. |
I was thinking a lot of the metadata like engineering units, description, devMin, devMax are defined at the “tag” level. So it does not need to be attached to each time series event. This would also reduce indexing overheard. |
Yes, but it is also possible for the tag configuration to change over time. |
The alarms and events portion of OPC UA is a separate component. This functionality does not need to be implemented in the first instance - it could be added later (or not at all). |
InfluxDB has the ability to store both regular and irregular (events) time-series data. So for alarms this information could be written to a separate measurement. An upstream process (i.e. Kapacitor) could scan this data and alert on the presence of an alarm. For the fluctuating units case a tag (pressure_units) could define what units the field value represents. |
In the TICK stack architecture (https://www.influxdata.com/time-series-platform/) Telegraf and Chronograf both interact with InfluxDB (the first collects data from various sources and writes it to the DB, and second reads data and visualizes it). For me it is hard to imagine how OPC UA model information can be propagated and used by visualization component. I don't see that Chronograf allows using of some custom data source, which can provide both data and model. If you look at Grafana, it provides API to add custom data sources. I guess you could add data source for OPC UA, which can provide all you need for visualization - real time data, historical data, alarms and event, and most importantly, information model. Note that the model could be used to create and configure dashboards, users do not need to enter settings like localized display name, description, display ranges, units, etc. I could lead such a project if there are interested parties. |
For OPC protocol, we are now using. The real-time data are sent to SCADA and to historian system. We use logger from OPC to sqlserver. Using open architecture solution it makes sense to integrate all required data to the monitor system. |
@woodsb02 @RavilN @gisfinder @dprice809 @BrentHumphreys thank you all for the great discussion here. I'm the product manager for both Telegraf and Chronograf and I agree with many of the points here. To summarize what I'm hearing:
We have created custom experiences in Chronograf based on specific plugins in Telegraf. See the syslog plugin as an example (the log viewer in Chronograf 1.6). I have limited knowledge of OPC UA, but on the surface it sounds like the https://github.com/coussej/node-opcua-logger might be a good model to mimic. Once the data is being written to InfluxDB, we can work on building custom experiences in Chronograf for something like this. |
Another use case for OPC UA is to provide a standardized API for historical (time series) data access. The standard defines historical data queries including aggregation. The DB would need to implement OPC UA server that exposes stored data using the OPC UA data model and supports historical data queries. OPC UA even has "methods" for RPC that can be used to expose custom API within the same secure communication model. |
I have built prototype application which can log data from OPC UA servers to PostgreSQL. Introduction video with context diagram is available here: [https://youtu.be/Gb56k0j-0Tc] |
I was just recommended this opcua implementation in Go. Might be easier or helpful for an input. https://github.com/wmnsk/gopcua |
has anyone in this thread taken a look at #4623 ? What do you think? |
It is a great idea to support both Modbus TCP and OPC UA - this will ensure Telegraf supports data collection from a large percentage of the devices in the industrial control system / operational technology landscape. |
Is there an emulator or something that we could test against. It seems a major blocker on this is the need for specialized hardware. Would something like https://www.matrikonopc.com/downloads/1361/index.aspx (Matrikon FLEX OPC UA SDK) be an effective simulation server to get started here? |
Is it possible to feed data from PostgreSQL? |
@glinton You can use KepserverEX as OPCUA simulation server from Kepware. |
There is a new extension of opcua published, called opc-ua pubsub. It is implementing a publisher subscriber logic and seems to be a quite universal solution. |
In this issues' opening post:
We developed https://github.com/factrylabs/influx-opcua-server to do just that. |
I invite you to try Notify, a software application specifically designed to collect data from SCADA systems (including OPC UA) and in addition to notifying alarms, allows registration in InfluxDB. |
Any news on this? Our company has got plenty of machines out in the field with OPC-UA and we're looking into building a test dashboard. This is what I'm currently using, but if telegraf could handle it that would be much better IMHO |
Hi Maarten, |
Any update on influxdb to opcua server? |
If someone is interested then we offer a cross-platform OPC UA server with the ability to present InfluxDB fields as OPC UA items and store data in InfluxDB (https://monokot.io) |
Hello, Visual Logger with support of InfluxDB has been released! Both version 1.7 and 2.0 are supported. There is Docker image available, as well as installation packages for Windows, Ubuntu and Debian. Major difference from other OPC UA to InfluxDB data moving solutions: high throughput and performance, and web based configuration GUI. In test setup throughput rate was around 100,000 values/second. Best Regards, Ravil |
I am very interested on it. Thanks to ogamma and @RavilN we are able to store data in PostgreSQL and influxDB and I would like to give public thanks to RavilN for his effort. From my point of view, the last and best functionality would be to convert OPC UA to Kafka or include OPC UA as telegraf input. |
Hi alexmc1510, |
Is there a reason this was removed from the 1.14.0 milestone? Has it been pushed to a later release? |
We have pushed this back to a yet to be determined future release. |
Thanks for the update. Can you share if this is a reflection of a reduced priority from the Telegraf team or lack of understanding of the protocol or implementation? |
@PWSys With Telegraf 1.14 targeted for release next month, we removed the OPC-UA plugin as a priority as we are focusing on a few other IoT input/output plugins that are currently actively being worked on. We understand the importance of OPC-UA and have designated some resources to begin developing an OPC-UA plugin for a future release. |
Thanks for the update @sjwang90. An OPC-UA plug-in is a requirement for my organization and customers to move over to a fully integrated TICK stack for Industrial Control System applications. |
Hello, I have the same opinion as @PWSys , OPC UA is a requirement for my organization. By the moment I am using a workaround but it would be good to have it into TICK stack system. |
Hello, I have the same opinion as @PWSys , @alexmc1510 OPC UA is a requirement for my organization too. By the moment I am using a workaround but it would be good to have it into TICK stack system. |
Grafana has an OPC-UA datasource plugin, it is currently being updated to work with Grafana 7. It is not currently published to the Grafana plugin directory, so it is hard to find. See https://github.com/srclosson/grafana-opcua-datasource |
Please don't advertise other solutions on this issue tracker, it's off topic. Let's keep any discussion focused on Telegraf support for OPC-UA. |
Sorry, I have deleted it now. |
as a control Engineer, I should say OPC-UA is designed to control the industrial process. but we need industrial data in a higher level of management in a management dashboard. who look at dashboard needs to see overall process performance, not details. |
I think opcua support for telegraf is here: #7213 https://github.com/influxdata/telegraf/tree/master/plugins/inputs/opcua |
OPC UA input plugin was merged last week and will be included in the 1.16 release. There's a PR #7195 for the OPC UA output plugin if anyone would like to review. I'll close this for now. I've opened another issue #8083 around an events base input plugin for OPC UA (new plugin polls OPC UA metrics) if anyone would like to a place for any discussion around there. |
Feature Request
The OPC-UA protocol is heavily used in the energy and utilities industries and was originally developed for SCADA systems. As companies try to update their metrics collection platforms to next generation time series databases like InfluxDB they'd like to tap into this established infrastructure based on OPC-UA.
There is an OPC-UA logger that was developed to insert data into InfluxDB but nothing for writing back out to OPC-UA:
https://github.com/coussej/node-opcua-logger
There are a number of open source projects that one might be able to tap into while developing such a plug in which are listed here:
https://github.com/open62541/open62541/wiki/List-of-Open-Source-OPC-UA-Implementations
Companies interested in these plug ins:
Proposal:
Current behavior:
Desired behavior:
Use case:
The text was updated successfully, but these errors were encountered: