lpkej
lpkej

Reputation: 485

MQL: GKE metrics filter by working hours and time period

How to achieve weekly/monthly statistics within working hours (excluding night time) using Google MQL?

There is ability to select hours and days range separately using time picker widget, but I need statistics using both by setting working hours range and time period.

As mentioned in documentation using within you can specify ranges, tried testing with it:

| within d'2023/04/11 7:00', d'2023/04/12 07:00'specified
...
| within d'2023/04/11 7:00+12:00', d'2023/04/12 07:00+12:00'

But right-top corner time picker has always "priority" and the query changes does not update charts (line chart, table, etc.).

Using window with table chart

| group_by window(1w), .percentile(95)

I get somewhat data for 1 week but I want to add hours range

Latest query I have

fetch k8s_container::'kubernetes.io/container/cpu/request_utilization'
| filter resource.container_name == 'xxx'
| group_by window(1w), .percentile(95)

Upvotes: 1

Views: 293

Answers (0)

Related Questions