nightscout-librelink-up icon indicating copy to clipboard operation
nightscout-librelink-up copied to clipboard

Add Prometheus endpoint

Open solsson opened this issue 1 year ago • 3 comments

See #89 for example Kubernetes yaml.

Remaining decisions:

  • Which value to pick. Are .glucoseMeasurement and .glucoseItem equivalent? Or maybe it's better to use the newest .graphData entry instead?

  • I haven't had the chance to test with no sensor values yet. What should be exported then? If using Prometheus alerts, exporting zeroes is impractical. Alert definitions should be as simple as possible, for example glucose_value < 3.5.

    • Maybe glucose_low=0, glucose_high=0 and not exporting glucose_value or glucose_trend? Prometheus can alert on absent metrics.

    • I'll add unit tests for the strategy we pick.

  • What do we know about the TrendArrow value (present in glucoseItem but not in graphData)? It's constantly been 3 since I started testing.

  • What to do in SINGLE_SHOT mode with prometheus enabled?

    • Stay running and export the first metric?
    • Support push?
    • Do nothing?
    • Write the response to a json file (as is done now). Was useful for me to get started.

solsson avatar Apr 02 '23 04:04 solsson