mirror of
https://github.com/lightningd/plugins.git
synced 2026-08-16 13:00:58 +02:00
prometheus: give short channel id for scid fiels, not long one
Also, if the channel isn't confirmed yet (no short_channel_id field),
give the long channel id.
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This commit is contained in:
parent
a155107857
commit
2d2fa72ce6
1 changed files with 1 additions and 1 deletions
|
|
@ -162,7 +162,7 @@ class ChannelsCollector(BaseLnCollector):
|
|||
peers = self.rpc.listpeers()['peers']
|
||||
for p in peers:
|
||||
for c in p['channels']:
|
||||
labels = [p['id'], c['channel_id']]
|
||||
labels = [p['id'], c.get('short_channel_id', c.get('channel_id'))]
|
||||
balance_gauge.add_metric(labels, c['to_us_msat'].to_satoshi())
|
||||
spendable_gauge.add_metric(labels,
|
||||
c['spendable_msat'].to_satoshi())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue