Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

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

Open
maurerle wants to merge 2 commits into
FreifunkBremen:mainfrom
maurerle:gateway_influx
Open

feat(database/influxdb): add selected gateway as tag in influxdb#226
maurerle wants to merge 2 commits into
FreifunkBremen:mainfrom
maurerle:gateway_influx

Conversation

@maurerle

Copy link
Copy Markdown
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

codecov-commenter commented Sep 17, 2023

Copy link
Copy Markdown

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

genofire commented Sep 17, 2023

Copy link
Copy Markdown
Member

should we fetch the nodeID here, of the gateway?

like in output/meshviewer-ffrgb:

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

@genofire
genofire force-pushed the main branch 2 times, most recently from 3d1cd5c to 632e550 Compare September 18, 2023 05:55
@maurerle
maurerle marked this pull request as ready for review September 18, 2023 06:55
@maurerle

Copy link
Copy Markdown
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

genofire commented Sep 18, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

I confirm this works, can be merged :)

@maurerle

Copy link
Copy Markdown
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..

@genofire
genofire force-pushed the main branch 13 times, most recently from b819c24 to cc71150 Compare July 18, 2024 13:46
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Signed-off-by: Florian Maurer <f.maurer@outlook.de>
@maurerle

maurerle commented Jan 9, 2026

Copy link
Copy Markdown
Contributor Author

@genofire any chance to get this merged?

@genofire

genofire commented Jan 21, 2026

Copy link
Copy Markdown
Member

No, not this way ... a mac-address is no nodeid ... so the delete of : is to easy and just wrong code for me.

Please use this function for it, or another solution:
https://github.com/FreifunkBremen/yanic/blob/91a882503e284917f4ac81db5e84b6ab51e2a101/runtime/nodes.go#L109C21-L109C39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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