0

I am trying to write a promql query to show the count of metrics summed up on hourly basis for current day. In my case, I have a "producer_invoked_count" metrics which is invoked per minute in my application. Would like to create a chart in grafana which shows how many times the producer was invoked in an hour for current day. So the metric query should result 60 count for each hour in a day.

I tried below query: "sum by (invoked_hour) (label_replace(ice_overage_notification_producer_invoked_count{namespace="cce-prd-app"}, "invoked_hour", "$1", "InvokedTime", "(.):(.):(.*)"))"

Result : Query results shows 60 count for each hour for previous days as well Expected : Query results shows 60 count for each hour for current day only

Query results

1

vimuth
  • 5,064
  • 33
  • 79
  • 116

0 Answers0