Skip to content

Commit

Permalink
prom: More msat-purge...
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Jul 20, 2023
1 parent ce078bb commit 38cef3d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions prometheus/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ def collect(self):
'How many HTLCs are currently active on this channel?',
labels=['id', 'scid', 'alias'],
)
fee_base_msat_gauge = GaugeMetricFamily(
'lightning_channel_fee_base_msat',
'How many msats do we charge as a base fee for routing?',
labels=['id', 'scid', 'alias'],
)
fee_proportional_millionths_gauge = GaugeMetricFamily(
'lightning_channel_fee_proportional_millionths',
'How many millionths of the forwarded amount do we charge for routing?',
labels=['id', 'scid', 'alias'],
)

# Incoming routing statistics
in_payments_offered_gauge = GaugeMetricFamily(
Expand Down Expand Up @@ -186,6 +196,8 @@ def collect(self):
c['spendable_msat'].to_satoshi())
total_gauge.add_metric(labels, c['total_msat'].to_satoshi())
htlc_gauge.add_metric(labels, len(c['htlcs']))
fee_base_msat_gauge.add_metric(labels, int(c['fee_base_msat']))
fee_proportional_millionths_gauge.add_metric(labels, int(c['fee_proportional_millionths']))

in_payments_offered_gauge.add_metric(labels, c['in_payments_offered'])
in_payments_fulfilled_gauge.add_metric(labels, c['in_payments_fulfilled'])
Expand All @@ -202,6 +214,8 @@ def collect(self):
total_gauge,
spendable_gauge,
balance_gauge,
fee_base_msat_gauge,
fee_proportional_millionths_gauge,
in_payments_offered_gauge,
in_payments_fulfilled_gauge,
in_msatoshi_offered_gauge,
Expand Down

0 comments on commit 38cef3d

Please sign in to comment.