Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
1b6b94b
commit 0c2ca1b
Showing
4 changed files
with
29 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// !build monitoring | ||
|
||
package lncfg | ||
|
||
type PrometheusConfig struct { | ||
ListenAddr string `long:"listenaddr" description:"the interface we should listen on for prometheus"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// +build monitoring | ||
|
||
package lncfg | ||
|
||
// PrometheusConfig is the set of configuration data that specifies | ||
// the listening address of the Prometheus exporter. | ||
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"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters