coussej / node-opcua-logger

An OPCUA Client for logging data to InfluxDB! 🔌 🏭
https://www.factry.io
MIT License
179 stars 63 forks source link

How to connect to influxdb cloud database #44

Closed JanMaasland closed 3 years ago

JanMaasland commented 4 years ago

Hello,

I am new to influxdb and try to connect a local OPC UA server to my influxdb cloud account. I managed to connect to the OPC UA server, but have no idea on what the url should be.

Can you help me on this?

Regards,

Jan Maasland

coussej commented 4 years ago

Hello, it should be in the form of http(s)://user:password@host:port/database

So, host should be the IP or FQDN of your cloud server, port is usually 8086, and the other details depend on how you confgres influxdb :-)

does that help?

JanMaasland commented 4 years ago

I now get a connection to influx, but get the below message every 5 seconds. I assume that for the database part of the url I need to put my bucket?

[2020-04-17T14:58:57.652] [ERROR] influx - A 405 Method Not Allowed error occurred:

405 Not Allowed

405 Not Allowed


nginx/1.16.1

[2020-04-17T14:58:57.654] [ERROR] buffer - Failed to write points from membuffer. { error: 'A 405 Method Not Allowed error occurred: \r\n405 Not Allowed\r\n\r\n

405 Not Allowed

\r\n
nginx/1.16.1
\r\n\r\n\r\n' } [2020-04-17T14:58:57.656] [ERROR] buffer - Will try again in 5s.

coussej commented 4 years ago

Is it possible you are running a beta of influxDB 2.0?

JanMaasland commented 4 years ago

Yes. I'm using influxDB 2.0. Is it not tested with the OPC-UA logger?

coussej commented 4 years ago

It has a different API than influx 1.x. We have not yet included support for influx 2.0, but will do soon :-)

maziarz commented 4 years ago

I have the same problem here. Authentication method does not seem to work with this logger, as it needs to use a token.

coussej commented 4 years ago

@maziarz InfluxDB 2.0 is not yet supported. We'll implement it soon!

coussej commented 4 years ago

Hello @maziarz, you can find initial support for 2.0 on the dev branch!

when you add a token, org and bucket to the config file, the logger will assume its influx 2.0 and connect as such.