I am trying to estimate the resource (cpu) request and limit values, for which I want to know the max cpu usage of a pod in last one month using prometheus.
I checked this question but couldn't get what i want Generating range vectors from return values in Prometheus queries
I tried this but it seems max_over_time doesn't worker over rate
max (
max_over_time(
rate(
container_cpu_usage_seconds_total[5m]
)[30d]
)
) by (pod_name)
invalid parameter 'query': parse error at char 64: range specification must be preceded by a metric selector, but follows a *promql.Call instead