Is there a dashboard to display topic size, etc

883 views
Skip to first unread message

Mike Sparr

unread,
Sep 12, 2018, 8:21:53 AM9/12/18
to Google Cloud Pub/Sub Discussions
In the Cloud Admin Console, for the PubSub section, I see a list of topics and a count of the number of subscribers. Is there another view somewhere that shows the message count in each topic? Even better, something that allows visualizing message rates, etc. and ability to manage a topic (i.e. purge, peek, etc.)

Thanks!

Alex Mordkovich

unread,
Sep 12, 2018, 11:47:47 AM9/12/18
to mi...@goomzee.com, Google Cloud Pub/Sub Discussions
Hi Mike,
Users can monitor their topics and subscriptions (via graphs and charts) as described at https://cloud.google.com/pubsub/docs/monitoring. In particular, see the metrics described at https://cloud.google.com/monitoring/api/metrics_gcp#gcp-pubsub, such as "subscription/num_undelivered_messages", which conveys the number of unacknowledged messages in a subscription's backlog.

Hope this helps,
Alex

On Wed, Sep 12, 2018 at 8:21 AM Mike Sparr <mi...@goomzee.com> wrote:
In the Cloud Admin Console, for the PubSub section, I see a list of topics and a count of the number of subscribers. Is there another view somewhere that shows the message count in each topic? Even better, something that allows visualizing message rates, etc. and ability to manage a topic (i.e. purge, peek, etc.)

Thanks!

--
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/06315708-7fad-4719-99be-22794bc68784%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Mordkovich

unread,
Sep 12, 2018, 12:09:49 PM9/12/18
to mi...@goomzee.com, Google Cloud Pub/Sub Discussions
Hi Mike,
I don't think you need to *create* a new metric; you just want to monitor the existing built-in metrics for your Pub/Sub resources. See https://cloud.google.com/monitoring/charts/#building_a_new_chart_with_metrics_explorer for how to build a chart that displays existing metrics made available by Pub/Sub.

On Wed, Sep 12, 2018 at 12:06 PM Mike Sparr <mi...@goomzee.com> wrote:
I've tried selecting either the cloud function that subscribes to the topic, or the topic itself, and eliminating the "subscription" part and just using "num_undelivered_messages" and nothing works. 




On Wed, Sep 12, 2018 at 10:02 AM, Mike Sparr <mi...@goomzee.com> wrote:
Is there a step-by-step on how to set that up exactly?

I clicked on "Log based metrics", then "Create new metric" and tried typing in "subscription/num_undelivered_messages"  in the input box and filtering the last 7 days and 0 results. I've certainly had messages so would expect some results. Something is missing and it's not intuitive at all which levers to select.




Mike


Alex Mordkovich

unread,
Sep 12, 2018, 2:20:00 PM9/12/18
to mi...@goomzee.com, Google Cloud Pub/Sub Discussions, Kir Titievsky
Thank you for your feedback and for contributing to the community forum!

On Wed, Sep 12, 2018 at 12:53 PM Mike Sparr <mi...@goomzee.com> wrote:
Alex, for future reference I added the exact steps and answer to the Stack Overflow question: https://stackoverflow.com/questions/35475082/google-pubsub-counting-messages-in-topic/52300057#52300057

Hopefully that will help others in the future and set an example of how to support the application for end users. I do suggest to the product team to consider built-in metrics for PubSub as that architecture is becoming more popular than ever, so it will become a deciding factor on cloud solution providers. Currently GCP is at a disadvantage in that regards compared to others, but the seamless integration with GCF triggers is special. I'd exploit that simplicity, but also give users the information they expect from any queue-like product without having a major runaround to find them.

Keep up the good work and I look forward to the Golang cloud functions official release.


On Wed, Sep 12, 2018 at 10:36 AM, Mike Sparr <mi...@goomzee.com> wrote:
Thanks Alex. That's the first useful link so far.  All answers online to date seem very presumptuous and lack the basic step-by-step instructions to solve the issue. 

It appears the answer to my question is "no" you cannot view topic message count within Google Cloud console. 

1) The only way is to navigate: GCloud Admin Console > Monitoring 

2) This will redirect/SSO to Stackdriver (separate console web application)...

3) Then create a dashboard and add metric: Dashboards > Create New Dashboard > Add Metric

4) Then type in the num_undelivered_messages and select the auto-suggested metric and "SAVE"...







Reply all
Reply to author
Forward
0 new messages