Add Grafana integration for CareLink data - #38
Open
albycrescini wants to merge 2 commits into
Open
albycrescini wants to merge 2 commits into
albycrescini wants to merge 2 commits into
Conversation
- Introduced a new command-line argument `--replica-database` to specify a read-only DuckDB replica for Grafana. - Implemented the `publish_replica` method in `CareLinkStorage` to atomically publish data to the specified replica database. - Updated the `start_webserver` function to handle the new argument and call the publish method after saving data. - Modified the systemd service file to include the new `--replica-database` argument for the CareLink proxy service.
albycrescini
force-pushed
the
albycrescini/grafana-dashboard
branch
from
September 13, 2026 18:46
dc456b3 to
e4d5d95
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Grafana integration for CareLink data
Grafana can visualize the historical CareLink data retained in DuckDB, but it must not query the proxy's actively-written database file. DuckDB is file-based and the proxy is its writer, so the integration publishes a separate read-only replica for Grafana instead.
The replica keeps a stable DuckDB catalog and atomically replaces its Parquet-backed data. This lets Grafana's long-lived datasource connection see new data safely without opening or locking the proxy's primary database.
Changes
--replica-databaseto publish a Grafana-readable DuckDB replica.Dashboard
This is a live dashboard of my own CGM readings.