Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
// Logger for lndmon's main process.
Logger = backendLog.Logger("LNDMON")
)
Functions ¶
This section is empty.
Types ¶
type ChainCollector ¶
type ChainCollector struct {
// contains filtered or unexported fields
}
ChainCollector is a collector that keeps track of on-chain information.
func NewChainCollector ¶
func NewChainCollector(lnd lnrpc.LightningClient) *ChainCollector
NewChainCollector returns a new instance of the ChainCollector for the target lnd client.
func (*ChainCollector) Collect ¶
func (c *ChainCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
NOTE: Part of the prometheus.Collector interface.
func (*ChainCollector) Describe ¶
func (c *ChainCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last descriptor has been sent.
NOTE: Part of the prometheus.Collector interface.
type ChannelsCollector ¶
type ChannelsCollector struct {
// contains filtered or unexported fields
}
ChannelsCollector is a collector that keeps track of channel infromation.
func NewChannelsCollector ¶
func NewChannelsCollector(lnd lnrpc.LightningClient, cfg *MonitoringConfig) *ChannelsCollector
NewChannelsCollector returns a new instance of the ChannelsCollector for the target lnd client.
func (*ChannelsCollector) Collect ¶
func (c *ChannelsCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
NOTE: Part of the prometheus.Collector interface.
func (*ChannelsCollector) Describe ¶
func (c *ChannelsCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last descriptor has been sent.
NOTE: Part of the prometheus.Collector interface.
type GraphCollector ¶
type GraphCollector struct {
// contains filtered or unexported fields
}
GraphCollector is a collector that keeps track of graph information.
func NewGraphCollector ¶
func NewGraphCollector(lnd lnrpc.LightningClient) *GraphCollector
NewGraphCollector returns a new instance of the GraphCollector for the target lnd client.
func (*GraphCollector) Collect ¶
func (g *GraphCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
NOTE: Part of the prometheus.Collector interface.
func (*GraphCollector) Describe ¶
func (g *GraphCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last descriptor has been sent.
NOTE: Part of the prometheus.Collector interface.
type InfoCollector ¶ added in v0.1.1
type InfoCollector struct {
// contains filtered or unexported fields
}
InfoCollector is a collector that keeps track of node information.
func NewInfoCollector ¶ added in v0.1.1
func NewInfoCollector(lnd lnrpc.LightningClient) *InfoCollector
NewInfoCollector returns a new instance of the InfoCollector for the target lnd client.
func (*InfoCollector) Collect ¶ added in v0.1.1
func (c *InfoCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
NOTE: Part of the prometheus.Collector interface.
func (*InfoCollector) Describe ¶ added in v0.1.1
func (c *InfoCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last descriptor has been sent.
NOTE: Part of the prometheus.Collector interface.
type MonitoringConfig ¶ added in v0.1.1
type MonitoringConfig struct {
// PrimaryNode is the pubkey of the primary node in primary-gateway
// setups.
PrimaryNode *route.Vertex
}
MonitoringConfig contains information that specifies how to monitor the node.
type PeerCollector ¶
type PeerCollector struct {
// contains filtered or unexported fields
}
PeerCollector is a collector that keeps track of peer information.
func NewPeerCollector ¶
func NewPeerCollector(lnd lnrpc.LightningClient) *PeerCollector
NewPeerCollector returns a new instance of the PeerCollector for the target lnd client.
func (*PeerCollector) Collect ¶
func (p *PeerCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
NOTE: Part of the prometheus.Collector interface.
func (*PeerCollector) Describe ¶
func (p *PeerCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last descriptor has been sent.
NOTE: Part of the prometheus.Collector interface.
type PrometheusConfig ¶
type PrometheusConfig struct {
// ListenAddr is the listening address that we should use to allow the
// main Prometheus server to scrape our metrics.
ListenAddr string `long:"listenaddr" description:"the interface we should listen on for prometheus"`
// LogDir is the directory to log lndmon output.
LogDir string `long:"logdir" description:"Directory to log output"`
// MaxLogFiles is the maximum number of log files to keep (0 for no
// rotation).
MaxLogFiles int `long:"maxlogfiles" description:"Maximum log files to keep (0 for no rotation)"`
// MaxLogFileSize is the maximum log file size in MB.
MaxLogFileSize int `long:"maxlogfilesize" description:"Maximum log file size in MB"`
}
PrometheusConfig is the set of configuration data that specifies the listening address of the Prometheus server and configuration for lndmon logs.
func DefaultConfig ¶
func DefaultConfig() *PrometheusConfig
type PrometheusExporter ¶
type PrometheusExporter struct {
// contains filtered or unexported fields
}
PrometheusExporter is a metric exporter that exports relevant lnd metrics such as routing policies to track how Lightning fees change over time.
func NewPrometheusExporter ¶
func NewPrometheusExporter(cfg *PrometheusConfig, lnd lnrpc.LightningClient, monitoringCfg *MonitoringConfig) *PrometheusExporter
NewPrometheusExporter makes a new instance of the PrometheusExporter given the address to listen for Prometheus on and an lnd gRPC client.
func (*PrometheusExporter) Start ¶
func (p *PrometheusExporter) Start() error
Start registers all relevant metrics with the Prometheus library, then launches the HTTP server that Prometheus will hit to scrape our metrics.
type WalletCollector ¶
type WalletCollector struct {
// contains filtered or unexported fields
}
WalletCollector is a collector that will export metrics related to lnd's on-chain wallet. .
func NewWalletCollector ¶
func NewWalletCollector(lnd lnrpc.LightningClient) *WalletCollector
NewWalletCollector returns a new instance of the WalletCollector.
func (*WalletCollector) Collect ¶
func (u *WalletCollector) Collect(ch chan<- prometheus.Metric)
Collect is called by the Prometheus registry when collecting metrics.
NOTE: Part of the prometheus.Collector interface.
func (*WalletCollector) Describe ¶
func (u *WalletCollector) Describe(ch chan<- *prometheus.Desc)
Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last descriptor has been sent.
NOTE: Part of the prometheus.Collector interface.