No description
Find a file
Henrik Jonsson 023da9c36b prometheus: Fix channel_id name and prevent crashing
With c-lightning v0.7.0, there seems to be no `short_channel_id`
key present in the input sent to the `prometheus.py` script when
it is is called via the `plugin` config value for c-lightning
when a channel is opened.

Without this change, the script throws `500 Internal Server` error
when doing `$ lightning-cli fundchannel <id> <sats>`.

A sample JSON messages passed to the plugin is:

```
{
        'state': 'CHANNELD_AWAITING_LOCKIN',
        'scratch_txid': '120ad265b66aa0c4bbb5ff50a23ca85463337fb8b58b395f3811918610686a734',
        'owner': 'lightning_channeld',
        'channel_id': 'eda784df73aa105d728a0d9fee6ff450eeeac78aa57d3218f7b0dd89b2bd20f1',
        'funding_txid': 'f120bdb2eec4b0f718327dc58cc7eaee5dd46fa19f0d8a725d10ff73df84a7ed',
        'private': False,
        'funding_allocation_msat': {
                '03584abd04d69168600ff0ff5d11723d324f2deadbeefcbb84804580e344af235e': 0,
                '03a9c46ddacd373f78b6679f9dec6adb10b3ddeadbeef2a685e09b2ce6101bc18c': 100000000
        },
        'funding_msat': {
                '03584abd04d69168600340ad5d11723d324f2deadbeefcbb84804580e344af235e': '0msat',
                '03a9c46ddacd373f78b6679f9dec6adb10b3ddeadbeef2a685e09b2ce6101bc18c': '100000000msat'
        },
        'msatoshi_to_us': 100000000,
        'to_us_msat': '100000000msat',
        'msatoshi_to_us_min': 100000000,
        'min_to_us_msat': '100000000msat',
        'msatoshi_to_us_max': 100000000,
        'max_to_us_msat': '100000000msat',
        'msatoshi_total': 100000000,
        'total_msat': '100000000msat',
        'dust_limit_satoshis': 546,
        'dust_limit_msat': '546000msat',
        'max_htlc_value_in_flight_msat': 18446744073709551615,
        'max_total_htlc_in_msat': '18446744073709551615msat',
        'their_channel_reserve_satoshis': 1000,
        'their_reserve_msat': 1000000msat,
        'our_channel_reserve_satoshis': 1000,
        'our_reserve_msat': '1000000msat',
        'spendable_msatoshi': 99000000,
        'spendable_msat': '99000000msat',
        'htlc_minimum_msat': 0,
        'minimum_htlc_in_msat': '0msat',
        'their_to_self_delay': 144,
        'our_to_self_delay': 144,
        'max_accepted_htlcs': 483,
        'status': ['CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.', 'CHANNELD_AWAITING_LOCKIN:Funding needs more confirmations.'],
        'in_payments_offered': 0,
        'in_msatoshi_offered': 0,
        'in_offered_msat': '0msat',
        'in_payments_fulfilled': 0,
        'in_msatoshi_fulfilled': 0,
        'in_fulfilled_msat': '0msat',
        'out_payments_offered': 0,
        'out_msatoshi_offered': 0,
        'out_offered_msat': '0msat',
        'out_payments_fulfilled': 0,
        'out_msatoshi_fulfilled': 0,
        'out_fulfilled_msat': '0msat',
        'htlcs': []
}
```
2019-05-10 17:05:08 +02:00
autopilot autopilot: Add plugin binary and README file 2019-04-29 15:42:01 +02:00
autoreload autoreload: Add an autoreload plugin to restart plugins on change 2019-05-10 10:14:06 +02:00
donations donations: Fixed up the README a bit 2019-03-28 16:07:51 +01:00
graphql@353f03826d graphql: Renamed graphql plugin to correct directory 2019-04-29 15:26:17 +02:00
persistent-channels probe: Run probes in their own thread 2019-02-20 20:10:39 +01:00
probe probe: Actually add a sensible return value to the probe method 2019-05-09 12:46:30 +02:00
prometheus prometheus: Fix channel_id name and prevent crashing 2019-05-10 17:05:08 +02:00
rebalance rebalance: exclude all own channels from getroute 2019-05-08 12:47:59 +02:00
sendinvoiceless fix: sendinvoiceless adds receivers fee 2019-05-08 23:33:58 +02:00
sitzprobe@84347d5519 sitzprobe: Add sitzprobe by @niftynei as a submodule 2019-04-01 18:35:39 +02:00
summary Update summary/summary.py 2019-04-23 15:36:05 +02:00
.gitignore pytest: Preparing to run integration tests using pytest 2019-03-30 00:03:16 +01:00
.gitmodules created git module for c-lightning-api plugin (#7) 2019-04-29 15:22:44 +02:00
conftest.py pytest: Preparing to run integration tests using pytest 2019-03-30 00:03:16 +01:00
LICENSE Initial commit 2019-01-17 13:16:45 +01:00
pytest.ini pytest: Preparing to run integration tests using pytest 2019-03-30 00:03:16 +01:00
README.md autoreload: Add the autoreload plugin to the README 2019-05-10 10:14:06 +02:00

Plugins for c-lightning

Community curated plugins for c-lightning.

To install and activate a plugin you need to stop your lightningd and restart it with the plugin argument like this:

lightningd --plugin=/path/to/plugin/directory/plugin_file_name.py

where the plugin_file_name.py should be an executable (chmod a+x plugin_file_name.py) file and can be written in any programming language.

Available plugins

Name Short description
autopilot An autopilot that suggests channels that should be established
autoreload A developer plugin that reloads a plugin under development when it changes
donations A simple donations page to accept donations from the web
graphql Exposes the c-lightning API over graphql
persistent-channels Maintains a number of channels to peers
probe Regularly probes the network for stability
prometheus Lightning node exporter for the prometheus timeseries server
rebalance Keeps your channels balanced
sendinvoiceless Sends some money without an invoice from the receiving node.
sitzprobe A Lightning Network payment rehearsal utility
summary Print a nice summary of the node status

More Plugins from the Community

Plugin Builder Resources