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
indexis specified,startmay be specified to start from that value, which is generally returned from lightning-wait(7). - limit (u32, optional): If
indexis specified,limitcan 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_failordisconnect) - 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