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

Request: Push selected gateway as influx statistic? #173

Open
lemoer opened this issue Jan 5, 2020 · 5 comments · May be fixed by #226
Open

Request: Push selected gateway as influx statistic? #173

lemoer opened this issue Jan 5, 2020 · 5 comments · May be fixed by #226

Comments

@lemoer
Copy link
Contributor

lemoer commented Jan 5, 2020

Would you like to add code to push this statistics into Influx DB so they are available as time series? It would be helpful to have this stats in our Grafana Dashboards, so we can infer whether a DHCP server (or so) is not running. ☺️

Screenshot from 2020-01-05 15-03-30

@genofire
Copy link
Member

genofire commented Jan 5, 2020

A gateway is also just a node from respondd / yanic view, so there is no easy data struct, to store somethink like this nice.

It is possible to save for every node there gateway - but i do not know any influxdb select to group it afterwards on a nice way. The connected neigbours are not enought?

Do you have any idea to handle it? (maybe influxdb insert query or pullrequest)
For a PR:

  • here is how the values are collected and fillup
  • here how the influxdb points are created - where we must extends the code

Hope it could help on a way.

@AiyionPrime
Copy link
Contributor

@lemoer maybe this could become a field provided by wgpeerselector, after the first merge in gluon is done?

@lemoer
Copy link
Contributor Author

lemoer commented Feb 19, 2021

@AiyionPrime I guess, you misunderstood the issue here. The "selected ipv6-gateway" is the information about the router advertisement server selected by radv-filterd and "selected ipv4-gateway" is the information equivalent to the selected gateway in batctl gwl.

However, the scope of this issue is to be able to visualize this information as a time series. Currently yanic only exposes this to the nodes.json iirc, but not to influx.

We solved this downstream:

Screenshot from 2021-02-19 04-58-28

(I think, we did this using a shell script by parsing the nodes.json or so...)

I still think, it would be nice for other communities as well. But I am probably not going to implement in yanic, as we have a working solution...

@AiyionPrime
Copy link
Contributor

Thanks for clarifying.

@maurerle
Copy link
Contributor

maurerle commented May 4, 2023

Wouldn't it be possible to add the string mac from here:

yanic/data/statistics.go

Lines 18 to 19 in 6b4b954

GatewayIPv4 string `json:"gateway,omitempty"`
GatewayIPv6 string `json:"gateway6,omitempty"`

and just write it together into the influxdb as a new tag here:
tags := models.Tags{}
tags.SetString("nodeid", stats.NodeID)

We would also profit from this feature :)

@maurerle maurerle linked a pull request Sep 17, 2023 that will close this issue
4 tasks
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 a pull request may close this issue.

4 participants