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

Expose telemetry on an OpenTelemetry endpoint #1792

Open
erdnaxe opened this issue Oct 24, 2022 · 0 comments
Open

Expose telemetry on an OpenTelemetry endpoint #1792

erdnaxe opened this issue Oct 24, 2022 · 0 comments

Comments

@erdnaxe
Copy link

erdnaxe commented Oct 24, 2022

Is your feature request related to a problem? Please describe.
Currently I use a custom Python script that subscribe to telemetry packets over WebSocket /cosmos-api/cable and then export the values by serving a webserver with /metrics OpenTelemetry endpoint. This enables me to log some useful states to my Prometheus instance, and then do alerting and visualisation with Grafana.
This requires manual work to extract all telemetry packets name (such as TLM__ADCS__IMU_TLM_PKT__A_X__CONVERTED) and needs to be updated each time telemetry packet structures change.

As COSMOS already stores in memory the last value of received telemetry packets, a /metrics endpoint could be added exposing these. Basic auth with user password could be used to protect these data (monitoring software such as Prometheus supports that).

Describe the solution you'd like
An authentificated /metrics endpoint containing last telemetry.

If current telemetry field is null, then do not show the value on /metrics.
If the telemetry field type is a float, an int, or an enum, then show the value on /metrics.
If the telemetry field type is an array, then it could be split using labels (e.g. my_array_metric{index=0}).

TLM__ADCS__IMU_TLM_PKT__A_X could be exported as cosmos__adcs__imu_tlm_packet__a_x for example (OpenSatKit ADCS).

Additional context
COSMOS 5

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

1 participant