Skip to content

How to shorten the collecting interval(resolution) ? #1483

Open
@Alex-Kil

Description

@Alex-Kil

Hi,

FAQ.md says that minumum metric-resolution calculated by Kubelet is 15s.
And Metrics server source code is like below:

func (o Options) validate() []error {
errors := []error{}
if o.MetricResolution < 10
time.Second {
errors = append(errors, fmt.Errorf("metric-resolution should be a time duration at least 10s, but value %v provided", o.MetricResolution))
}
if o.MetricResolution*9/10 < o.KubeletClient.KubeletRequestTimeout {
errors = append(errors, fmt.Errorf("metric-resolution should be larger than kubelet-request-timeout, but metric-resolution value %v kubelet-request-timeout value %v provided", o.MetricResolution, o.KubeletClient.KubeletRequestTimeout))
}
return errors
}

I want to shorten the resolution interval so that I can catch the min/max of CPU/Memory usage per pod because the resource usages are fluctuating very fast so 15s resolution maybe miss the peak point.
Do I have to collect /metrics/resources directly from endpoint ? Or is there any other solution ?

Thanks,
Alex

Metadata

Metadata

Assignees

Labels

kind/supportCategorizes issue or PR as a support question.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions