2

We are using Google Pub/Sub in the Google Cloud Platform.

There are many anonymous subscriptions listening to our topics. We don't know how and why they have been created.

Is there a way to find out who (e.g. which program, which host, etc.) has created a subscription?

Harold L. Brown
  • 8,423
  • 11
  • 57
  • 109
  • 1
    If you keep, or export, your Stackdriver logs, you will find who created the subscriptions and when. The "why" will be unknown. Stackdriver can give you a lot of information. If you enable audit logging even more (review pricing first). – John Hanley Oct 03 '19 at 14:01
  • @JohnHanley OK, thank you. Do you know where I can find them in the Stackdriver? – Harold L. Brown Oct 03 '19 at 14:04
  • Kamal just posted the answer about Stackdriver. – John Hanley Oct 03 '19 at 14:06

1 Answers1

6

You can look at the activity log for the project to get information about the creation of subscriptions. Under "Resource type" under "Filter," you can choose "Cloud Pub/Sub Subscription":

activity

This will bring up a list of all subscription activity. You can select "Cloud Pub/Sub Topic" to see all topic activity.

Kamal Aboul-Hosn
  • 15,111
  • 1
  • 34
  • 46
  • Just for completeness, you can also use a Stackdriver logging filter of resource.type="pubsub_subscription" to see subscription creation information. – Kolban Oct 03 '19 at 18:00