— Correction —  
PromQL:
sum(rate(container_cpu_usage_seconds_total{__name__= 
“container_cpu_usage_seconds_total", namespace = "monitoring", pod_name = 
"prometheus-k8s-1" }[3m]))




> On Apr 13, 2018, at 10:43 PM, ne...@rafay.co wrote:
> 
> Hi Guys,
> I am new to influxql and I am trying to convert PromQL query to InfluxQL 
> syntax. Can anyone help me and correct it?
> 
> PromQL:
> sum(rate(container_cpu_usage_seconds_total{}[3m])) BY (namespace, pod_name)
> 
> My InfluxQL attempt:
> SELECT sum("f64") FROM "db"."default"."_" WHERE ("__name__" = 
> 'container_cpu_usage_seconds_total' AND "namespace" = 'monitoring' AND 
> "pod_name" = 'prometheus-k8s-1' AND time >= now() - 3m GROUP BY time(1s) 
> fill(null)
> 
> Thanks
> Regards
> 
> -- 
> Remember to include the version number!
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "InfluxData" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/influxdb/j-tv2cXVbsI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> influxdb+unsubscr...@googlegroups.com.
> To post to this group, send email to influxdb@googlegroups.com.
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/influxdb/d5035a9c-2fd2-47f7-8d9b-edff8964c714%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/D43A4770-67AC-4021-8F4A-5FDEAE457AEF%40rafay.co.
For more options, visit https://groups.google.com/d/optout.

Reply via email to