Hello, i want to implement alerting for Bigquery quota query usage per day per user. As the quota is per user level and not project level, no alerting options were available on the quota page. I tried to look for the documentation but i still can't find it. Can someone help me with this?
Thanks
Monitoring and alerting for BigQuery quota usage at the per-user level in Google Cloud presents a challenge, as the platform's quota management and alerting are primarily designed for the project level. However, a custom solution can be implemented using BigQuery Audit Logs, which record detailed information about query execution, including the user responsible.
By exporting these logs to a data warehouse or logging platform, custom queries and dashboards can be created to monitor per-user query usage. Setting thresholds on these metrics enables actionable alerts when specific usage levels are reached. While effective, this approach necessitates technical expertise in log management and querying.
Furthermore, custom metrics can be created in Cloud Monitoring based on the audit logs. This involves extracting, transforming, and loading relevant data to track per-user usage, subsequently setting up alerts within Cloud Monitoring. Although powerful, this solution introduces complexity in data processing and maintenance.
It's crucial to consider the potential costs of exporting and storing audit logs, especially in high-query environments. Additionally, data latency might affect the timeliness of alerts.
While Google Cloud lacks built-in alerting for per-user BigQuery quota usage, custom solutions leveraging audit logs and Cloud Monitoring can effectively bridge this gap. Careful management of costs and complexity empowers organizations to create a tailored monitoring and alerting system.
Hi @theoyp,
Welcome to the Google Cloud Community!
In addition to @ms4446's response, you might want to monitor this feature request concerning the implementation of query usage per day per user alert. For the most recent updates and developments, don’t forget to review the BigQuery release notes as well.
I hope the above information is helpful.