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

Publish cellular info and metrics to apps #2616

Merged
merged 3 commits into from
May 17, 2022

Conversation

milan-zededa
Copy link
Contributor

@milan-zededa milan-zededa commented May 9, 2022

Provided that device has at least one cellular modem visible to EVE (i.e. not assigned directly to an application),
JSON-formatted WWAN status and metrics are made available to all applications on the /eve/v1/wwan/status.json /eve/v1/wwan/metrics.json meta-data server endpoints, respectivelly.
This includes information about the cellular equipment, operating state, packet counters as recorded by modems, signal strength metrics and more.

Additionally, as a separate commit, cellular metrics were added to RadioStatus proto message, published by EVE to /api/v1/radio endpoint of the Local Profile Server (LPS).

@milan-zededa
Copy link
Contributor Author

milan-zededa commented May 9, 2022

@eriknordmark I'm also considering to create a meta-data server endpoint with ALL LTE-related information, i.e. not just metrics, but also info about the modem hardware, firmware, SIM cards, etc. - just like what we publish to LPS under /api/v1/radio
So maybe instead of /eve/v1/wwan-metrics.json, there could be something like /eve/v1/radio.json with status info + metrics (cellular, later also WiFi), which would make the API similar to that of LPS. WDYT?

@eriknordmark
Copy link
Contributor

@eriknordmark I'm also considering to create a meta-data server endpoint with ALL LTE-related information, i.e. not just metrics, but also info about the modem hardware, firmware, SIM cards, etc. - just like what we publish to LPS under /api/v1/radio So maybe instead of /eve/v1/wwan-metrics.json, there could be something like /eve/v1/radio.json with status info + metrics (cellular, later also WiFi), which would make the API similar to that of LPS. WDYT?

If we think the metrics (whether LTE or WiFi) will see significantly more use than the info then maybe we should have /eve/v1/radio/{info,metrics}.json. But it makes sense to look at how cloud-init (whether AWS or openstack) tends to structure the URLs they use on 169.254

docs/ECO-METADATA.md Outdated Show resolved Hide resolved
@milan-zededa milan-zededa marked this pull request as draft May 10, 2022 09:33
@milan-zededa
Copy link
Contributor Author

If we think the metrics (whether LTE or WiFi) will see significantly more use than the info then maybe we should have /eve/v1/radio/{info,metrics}.json. But it makes sense to look at how cloud-init (whether AWS or openstack) tends to structure the URLs they use on 169.254

It seems that your suggestion is in line with the AWS approach of structuring URLs, so I'm going to make the changes and mark the PR as draft for the time being.

@milan-zededa milan-zededa changed the title Publish cellular signal strength metrics to apps Publish cellular info and metrics to apps May 13, 2022
Provided that device has at least one cellular modem visible to EVE
(i.e. not assigned directly to an application), JSON-formatted WWAN
metrics are made available to all applications on the
`/eve/v1/network/wwan/metrics.json` endpoint. This includes packets
counters as recorded by modems as well as cellular signal strength info.

Signed-off-by: Milan Lenco <milan@zededa.com>
Added cellular metrics (packet counters and signal strength) to the
"/api/v1/radio" endpoint of the Local Profile Server (LPS).

Signed-off-by: Milan Lenco <milan@zededa.com>
@milan-zededa milan-zededa marked this pull request as ready for review May 13, 2022 13:04
Provided that device has at least one cellular modem visible to EVE
(i.e. not assigned directly to an application), JSON-formatted WWAN
status information are made available to all applications on the
`/eve/v1/network/wwan/status.json` endpoint. This includes information
about the installed cellular equipment (modem(s) and SIM card(s)),
identity information (IMEI, IMSI, ICCID), available network providers
(PLMNs) and more.

Signed-off-by: Milan Lenco <milan@zededa.com>
@milan-zededa
Copy link
Contributor Author

@eriknordmark I have split the metrics and status info into separate metadata server endpoints.

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - one question as a separate comment.

@eriknordmark eriknordmark merged commit db55abc into lf-edge:master May 17, 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

Successfully merging this pull request may close these issues.

2 participants