cmd/geth: dump config for metrics (#22083)

* cmd/geth: dump config

* cmd/geth: dump config

* cmd/geth: properly read config again

* cmd/geth: override metrics if flags are set

* cmd/geth: write metrics regardless if enabled

* cmd/geth: renamed to metricsfromcliargs

* metrics: add default configuration
This commit is contained in:
Marius van der Wijden
2021-01-18 14:36:05 +01:00
committed by GitHub
parent 398182284c
commit 10555d4684
3 changed files with 92 additions and 10 deletions

View File

@ -684,12 +684,12 @@ var (
MetricsHTTPFlag = cli.StringFlag{
Name: "metrics.addr",
Usage: "Enable stand-alone metrics HTTP server listening interface",
Value: "127.0.0.1",
Value: metrics.DefaultConfig.HTTP,
}
MetricsPortFlag = cli.IntFlag{
Name: "metrics.port",
Usage: "Metrics HTTP server listening port",
Value: 6060,
Value: metrics.DefaultConfig.Port,
}
MetricsEnableInfluxDBFlag = cli.BoolFlag{
Name: "metrics.influxdb",
@ -698,22 +698,22 @@ var (
MetricsInfluxDBEndpointFlag = cli.StringFlag{
Name: "metrics.influxdb.endpoint",
Usage: "InfluxDB API endpoint to report metrics to",
Value: "http://localhost:8086",
Value: metrics.DefaultConfig.InfluxDBEndpoint,
}
MetricsInfluxDBDatabaseFlag = cli.StringFlag{
Name: "metrics.influxdb.database",
Usage: "InfluxDB database name to push reported metrics to",
Value: "geth",
Value: metrics.DefaultConfig.InfluxDBDatabase,
}
MetricsInfluxDBUsernameFlag = cli.StringFlag{
Name: "metrics.influxdb.username",
Usage: "Username to authorize access to the database",
Value: "test",
Value: metrics.DefaultConfig.InfluxDBUsername,
}
MetricsInfluxDBPasswordFlag = cli.StringFlag{
Name: "metrics.influxdb.password",
Usage: "Password to authorize access to the database",
Value: "test",
Value: metrics.DefaultConfig.InfluxDBPassword,
}
// Tags are part of every measurement sent to InfluxDB. Queries on tags are faster in InfluxDB.
// For example `host` tag could be used so that we can group all nodes and average a measurement
@ -722,7 +722,7 @@ var (
MetricsInfluxDBTagsFlag = cli.StringFlag{
Name: "metrics.influxdb.tags",
Usage: "Comma-separated InfluxDB tags (key/values) attached to all measurements",
Value: "host=localhost",
Value: metrics.DefaultConfig.InfluxDBTags,
}
EWASMInterpreterFlag = cli.StringFlag{
Name: "vm.ewasm",