Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudSQL metrics' average value does not match : Per query execution times #227

Open
quynhnxq opened this issue May 26, 2023 · 1 comment

Comments

@quynhnxq
Copy link

Hello. I using Stackdriver Exporter version v0.13.0

  • Prometheus scrape_interval: 1m
  • Stack driver metrics interval: 1m
  • stackdriver metrics: cloudsql.googleapis.com/database/postgresql/insights/perquery/execution_time
  • Grafana unit for value: microsecond

In grafana, I used this query to get average time per query:

avg_over_time(stackdriver_cloudsql_instance_database_cloudsql_googleapis_com_database_postgresql_insights_perquery_execution_time{resource_id="$resource_id", database="$database", user="$user", client_addr="$client_addr"}[1h])

image

But the result on GCP Query Insight is different from the value from the above query. Anyone have solution for this?

image

Thanks all !

@owenhaynes
Copy link

Would say on top of this stackdriver_cloudsql_instance_database_cloudsql_googleapis_com_database_postgresql_insights_* do not work very well when monitoring.aggregate-deltas is enabled. Things like stackdriver_cloudsql_instance_database_cloudsql_googleapis_com_database_postgresql_insights_perquery_row_count do not work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants