mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-23 16:14:20 +01:00
add lightningd blockheight metric
This metric is useful on initial sync, when bitcoind is already synced, but lightningd is still working through the blocks. Comparing the two measures allows to calculate the indexing progress.
This commit is contained in:
committed by
Christian Decker
parent
34f81103a4
commit
6d0df3c83b
@@ -25,6 +25,13 @@ class NodeCollector(BaseLnCollector):
|
||||
node_info_fam.add_metric(info_labels, info_labels)
|
||||
yield node_info_fam
|
||||
|
||||
blockheight = info['blockheight']
|
||||
yield GaugeMetricFamily(
|
||||
'lightning_node_blockheight',
|
||||
"Current Bitcoin blockheight on this node.",
|
||||
value=blockheight,
|
||||
)
|
||||
|
||||
|
||||
class FundsCollector(BaseLnCollector):
|
||||
def collect(self):
|
||||
|
||||
Reference in New Issue
Block a user