Added Prometheus Flag and Default

This commit is contained in:
Shivam Sharma 2021-11-12 18:54:04 +05:30
parent cd6a163391
commit 358e68364f
2 changed files with 8 additions and 2 deletions

View file

@ -441,8 +441,9 @@ func DefaultConfig() *Config {
},
Ethstats: "",
Telemetry: &TelemetryConfig{
Enabled: false,
Expensive: false,
Enabled: false,
Expensive: false,
PrometheusAddr: "",
InfluxDB: &InfluxDBConfig{
V1Enabled: false,
Endpoint: "",

View file

@ -396,6 +396,11 @@ func (c *Command) Flags() *flagset.Flagset {
Usage: "Comma-separated InfluxDB tags (key/values) attached to all measurements",
Value: &c.cliConfig.Telemetry.InfluxDB.Tags,
})
f.StringFlag(&flagset.StringFlag{
Name: "metrics.prometheus-addr",
Usage: "Address for Prometheus Server",
Value: &c.cliConfig.Telemetry.PrometheusAddr,
})
// influx db v2
f.BoolFlag(&flagset.BoolFlag{
Name: "metrics.influxdbv2",