Skip to content

Seed in-memory counters from lnd on startup so metrics survive pod restarts #133

Description

@JLSchuler99

Problem

lndmon keeps cumulative counters in memory, such as for total payments. On a pod restart they reset to zero.

This type of counter is not typical for prometheus exporters, but bridges a gap for embedded database.

Proposed fix

Optional flag, to, seed the counters from lnd's current state on startup (via the relevant RPCs recently became significantly faster on recent lnd), then resume incremental tracking. Across a restart, derived rate metrics should stay continuous instead of dropping to zero.

Acceptance

  • After an lndmon restart, counters resume from approximately their pre-restart values (within tolerance) rather than from zero.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions