Jonny5
Jonny5

Reputation: 1499

PromQL in Google Cloud Monitoring produces unexpected results

Disclaimer: I'm new to PromQL, and might have constructed a query that is completely wrong. I'm using PromQL as the built-in monitoring of Google Cloud does not produce expected results (see this post).

When I use PromQL for a custom metric in Google Cloud I'm facing several issues:

I mainly want to have a sum of log-based metrics that contains a number of API hits like:

hits: 14
hits: 56
...

an interval should just show the sum of these numbers.

The query:

sum by (dag_id) (
sum_over_time(logging_googleapis_com:user_metric_sum[30m])
)

Example

Zoomed in version: Zoomed in version

Data is gone when zooming out: enter image description here

Multiple data points when zoomed in: enter image description here

Sums are wrong when zooming out (note the y-axis changing): enter image description here

Upvotes: 1

Views: 1308

Answers (0)

Related Questions