Interpret a high LND peer flap count after a network incident

A currently connected Lightning peer may have a history of intermittent disconnects. LND exposes a decaying count and timestamp for peers with channels.

Inspect the incident peer

Set PEER to the remote public key. listpeers returns active connected peers, so a missing row at query time can simply mean the peer is currently offline.

lncli listpeers | jq --arg p "$PEER" '.peers[] | select(.pub_key == $p) | {pub_key, flap_count, last_flap_ns, ping_time}'

Use the timestamp alongside the count

last_flap_ns records the most recent observed transition and is zero when none was observed. The count can decrease during stable periods, so differences between daily samples are unsuitable as exact outage counts. Correlate recent transitions with network and channel logs for the incident window.

lightning.engineering list-peers