cortex-tools
cortex-tools copied to clipboard
analyse: consider add ability to pass --time-range (or --from, --to) flag
Currently, we can't set the default time range (window) between start and end times.
$ cortextool analyse prometheus --address http://10.10.10.10:30090 --log.level="debug"
INFO[0000] log level set to debug
cortextool: error: error querying for metric names: Get "http://10.10.10.10:30090/api/v1/label/__name__/values?end=1642510924.832703&start=1642510324.832703": dial tcp 10.10.10.10:30090: connect: operation timed out, try --help
The default duration between two times is 10 minutes: end=1642510924.832703&start=1642510324.832703
prometheusAnalyseCmd.Flag("time-range", "duration time range").
Default("10m").
DurationVar(&paCmd.timeRange)
// same for grafana and ruler?
@eminaktas @yasintahaerol