rpcserver+monitoring/config: enable Prometheus monitoring.
Start the Prometheus exporter in rpcserver.go if monitoring is enabled through the build tag. Also allow users to specify what address they want the Prometheus exporter to be listening on.
This commit is contained in:
5 files changed
+95
-10
No files matched your search
@@ -313,6 +313,8 @@ type config struct {
|
||||
Workers *lncfg.Workers `group:"workers" namespace:"workers"`
|
||||
|
||||
Caches *lncfg.Caches `group:"caches" namespace:"caches"`
|
||||
|
||||
Prometheus lncfg.Prometheus `group:"prometheus" namespace:"prometheus"`
|
||||
}
|
||||
|
||||
// loadConfig initializes and parses the config using a config file and command
|
||||
@@ -407,6 +409,7 @@ func loadConfig() (*config, error) {
|
||||
RejectCacheSize: channeldb.DefaultRejectCacheSize,
|
||||
ChannelCacheSize: channeldb.DefaultChannelCacheSize,
|
||||
},
|
||||
Prometheus: lncfg.DefaultPrometheus(),
|
||||
}
|
||||
|
||||
// Pre-parse the command line options to pick up an alternative config
|
||||
|
||||
Reference in new issue
Block a user