How to fetch metrics from different Pub/Sub resource types with Google Monitoring Query Language?

116 views
Skip to first unread message

Alexandre Figura

unread,
Apr 14, 2021, 9:39:08 AM4/14/21
to Google Cloud Pub/Sub Discussions

I am trying to create an alert on Google Cloud, to be notified about Pub/Sub messages which cannot be forwarded to a dead-letter topic, using Google Monitoring Query Language.

On Google documentation, it is said:

> To verify that Pub/Sub is forwarding undeliverable messages, you can compare the subscription/dead_letter_message_count metric with the topic/send_message_operation_count metric from the topic that Pub/Sub forwards these messages to.

However, when trying to create an alert condition with the Query Editor, I get the following error:

> Metric 'pubsub.googleapis.com/topic/send_message_operation_count' is not compatible with resource 'pubsub_subscription'. Consider using the following resource(s): 'pubsub_topic'.

I am wondering then if it is possible to fetch topic and subscription metrics with the Google Monitoring Query Language, and if yes, how?

Kir Titievsky

unread,
Apr 14, 2021, 10:51:41 AM4/14/21
to Alexandre Figura, Google Cloud Pub/Sub Discussions
could you share your full query?

--
You received this message because you are subscribed to the Google Groups "Google Cloud Pub/Sub Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-pubsub-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/2cb67741-768c-429f-8681-f4556c11323bn%40googlegroups.com.


--
Kir Titievsky | Product Manager | Google Cloud Pub/Sub 
Reply all
Reply to author
Forward
0 new messages