2021-05-03 14:57:26 +00:00
|
|
|
// Package flags contains all configuration runtime flags for
|
|
|
|
// the client-stats daemon.
|
|
|
|
package flags
|
|
|
|
|
|
|
|
import (
|
2021-06-02 19:47:47 +00:00
|
|
|
"time"
|
|
|
|
|
2021-05-03 14:57:26 +00:00
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2021-05-13 06:29:14 +00:00
|
|
|
// ValidatorMetricsURLFlag defines a flag for the URL to the validator /metrics prometheus endpoint to scrape.
|
2021-05-03 14:57:26 +00:00
|
|
|
ValidatorMetricsURLFlag = &cli.StringFlag{
|
|
|
|
Name: "validator-metrics-url",
|
|
|
|
Usage: "Full URL to the validator /metrics prometheus endpoint to scrape. eg http://localhost:8081/metrics",
|
|
|
|
}
|
2021-05-13 06:29:14 +00:00
|
|
|
// BeaconnodeMetricsURLFlag defines a flag for the URL to the beacon-node /metrics prometheus endpoint to scraps.
|
2021-05-03 14:57:26 +00:00
|
|
|
BeaconnodeMetricsURLFlag = &cli.StringFlag{
|
|
|
|
Name: "beacon-node-metrics-url",
|
|
|
|
Usage: "Full URL to the beacon-node /metrics prometheus endpoint to scrape. eg http://localhost:8080/metrics",
|
|
|
|
}
|
2021-05-13 06:29:14 +00:00
|
|
|
// ClientStatsAPIURLFlag defines a flag for the URL to the client stats endpoint where collected metrics should be sent.
|
2021-05-03 14:57:26 +00:00
|
|
|
ClientStatsAPIURLFlag = &cli.StringFlag{
|
|
|
|
Name: "clientstats-api-url",
|
|
|
|
Usage: "Full URL to the client stats endpoint where collected metrics should be sent.",
|
|
|
|
}
|
2021-05-13 06:29:14 +00:00
|
|
|
// ScrapeIntervalFlag defines a flag for the frequency of scraping.
|
2021-05-03 14:57:26 +00:00
|
|
|
ScrapeIntervalFlag = &cli.DurationFlag{
|
|
|
|
Name: "scrape-interval",
|
2021-06-02 19:47:47 +00:00
|
|
|
Usage: "Frequency of scraping expressed as a duration, eg 2m or 1m5s.",
|
|
|
|
Value: 60 * time.Second,
|
2021-05-03 14:57:26 +00:00
|
|
|
}
|
|
|
|
)
|