GithubHelp home page GithubHelp logo

grafana / opcua-datasource Goto Github PK

View Code? Open in Web Editor NEW
53.0 132.0 11.0 67.12 MB

An OPC UA datasource for reading from OPC UA servers (DA/HDA/AE) into Grafana directly

License: GNU Affero General Public License v3.0

JavaScript 0.34% Makefile 0.11% TypeScript 10.54% CSS 52.10% C# 35.54% Shell 0.36% Less 0.93% Dockerfile 0.06% MDX 0.02%
opc-ua grafana-opcua-datasource datasource

opcua-datasource's Introduction

OPC UA Datasource plugin for Grafana

STATUS

Caution

This plugin is now deprecated. This deprecation means that this plugin won't receive any feature updates or bug fixes except critical security fixes. After 6 months (End of June 2024), the plugin will reach EOL and there won't be any fixes afterwards. Existing installations of the plugin will continue to work. Reach out to Grafana Community Forum if you need any further assistance on this plugin.

Introduction

Utilizing the datasource plugin framework, this projects allows you to access data from OPC UA servers directly from Grafana.

full dashboard

What works

  • Browsing and adding multiple servers
  • Authenticated connection with certificate or no security
  • Graphical query editor
  • Data Access (DA)
  • Historical Access (HA / HDA)
  • Alarms & Conditions (AC / AE)

What needs to be implemented

  • OPCUA DA Subscriptions: These are the ones where you will not need to hit the refresh button. If you have subscribed to a data point at 500ms, you will get an unsolicited update every 500ms.
  • Password authentication
  • Two-way communication with the OPC UA server (currently read only)

Description and Architecture

This plugin uses GRPC and a C# backend to communicate with Grafana directly. See pkg/dotnet directory for the backend component

Building

  • yarn install to install dependencies
  • yarn build | yarn dev to build the plugin
  • make build to build the backend component

Restart Grafana and you should have the datasource installed.

Contributing

Contributions that addresses the needs above or other feature you'd like to see are most welcome. Fork the project and commit a PR with your requests.

Prediktor is a proud contributor Open Software like this project and open standards like OPC UA fits perfectly with our quest to give our clients the freedom to operate. To know more about our offerings and get in touch, check out https://prediktor.com.

Q&A

Q: Can it read OPC Classic DA/HDA/AE?

A: Yes, provided use use the OPC Foundations COMIOP wrapper, which you can find here. You will need to configure IOP to wrap your OPC COM server. Tested against Matrikon OPC Desktop Historian and Matrikon OPC Simulation Server.

opcua-datasource's People

Contributors

alydersen avatar cfjeld avatar dependabot[bot] avatar harvidsen avatar ryantxu avatar sleiban avatar srclosson avatar yesoreyeram avatar zoltanbedi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opcua-datasource's Issues

Rewrite middle layer for OPC UA

Grafana plugins are traditionally written in GoLang. However, OPC UA does not have a rich library in this respect. There is a rich SDK for working with GO plugins. Unfortunately, not a great one for .NET.

As standards evolve, it makes keeping up with OPC/UA even more difficult.

A new branch has been started here: https://github.com/grafana/opcua-datasource/tree/src/redesign-grpc

The idea is this:

Rather than have:

Grafana -> Grafana Backend (GO) -> GRPC -> .NET Backend -> OPC

The idea would be:

Grafana -> Grafana Backend (GO) -> GRPC -> Go Backend using grpc-plugin-sdk-go -> GRPC -> .NET Backend -> OPC

Inserting the grafana plugins sdk for GO in, ensures that the serialization and deserialization of Apache Arrow packets always follows the proper and latest version.

This allows the OPCUA plugin to write a more specific, and simple .NET backend that focuses only on OPC.

install question

Hi Thank you for your toolkit,

But after I run follow your installation guide and restart my grafana
yarn install to install dependencies yarn build | yarn dev to build the plugin make build to build the backend component
I didn't see any new datasouce plugin in? (will it plugin automatically or should I manually add some plugin in to grafana?)
my grafana version is V7.1.0

Documentation ?

I have connected the plugin to my opcua server but I can't get the data back. Is it possible to have a documentation or examples. on this plugin?

Failed to start plugin - gpx_opcua_windows_amd64.exe : file does not exist

While trying to get the plugin up and running i encounter the following error entry in the grafana.log (located in ..\grafana\data\log)

  • t=2020-08-15T14:56:29+0200 lvl=warn msg="Running an unsigned backend plugin" logger=plugins pluginID=grafana-opcua-datasource pluginDir="C:\Program Files\GrafanaLabs\grafana\data\plugins\grafana-opcua-datasource\dist"
  • t=2020-08-15T14:56:29+0200 lvl=info msg="Registering plugin" logger=plugins name="OPC UA (Unified Architecture)"
  • t=2020-08-15T14:56:30+0200 lvl=info msg="Registering plugin" logger=plugins name=Redis
  • t=2020-08-15T14:56:30+0200 lvl=eror msg="Failed to start plugin" logger=plugins.backend pluginId=grafana-opcua-datasource error="exec: "C:\\Program Files\\GrafanaLabs\\grafana\\data\\plugins\\grafana-opcua-datasource\\dist/gpx_opcua_windows_amd64.exe": file does not exist"
  • t=2020-08-15T14:56:30+0200 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUrl= socket=
  • t=2020-08-15T14:56:44+0200 lvl=eror msg="Plugin health check failed" logger=context userId=1 orgId=1 uname=admin error="Failed to check plugin health: Health check failed" remote_addr=[::1]
  • t=2020-08-15T14:56:44+0200 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/2/health status=500 remote_addr=[::1] time_ms=27 size=40 referer=http://localhost:3000/datasources/edit/2/

I see a reference in the following file ..\grafana\data\plugins\grafana-opcua-datasource\pkg\dotnet\plugin-dotnet.win.build.csproj but also a comment regarding the issue of the missing file.

<PropertyGroup> <!-- https://github.com/grpc/grpc/blob/master/src/csharp/BUILD-INTEGRATION.md#**i-am-getting-a-warning-about-a-missing-expected-file** --> <Protobuf_NoWarnMissingExpected>true</Protobuf_NoWarnMissingExpected> <AssemblyName>gpx_opcua_darwin_amd64</AssemblyName> </PropertyGroup>

Are you also seeing this log entry in your grafana.log? At the moment I cannot connect to my OPC UA Server, when using UAExpert Client the server is available and I can read data from it.

v1.3.6 not available in grafana plugins

I can't seem to be able to install v1.3.6 from inside grafana. It says v1.2.2 is the latest version. The URL field doesn't work on v1.2.2 which was fixed in v1.3.6. I really love to use the plugin!

Add unit tests

The plugin needs appropriate unit tests written for both the frontend and the backend.

dotnet, C#, DA/HDA/AE, ....

Nice project, but I do think it goes into a wrong way. The OPC UA will supersede all DA,...older OPC variants, since the were DCOM based, Windows,...OPC UA is the new technology of OPC and it shall be implemented in language that is cross-platform. By using dotnet and C# this project will never see a bright light, because OPC UA was born to eliminate this Windows dependency .
There are some nice projects that you can switch to:

https://open62541.org/

https://github.com/gopcua/opcua

Modified signature

Hi,
after installing the plugin and restarting Grafana I get the message "Modified signature".
Windows 10, Grafana v8.2.5 (b57a137acd)
How can i fix this?
Cheers

"Plugin health check failed" after Grafana restart

Hello,

I successfully installed the plugin today. I got no errors in the grafana.log file and try to configure the OPC-UA connection. I restarted the Grafana server because I could not connect to my OPC UA Server (due to wrong Opc UA settings). After the restart, Grafana outputs "Plugin health check failed" every time I press "Save & Test". Here is corresponding the grafana.log:

t=2020-09-21T15:04:59+0200 lvl=info msg="Starting Grafana" logger=server version=7.1.5 commit=9893b8c53d branch=HEAD compiled=2020-08-25T10:27:17+0200 t=2020-09-21T15:04:59+0200 lvl=info msg="Config loaded from" logger=settings file="C:\\Program Files\\GrafanaLabs\\grafana/conf/defaults.ini" t=2020-09-21T15:04:59+0200 lvl=info msg="Config loaded from" logger=settings file="C:\\Program Files\\GrafanaLabs\\grafana\\conf\\custom.ini" t=2020-09-21T15:04:59+0200 lvl=info msg="Path Home" logger=settings path="C:\\Program Files\\GrafanaLabs\\grafana" t=2020-09-21T15:04:59+0200 lvl=info msg="Path Data" logger=settings path="C:\\Program Files\\GrafanaLabs\\grafana\\data" t=2020-09-21T15:04:59+0200 lvl=info msg="Path Logs" logger=settings path="C:\\Program Files\\GrafanaLabs\\grafana\\data\\log" t=2020-09-21T15:04:59+0200 lvl=info msg="Path Plugins" logger=settings path="C:\\Program Files\\GrafanaLabs\\grafana\\data\\plugins" t=2020-09-21T15:04:59+0200 lvl=info msg="Path Provisioning" logger=settings path="C:\\Program Files\\GrafanaLabs\\grafana\\conf\\provisioning" t=2020-09-21T15:04:59+0200 lvl=info msg="App mode production" logger=settings t=2020-09-21T15:04:59+0200 lvl=info msg="Connecting to DB" logger=sqlstore dbtype=sqlite3 t=2020-09-21T15:04:59+0200 lvl=info msg="Starting DB migration" logger=migrator t=2020-09-21T15:04:59+0200 lvl=info msg="Starting plugin search" logger=plugins t=2020-09-21T15:04:59+0200 lvl=info msg="Registering plugin" logger=plugins name="Direct Input" t=2020-09-21T15:04:59+0200 lvl=warn msg="Running an unsigned backend plugin" logger=plugins pluginID=grafana-opcua-datasource pluginDir="C:\\Program Files\\GrafanaLabs\\grafana\\data\\plugins\\grafana-opcua-datasource-master\\dist" t=2020-09-21T15:04:59+0200 lvl=info msg="Registering plugin" logger=plugins name="OPC UA (Unified Architecture)" t=2020-09-21T15:04:59+0200 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUrl= socket= t=2020-09-21T15:05:12+0200 lvl=eror msg="Plugin health check failed" logger=context userId=1 orgId=1 uname=admin error="Failed to check plugin health: Health check failed" remote_addr=[::1] t=2020-09-21T15:05:12+0200 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/10/health status=500 remote_addr=[::1] time_ms=496 size=40 referer=http://localhost:3000/datasources/edit/10/

If you need any additional information just contact me.
Many thanks in advance and have a nice day!

Tom

After update to 1.3.7/1.3.8, "Plugin unavailable" error message

Hi!

After updating to 1.3.7, the server address is now editable again. However, we now receive a "Plugin unavailable" error message.

Might this be due to a broken gpx_opcua_linux_amd64? If I run this executable it fails with the following error message:

# /var/lib/grafana/plugins/grafana-opcua-datasource/gpx_opcua_linux_amd64 
The application to execute does not exist: '/var/lib/grafana/plugins/grafana-opcua-datasource/gpx_opcua_linux_amd64.dll'.

We use Grafana 9.2.0.

Thanks in advance.

cc: @zenker

Large signal lists overflow out of screen

Hello! We are using this plugin more and more, so I though I'd submit some "nice to have" UI enhancements.

When browsing large signal lists the box goes out of the screen like so
Screenshot from 2022-05-31 13-23-03

A nice UI improvement would be to have the browsing box utilize the space better in order to minimize scrolling. Perhaps it can simply start higher up on the screen, or try to align its bottom edge with the bottom of the screen as it is usually a lot of space higher up where the panel plot is.

Plugin Unavailable Error

Installed the OPCUA Plug in for Grafana and added a new datasource. But I get a plugin unavailable error.

Server address is correct for sure and there is no authentication enabled on it.

ApplicationCertificate?

I want to connect to a secured OPC Server "without" auth, but I'm unable to connect because of "Opc.Ua.ServiceResultException: ApplicationCertificate must be specified."

I've tried something, like "with CA Cert" or "Skip TLS Verify" ... nothing works. :(

When I enable "TLS Client Auth" with certificates it shows "Endpoint does not support the user identity type provided."

With OPC Expert I'm able to login without problems.

Plugin Unavailable

Hello,

Using a fresh docker container of Grafana v8.2.5 (b57a137acd)
and the latest version available of this plugin (1.1.4) i get plugin unavailable errors.

These are some logs i get:

t=2021-11-22T14:38:43+0000 lvl=warn msg="plugin failed to exit gracefully" logger=plugins.backend pluginId=grafana-opcua-datasource
t=2021-11-22T14:38:45+0000 lvl=eror msg="Failed to start plugin" logger=plugins.backend pluginId=grafana-opcua-datasource error="Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol."
t=2021-11-22T14:38:45+0000 lvl=info msg="Registering plugin" logger=plugins id=grafana-opcua-datasource
t=2021-11-22T14:46:41+0000 lvl=warn msg="plugin failed to exit gracefully" logger=plugins.backend pluginId=grafana-opcua-datasource

Screenshot:
image

The OPC-UA server is currently running with no issues using other clients

Reading a long history does not work

When reading long histories from a server it usually sends a bunch of data including a continuation point. The client needs to issue another ReadHistoryRequest that includes the continuation point of the last ReadHistoryResponse.

I investigated wireshark traces:
The first ReadHistoryRequest by the client does not include a continuation points, which is correct.
The second ReadHistoryRequest includes the continuation point of the first ReadHistoryResponse, which is correct too.
However the third ReadHistoryRequest includes again the continuation point of the first ReadHistoryResponse. So the server sends again the second ReadHistoryResponse. This goes on and on until some timeout by grafana is reached.

I think this is a bug in the prediktor client implementation.

Just to be sure that this is a client issue I read the history using a different client (UAExpert by UnifiedAutomation) - here everything works.

As a workaround I increased the maximum number of data points per ReadHistoryRequest on the server side.

The plugin version used in the test: 1.1.6

OPC UA Client - TimeStamp Handling (server time or source time) for Historic Data Raw Read

Hello @srclosson

found one issue regarding the TimeStamp Handling for Historic Data Raw Read.
It looks like that the plugin queries historic raw data including "Server Time" and not "Source Time".
In my case our used OPC UA Server only responds to historic (HA) raw data read if the client uses "Source Time".

This leads to an error "BadTimeStampNotSupported" at the Grafana Query:

The client requested history using a timestamp format the server does not support.
(i.e requested ServerTimestamp when server only supports SourceTimestamp).

BadTimeStampNotSupported

In other OPC UA Clients this could be changed by config, example "Ua Expert":

HA_Read_working_Ua_Expert

So my question, is it possible to quickfix this behaviour by config or do you have to rebuild the plugin ?

Support using variables

It seems like it's not possible to use variables as a part of the Instance input. This would be a great feature as it would allow for more possibilities with template panels. If I try to input

${my-top-node-variable}.SOME.RDS.CODE

in the Instance field, the field becomes empty when i press enter. It seems like the input string does not evaluate. Is this something that can be supported?

Plugin Error - Try to explore OPC Server

Hi ,

I am able to conect to an local OPC server , from Grafana , but not able to explore items from server.
The following error it is received after selecting instance.

`Opc.Ua.ServiceResultException: BadServiceUnsupported at Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header) at Opc.Ua.SessionClient.HistoryRead(RequestHeader requestHeader, ExtensionObject historyReadDetails, TimestampsToReturn timestampsToReturn, Boolean releaseContinuationPoints, HistoryReadValueIdCollection nodesToRead, HistoryReadResultCollection& results, DiagnosticInfoCollection& diagnosticInfos) at Prediktor.UA.Client.SessionExtensions.ReadHistoryRaw(Session session, DateTime startTime, DateTime endTime, Int32 numValues, NodeId[] nodeIds, Boolean returnBounds) at plugin_dotnet.DataService.ReadHistoryRaw(Session session, OpcUAQuery[] queries, NamespaceTable namespaceTable) in /drone/src/backend/DataService.cs:line 200 at plugin_dotnet.DataService.QueryData(QueryDataRequest request, ServerCallContext context) in /drone/src/backend/DataService.cs:line 363```

Which can be the reason for receiving this error.

Thank.
Regards.

Subscription support

Hello,
i saw that you are planning to support UA Subscription.
Can tell us more about ?
Mainly, what is your roadmap ?
Regards
Michel

Missing signature

I just installed the plugin, but my grafana 7.5.10 says: grafana-opcua-datasource - Missing signature

how can i use the datasource regardless to this message?

Release for Grafana v9.0.2 linux-arm

Is it planned to release the plugin for Grafana V9 on linux-arm? I would have an exciting use-case with a Kunbus RevPi device.
(actually grafana-opcua-datasource v is not supported on your system (Grafana v9.0.2 linux-arm))

Thanks a lot!

Redundancy support

It would be nice to be able to connect the data source plugin to a redundant set of OPC UA servers
so that Grafana retrieves data from the server node exposing the highest service level and automatically connects to an alternative node if the service level of the existing node goes below 200. (See OPC UA spec).

We (Prediktor) will look into this, but wanted to registerer the issue/feature request

Build failed

PS E:\nodeJsLearing\grafana-opcua-datasource> yarn build yarn run v1.22.10
$ grafana-toolkit plugin:build && make
√ Preparing
√ Linting
PASS src/module.test.ts
placeholder test
√ should return true (2ms)

Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 2.54s
Ran all test suites with tests matching "".
√ Running tests
\ Compiling... Starting type checking service...
Using 1 worker with 2048MB memory limit
/ Compiling... ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/components/TreeEditor.tsx(18,31):
TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'.
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts(7,44):
TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'.
The types returned by 'query(...)' are incompatible between these types.
Type 'Observable' is not assignable to type 'Promise | Observable'.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Observable").Observable<import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts(8,20):
TS2345: Argument of type 'typeof ConfigEditor' is not assignable to parameter of type 'ComponentType<DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>>'.
Type 'typeof ConfigEditor' is not assignable to type 'ComponentClass<DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>, any>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>' is not assignable to type 'Props | Readonly'.
Type 'DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>' is not assignable to type 'Readonly'.
Types of property 'options' are incompatible.
Type 'DataSourceSettings<OpcUaDataSourceOptions, unknown>' is not assignable to type 'DataSourceSettings<OpcUaDataSourceOptions, {}>'.
Type 'unknown' is not assignable to type '{}'.
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/QueryEditor.tsx(21,31):
TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'.
The types returned by 'query(...)' are incompatible between these types.
Type 'Observable' is not assignable to type 'Promise | Observable'.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Observable").Observable<import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.
The types of 'source.operator.call' are incompatible between these types.
Type '(subscriber: import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Subscriber").Subscriber, source: any) => import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber, source: any) => import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/types").TeardownLogic'.
Types of parameters 'subscriber' and 'subscriber' are incompatible.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Subscriber").Subscriber'.
Property 'isStopped' is protected but type 'Subscriber' is not a class derived from 'Subscriber'.

Hash: b0e80cf97d0082983700
Version: webpack 4.41.5
Time: 17532ms
Built at: 2021-02-03 10:02:13 ├F10: AM┤
Asset Size Chunks Chunk Names
CHANGELOG.md 193 bytes [emitted]
LICENSE 11.3 KiB [emitted]
README.md 2.42 KiB [emitted]
img/dashboard1.png 189 KiB [emitted]
img/dashboard2.png 907 KiB [emitted] [big]
img/logo.svg 876 bytes [emitted]
img/opc_logo.png 63.1 KiB [emitted]
module.js 152 KiB 0 [emitted] module
module.js.LICENSE.txt 1.31 KiB [emitted]
module.js.map 677 KiB 0 [emitted] [dev] module
plugin.json 1.02 KiB [emitted]
Entrypoint module = module.js module.js.map
[0] external "react" 42 bytes {0} [built]
[1] external "@grafana/ui" 42 bytes {0} [built]
[11] external "emotion" 42 bytes {0} [built]
[13] external "@grafana/data" 42 bytes {0} [built]
[14] external "@grafana/runtime" 42 bytes {0} [built]
[21] ../node_modules/@material-ui/core/esm/TableBody/index.js 38 bytes [built]
[22] ../node_modules/@material-ui/core/esm/TableCell/index.js 38 bytes [built]
[23] ../node_modules/@material-ui/core/esm/TableRow/index.js 37 bytes [built]
[24] ../node_modules/@material-ui/core/esm/Table/index.js 34 bytes [built]
[25] ../node_modules/@material-ui/core/esm/index.js 10.3 KiB [built]
[32] ./module.ts + 130 modules 387 KiB {0} [built]
| ./module.ts 296 bytes [built]
| ./DataSource.ts 661 bytes [built]
| ./ConfigEditor.tsx 820 bytes [built]
| ./QueryEditor.tsx 17.2 KiB [built]
| ../node_modules/tslib/tslib.es6.js 10 KiB [built]
| ./components/ButtonCascader/ButtonCascader.tsx 1.47 KiB [built]
| ./types.ts 1.7 KiB [built]
| ./components/SegmentFrame.tsx 1 KiB [built]
| ./components/EventFieldTable.tsx 2.81 KiB [built]
| ./components/AddEventFieldForm.tsx 1.9 KiB [built]
| ./components/EventFilterTable.tsx 3.46 KiB [built]
| ./components/AddEventFilter.tsx 3.49 KiB [built]
| ../node_modules/rc-cascader/es/index.js 59 bytes [built]
| ../node_modules/rc-cascader/es/Cascader.js 16.1 KiB [built]
| ../node_modules/@material-ui/core/esm/Table/Table.js 3.1 KiB [built]
| + 116 hidden modules
[33] ../node_modules/@material-ui/core/esm/TableHead/index.js 38 bytes [built]
[46] ../node_modules/@material-ui/core/esm/AccordionActions/index.js 45 bytes [built]
[48] ../node_modules/@material-ui/core/esm/AccordionDetails/index.js 45 bytes [built]
[50] ../node_modules/@material-ui/core/esm/AccordionSummary/index.js 45 bytes [built]
+ 392 hidden modules

ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/components/TreeEditor.tsx
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/components/TreeEditor.tsx(18,31):
TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'.

ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts(7,44):
TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'.
The types returned by 'query(...)' are incompatible between these types.
Type 'Observable' is not assignable to type 'Promise | Observable'.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Observable").Observable<import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.

ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/module.ts(8,20):
TS2345: Argument of type 'typeof ConfigEditor' is not assignable to parameter of type 'ComponentType<DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>>'.
Type 'typeof ConfigEditor' is not assignable to type 'ComponentClass<DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>, any>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>' is not assignable to type 'Props | Readonly'.
Type 'DataSourcePluginOptionsEditorProps<OpcUaDataSourceOptions, unknown>' is not assignable to type 'Readonly'.
Types of property 'options' are incompatible.
Type 'DataSourceSettings<OpcUaDataSourceOptions, unknown>' is not assignable to type 'DataSourceSettings<OpcUaDataSourceOptions, {}>'.
Type 'unknown' is not assignable to type '{}'.

ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/QueryEditor.tsx
ERROR in E:/nodeJsLearing/grafana-opcua-datasource/src/QueryEditor.tsx(21,31):
TS2344: Type 'DataSource' does not satisfy the constraint 'DataSourceApi<OpcUaQuery, OpcUaDataSourceOptions>'.
The types returned by 'query(...)' are incompatible between these types.
Type 'Observable' is not assignable to type 'Promise | Observable'.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Observable").Observable<import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse>' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Observable").Observable<import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/types/datasource").DataQueryResponse>'.
The types of 'source.operator.call' are incompatible between these types.
Type '(subscriber: import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Subscriber").Subscriber, source: any) => import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber, source: any) => import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/types").TeardownLogic'.
Types of parameters 'subscriber' and 'subscriber' are incompatible.
Type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/@grafana/data/node_modules/rxjs/internal/Subscriber").Subscriber' is not assignable to type 'import("E:/nodeJsLearing/grafana-opcua-datasource/node_modules/rxjs/internal/Subscriber").Subscriber'.
Property 'isStopped' is protected but type 'Subscriber' is not a class derived from 'Subscriber'.

Trace: Build failed
at E:\nodeJsLearing\grafana-opcua-datasource\node_modules@grafana\src\cli\utils\useSpinner.ts:10:13
at step (E:\nodeJsLearing\grafana-opcua-datasource\node_modules@grafana\toolkit\node_modules\tslib\tslib.js:140:27)
at Object.throw (E:\nodeJsLearing\grafana-opcua-datasource\node_modules@grafana\toolkit\node_modules\tslib\tslib.js:121:57)
at rejected (E:\nodeJsLearing\grafana-opcua-datasource\node_modules@grafana\toolkit\node_modules\tslib\tslib.js:112:69)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
× Build failed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

[Makefile:21: build] Error 127

Compiling the backend results to the following error:
make: dotnet: No such file or directory
make: *** [Makefile:21: build] Error 127

Plugin Health Check Failed under Windows

I have Grafana running as a Windows Service.

Under Plugins i installed the OPC UA adapter how ever when i load a datasource i get a "Plugin Health Check Failed"

And i have no clue why this is happening.

Tbh i am not to deep in CMD under Windows to execute commands do i need to do anything else after installing it directly from the Plugins Manager?

opc-ua

Plugin Health Check Failed

After using the make command for the file for grafana the plugin check still fails.
I've done every step in the installation tutorial, and the grafana plugin file location for data_dir should be correct.
What else should I add to make troubleshooting easier?

EROR[02-17|15:22:48] Plugin health check failed               logger=context userId=1 orgId=1 uname=admin error="failed to check plugin health: health check failed" remote_addr=[::1]
EROR[02-17|15:22:48] Request Completed                        logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/2/health status=500 remote_addr=[::1] time_ms=358 size=40 referer=http://localhost:3000/datasources/edit/SmXBMSf7z

I did use yarn test during the building process, but that was because just doing yarn build after the installation didn't work.

Timestamp not returning correctly.

I have compiled the plugin on a Ubuntu machine with the latest Grafana version.
The OPC UA connects correctly but all timestamps are "1970-01-01 02:27:04".

Build for Grafana-arm64

Machine: MacOs arm64 (m1 pro)

Running the
grafana-cli plugins install grafana-opcua-datasource

Returns the error:
grafana-opcua-datasource v is not supported on your system (Grafana v9.1.6 darwin-arm64)

Is ever OPC UA build would be available on Darwin-arm64 through Grafana repos?

By the way, how to build it on local machine for local Grafana instance?

[Question] - What is the database used

Hi,

First of all, thank you for this wonderful plugins!
I wonder what database did you use for this?
Is there a way 3rd party clients can connect to this databases?

Thank you and regards!

Backend component crashes on recommended Docker image

Hello! We are very excited about this plugin and really appreciate the work being put into this. Unfortunately I have encountered some difficulties running it in a production friendly way.

Problem

I am unable to run this plugin on the recommended Grafana Docker image. It is worth mentioning that the plugin also does not work on Grafana Cloud, which might be due to the same issue here. In both cases i see this

Screenshot from 2022-01-07 11-00-18

Reproduce

Run like so

docker run \
  -p 3000:3000 \
  --name=grafana \
  -e "GF_INSTALL_PLUGINS=grafana-opcua-datasource 1.1.4" \
  -e "GF_LOG_LEVEL=debug" \
  grafana/grafana-oss:8.3.3

go to your localhost and try to "Save and Test" a datasource with url opc.tcp://opcua.prediktor.com:4880. Here are some relevant lines from the logs

...
t=2022-01-07T12:57:39+0000 lvl=dbug msg="Loading plugin" logger=plugin.loader path=/var/lib/grafana/plugins/grafana-opcua-datasource/plugin.json
t=2022-01-07T12:57:40+0000 lvl=dbug msg="Plugin signature valid" logger=plugin.loader id=grafana-opcua-datasource
t=2022-01-07T12:57:40+0000 lvl=dbug msg="Plugin has valid signature" logger=plugin.signature.validator id=grafana-opcua-datasource
t=2022-01-07T12:57:40+0000 lvl=info msg="Plugin registered" logger=plugin.manager pluginId=grafana-opcua-datasource
t=2022-01-07T12:57:40+0000 lvl=dbug msg="starting plugin" logger=plugin.initializer pluginID=grafana-opcua-datasource path=/var/lib/grafana/plugins/grafana-opcua-datasource/gpx_opcua_linux_amd64 args=[/var/lib/grafana/plugins/grafana-opcua-datasource/gpx_opcua_linux_amd64]
t=2022-01-07T12:57:40+0000 lvl=dbug msg="plugin started" logger=plugin.initializer pluginID=grafana-opcua-datasource path=/var/lib/grafana/plugins/grafana-opcua-datasource/gpx_opcua_linux_amd64 pid=34
t=2022-01-07T12:57:40+0000 lvl=dbug msg="waiting for RPC address" logger=plugin.initializer pluginID=grafana-opcua-datasource path=/var/lib/grafana/plugins/grafana-opcua-datasource/gpx_opcua_linux_amd64
t=2022-01-07T12:57:40+0000 lvl=dbug msg="/var/lib/grafana/plugins/grafana-opcua-datasource/gpx_opcua_linux_amd64: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory" logger=plugin.initializer pluginID=grafana-opcua-datasource
t=2022-01-07T12:57:40+0000 lvl=eror msg="Could not start plugin" logger=plugin.manager pluginId=grafana-opcua-datasource err="Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol."
t=2022-01-07T12:57:40+0000 lvl=dbug msg="plugin process exited" logger=plugin.initializer pluginID=grafana-opcua-datasource path=/var/lib/grafana/plugins/grafana-opcua-datasource/gpx_opcua_linux_amd64 pid=34 error="exit status 127"
...

Thoughts

It appears that the backend component is not entirely self contained. This works when using the old Ubuntu Grafana image, so it is likely a problem with the differing libc requirements.

can't connect to opc Server

When I try to setup a new datasource and click save&test the message "Testing..." is constantly shown.
I can connect to my datasource with UaExpert.

I'm running grafana 7.1.3 under Windows 10.

In the grafan log is no entry regarding the plugin. Are there any additional logging capabilities for the plugin available?
How can I test if the c# backend is running as expected?

OK I found that increasing the grafana loglevel will show some more information.

I get a Opc.Ua.ServiceResultException: BadSecureChannelClosed" error.
When using the OPC c# Reference Client everything is connection well...

Unable to fill in url-field in data source

Hi, I'm using grafana v9.4.7. I successfully installed the OPC UA plugin v1.2.1 using the CLI. After a grafana-server restart I tried to add the data source and configure it but I cannot enter an URL, typing in the URL-field is not possible. Also the slider buttons under 'Auth' are not reacting. I tried the same flow in grafana v9.2.7, also no success. Am I doing something wrong here? OS is windows 10.

Making the plugin more widely known - list it in Grafana plugin directory

Is it possible to validate that the plugin works with Grafana 7 and put it in the official Grafana list of plugins. A lot of people are looking for this plugin, and don't know about it and can't find it because Google doesn't list it in searches.
I know this will generate feature requests and what not, but maybe someone else will step up and keep improving it.

This plugin + prometheus modbus_exporter + prometheus snmp_exporter + prometheus + flowcharting + worldmap + regular grafana panels + divpanel = modern industrial/IOT open source historian UI.

Browse from currently selected node

Hello! We are using this plugin more and more, so I though I'd submit some "nice to have" UI enhancements.

I often miss the left arrow when expanding subnodes and select a node that does not contain any value. Then it would be nice if, when a node is already selected, the browsing started from the currently selected node. As you can see here

Screenshot from 2022-05-31 13-39-53

when I have selected a node and click the magnifying glass, the browsing starts at the top nodes again and I have to navigate down to where I was again.

Siemens 840D OPC-UA access

Hi!

I'm able to connect to the server (it is of type OPC-UA, not OPC-DA) with the Grafana-Plugin, but I'm not able to connect/read any node-ID.

Example: Instance: ns=2;s=/Channel/GeometricAxis/actToolBasPosBN [u1,1] (should give the double value of the axis1 in channel one) -> BadNodeIdUnknown Could not find node id for start node: 's=$ObjectId' with browsepath 'ns=2;s=/Channel/GeometricAxis/actToolBasPosBN/'. StatusCode:'BadNodeIdUnknown'

Is it possible to post some examples on how to the the correct parameters?

Thanks in advance and best regards!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.