Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeMetricsPort and WatchtowerMetricsPort are ignored #689

Open
jakubgs opened this issue Oct 25, 2024 · 0 comments
Open

NodeMetricsPort and WatchtowerMetricsPort are ignored #689

jakubgs opened this issue Oct 25, 2024 · 0 comments

Comments

@jakubgs
Copy link

jakubgs commented Oct 25, 2024

It appears that both WatchtowerMetricsPort and NodeMetricsPort settings are ignored by the nodes:

NodeMetricsPort config.Parameter `yaml:"nodeMetricsPort,omitempty"`
ExporterMetricsPort config.Parameter `yaml:"exporterMetricsPort,omitempty"`
WatchtowerMetricsPort config.Parameter `yaml:"watchtowerMetricsPort,omitempty"`

And ExporterMetricsPort probably also.

Based on reading the code it appears the value for smartnode metrics port and address comes from CLI context:

func runMetricsServer(c *cli.Context, logger log.ColorLogger, stateLocker *collectors.StateLocker) error {

metricsAddress := c.GlobalString("metricsAddress")
metricsPort := c.GlobalUint("metricsPort")

Which as far as I can tell does not include settings from user-settings.yml file. The same goes for watchtower:
func runMetricsServer(c *cli.Context, logger log.ColorLogger, scrubCollector *collectors.ScrubCollector, bondReductionCollector *collectors.BondReductionCollector, soloMigrationCollector *collectors.SoloMigrationCollector) error {

metricsAddress := c.GlobalString("metricsAddress")
metricsPort := c.GlobalUint("metricsPort")

I base this off of the fact that urfave/cli provides the GlobalString() method, which to me excludes the possibility that the configurations are merged.

Also, the metrics ports settings are defined using your own type for parameters:

WatchtowerMetricsPort: config.Parameter{
ID: "watchtowerMetricsPort",
Name: "Watchtower Metrics Port",

// A parameter that can be configured by the user
type Parameter struct {

Which as far as I can tell is not merged with CLI flags.

Based on this I conclude that both of these settings in user config file are not used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant