Skip to content
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

To Do #1

Open
3 tasks
pbegg opened this issue Jan 26, 2021 · 10 comments
Open
3 tasks

To Do #1

pbegg opened this issue Jan 26, 2021 · 10 comments

Comments

@pbegg
Copy link
Owner

pbegg commented Jan 26, 2021

  • Currently buffer.js is logging to console and not debug
  • When plugin is stopped, log current measurements in buffer or post to influx - currently they will be lost
  • buffer.sendBuffer() is using using readFileSync - maybe should change this to use async
@mgf909
Copy link

mgf909 commented Mar 8, 2021

Possible to allow non https server connection? I plan to use tailscale vpn to connect my machines - largely to keep networking simple over various mobile and marina connections - and also so i dont forget to renew certs etc! So being able to connect to a non-SSL Influxdb instance ( self hosted ) is important to me.

Update: Ive bodged this by editing /home/pi/.signalk/node_modules/influxdb-v2/src/index.js
and replacing
//const baseUrl = ${this._protocol}://${this._host}:${this._port}/api/v2; const baseUrl = http://192.168.0.11:8086/api/v2`;`

Would be great if you could add the protocol/port to be specified in the plugin config.

@pbegg
Copy link
Owner Author

pbegg commented Mar 8, 2021

I will try to update this during the week, I will make a drop down box in the plugin config to select the protocol.

@jpcavanagh
Copy link

I am having a difficulity with the protocol too. I want to connect to "http://domain.xyz:8086" (a self hosted influxdb instance) but the connection fails and logs the connect attempt to "https://http//domain.xyz:8086:443/api/v2/write?org=xx&bucket=xx&precision=ms failed, reason: getaddrinfo ENOTFOUND http http:443"

could you read the URL as entered in the field with the http or https ?

@pbegg
Copy link
Owner Author

pbegg commented Apr 13, 2021

I am currently re writing this plugin to utilize the influxdata js library which should address most of the issues the plugin currently has.

@xbgmsharp
Copy link
Contributor

The issue still persist. The influxdata js library force the protocol (https) and the port (403), https://www.npmjs.com/package/influxdb-v2
To allow an URI instead of an hostname value.

const url = require('url');
...
    const hosturi = url.parse(options.influxHost);
    app.debug(`proto: ${hosturi.protocol}, hostname: ${hosturi.hostname}, port: ${hosturi.port}...`)
    const influxdb = new Influxdb({
      host: hosturi.hostname,
      protocol: hosturi.protocol,
      port: hosturi.port,
      token: options.influxToken
      })

@pbegg
Copy link
Owner Author

pbegg commented Apr 30, 2021

The Plugin is now updated to use the the @influx-client-js library and should allow use of different protocol

@jlazkano
Copy link

Hello,

I want to send the SignalK data to http://192.168.1.10:8086

But it doesn't work. Is this fixed? or still need to rewrite the code to accept PROTOCOL://IP:PORT?

Kind regards.

@pbegg
Copy link
Owner Author

pbegg commented Feb 17, 2022

Is your InfluxData v2?
You should be able to type the full address including protocol as you mentioned above.

I have not tested with a local DB only influx cloud

@jlazkano
Copy link

Hello,

Yes, I put "http://192.168.1.10:8086" in the "Influxdb2.0 Host URL" parameter.

The server has this version:

InfluxDB 2.1.1
Server: 657e183
Frontend: cc65325

There is no any data in the Influxdb bucket, and there is no any log in the SignalK log.

Thanks for your help.

@dhskinner
Copy link

  • Currently buffer.js is logging to console and not debug
  • When plugin is stopped, log current measurements in buffer or post to influx - currently they will be lost
  • buffer.sendBuffer() is using using readFileSync - maybe should change this to use async

Hi Phil can I add two items please (and apologies I ran out of time to take a look at these today):

  • add an option to rename signalK pathnames as an alias in InfluxDB, so its easier to pull data from influx into grafana (although tags already probably do this perhaps?)
  • work out AIS data so all the Vessels.[UID] positions, courses, speed info goes into InfluxDB togther as one measurement, that can be easily displayed on a geomap
    Appreciate guidance - thanks

pbegg pushed a commit that referenced this issue Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants