Google states here that: MQL is no longer the recommended query language for Cloud Monitoring
https://cloud.google.com/stackdriver/docs/deprecations/mql
Therefore I am trying to convert my NetApp Volume monitor from MQL to PROMQL. I used these mappings to convert MQL to PROMQL:
https://cloud.google.com/monitoring/promql/promql-mapping
When I try to create a new alert using google's promql query editor, I get this error:
An error occurred requesting data. bad_data: invalid parameter "query": substitute queries failed: 1:7: parse error: unexpected metric identifier "netapp_googleapis_com:Volume
Here is my MQL and converted PROMQL code, what am I doing wrong?
======== current working mql NetApp Volume monitor ============
fetch netapp.googleapis.com/Volume
| {
metric 'netapp.googleapis.com/volume/bytes_used'
;
metric 'netapp.googleapis.com/volume/allocated_bytes'
} | join | div
| group_by 5m, max(val())
| every 5m
| condition val() > 80 '%'
===== converted mql to promql that gives error =================
fetch netapp_googleapis_com:Volume
| {
metric 'netapp_googleapis_com:volume_bytes_used'
;
metric 'netapp_googleapis_com:volume_allocated_bytes'
} | join | div
| group_by 5m, max(val())
| every 5m
| condition val() > 80 '%'
Solved! Go to Solution.
Hello @tacoma50 ,Welcome on Google Cloud Community.
AFAIR PromQL syntax, you should not use "fetch" when you are dealing with PromQL queries. Did you've tried something like
Hello @tacoma50 ,Welcome on Google Cloud Community.
AFAIR PromQL syntax, you should not use "fetch" when you are dealing with PromQL queries. Did you've tried something like
Hi DamianS,
I tried this PromQL code and it worked. Thanks!
Hello @tacoma50 ,
happy to help 🙂