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

feat(database/influxdb): add selected gateway as tag in influxdb #226

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maurerle
Copy link
Contributor

Description

Adds the selected gateway and gateway6 as a tag to the influxdb

Motivation and Context

fixes #173

Checklist:

  • My code follows the code style of this project.
  • I have added also tests for my new code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2023

Codecov Report

Merging #226 (61ed220) into main (22f67e2) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 61ed220 differs from pull request most recent head ce816d6. Consider uploading reports for the commit ce816d6 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #226      +/-   ##
==========================================
- Coverage   73.11%   73.09%   -0.02%     
==========================================
  Files          55       55              
  Lines        2418     2420       +2     
==========================================
+ Hits         1768     1769       +1     
  Misses        598      598              
- Partials       52       53       +1     
Files Changed Coverage Δ
database/influxdb/node.go 84.11% <100.00%> (+0.18%) ⬆️

... and 3 files with indirect coverage changes

@genofire
Copy link
Member

genofire commented Sep 17, 2023

should we fetch the nodeID here, of the gateway?

like in output/meshviewer-ffrgb:

node.GatewayIPv4 = nodes.GetNodeIDbyAddress(statistic.GatewayIPv4)

@maurerle maurerle marked this pull request as ready for review September 18, 2023 06:55
@maurerle
Copy link
Contributor Author

we would then have to "nodes" somehow to influx output - do you know how to manage this?

In the current way, I do not see the gateway set as a tag.. I don't know what i am doing wrong :D

@genofire
Copy link
Member

genofire commented Sep 18, 2023

you are correct, that it needs a refactory to get nodes ...

to manage it, i need to look and test myself ... first tought, do we have something equal for links already.


i believe nothing, could it be, that you mixup influxdb and influxdb2 ?

@maurerle maurerle changed the title feat(influxdb): add selected gateway as tag in influxdb feat(database/influxdb): add selected gateway as tag in influxdb Sep 19, 2023
@maurerle
Copy link
Contributor Author

I confirm this works, can be merged :)

@maurerle
Copy link
Contributor Author

I had something wrong with my install, now it worked..
I mean we could just remove the ':' in the string - as this is likely the nodeid? But I don't know if you can rely on that.

Having it as a nodeid would be much better, as we do not have the mac anywhere else..

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

Successfully merging this pull request may close these issues.

Request: Push selected gateway as influx statistic?
3 participants