cln-plugins/prometheus
2025-12-01 15:55:59 +01:00
..
.gitignore prometheus: Resuscitate the prometheus plugin 2024-12-09 13:24:59 -06:00
prometheus.py prometheus: require python 3.9.2, add uv.lock, try fix port in use flake 2025-11-28 22:54:55 +01:00
pyproject.toml prometheus: remove poetry support 2025-12-01 15:55:59 +01:00
README.md prometheus: remove poetry support 2025-12-01 15:55:59 +01:00
test_prometheus.py prometheus: require python 3.9.2, add uv.lock, try fix port in use flake 2025-11-28 22:54:55 +01:00
uv.lock prometheus: remove poetry support 2025-12-01 15:55:59 +01:00

Prometheus plugin for c-lightning

This plugin exposes some key metrics from c-lightning in the prometheus format so it can be scraped, plotted and alerts can be created on it. The plugin adds the following command line arguments:

  • prometheus-listen: the IP address and port to bind the HTTP server to (default: 127.0.0.1:9750)

Exposed variables include:

  • node: ID, version, ...
  • peers: whether they are connected, and how many channels are currently open
  • channels: fund allocations, spendable funds, and how many unresolved HTLCs are currently attached to the channel
  • funds: satoshis in on-chain outputs, satoshis allocated to channels and total sum (may be inaccurate during channel resolution).

Installation

You need uv to run this plugin like a binary. After uv is installed you can simply run

lightning-cli plugin start /path/to/prometheus.py

For general plugin installation instructions see the repos main README.md