listnetworkevents

listnetworkevents -- Command for querying network events

SYNOPSIS

listnetworkevents [id] [index] [start] [limit]

DESCRIPTION

Command added in v25.12.

The listnetworkevents RPC command retrieves the log of connections, disconnections and pings on the network. This can be analyzed to evaluate node reliability and latency. Note: the autoclean plugin deletes network events older than 30 days; you can adjust autoclean-networkevents-age to change this

  • id (string, optional): A node id: if set, only network events for this peer are returned
  • index (string, optional) (always "created"): This controls the ordering of results. The default is created.
  • start (u64, optional): If index is specified, start may be specified to start from that value, which is generally returned from lightning-wait(7).
  • limit (u32, optional): If index is specified, limit can be used to specify the maximum number of entries to return.

RETURN VALUE

On success, an object containing networkevents is returned. It is an array of objects, where each object contains:

  • created_index (u64): 1-based index indicating order this network event was created in.
  • timestamp (u64): Time this event was recorded, in seconds since January 1 1970 UTC
  • peer_id (pubkey): The node the network connection was talking to.
  • type (string): The type of event (currently ping, connect, connect_fail or disconnect)
  • reason (string, optional): The cause of the event (if known)
  • duration_nsec (u64, optional): The time taken (for ping, the latency, for connect / connect_fail, the time taken to get a result, for disconnect, the time we were connected)

If type is "connect_fail":

  • connect_attempted (boolean): True if we found an address we could attempt to connect to, e.g. ignoring Tor addresses if we don't have a proxy, and ignoring IPv6 addresses if we don't have IPv6 support.

AUTHOR

Rusty Russell [email protected] is mainly responsible.

SEE ALSO

lightning-autoclean(7), lightning-listpeers(7)

RESOURCES

Main web site: https://github.com/ElementsProject/lightning

Core Lightning is Blockstream's open-source implementation of the Lightning Network optimised for performance. It is highly customizable through modular expandability.

© 2023 Core Lightning
All rights reserved.

X Twitter Logo Streamline Icon: https://streamlinehq.com

X

The official Core Lightning X(Twitter) handle to follow project updates and announcements.

Github Logo 2 Streamline Icon: https://streamlinehq.com

Github

Github repository for source code, issues, and contributions. Visit our project here to explore or contibute.

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/V6ay9yNhBQ to join.