0

I want to get the contents of a Cloud Storage file through pubsub and collect it through arcsight agent

I created the service account and gave pubsub editor and storage object viewer permission,and created topic. I entered in the console :gsutil notification create -t your-topic-name -f json gs://your-bucket-name,and then I pulled message in the pubsub subscription project, but there was no bucket file content.

1 Answer 1

0

At this time, there is no way to get the contents of a Cloud Storage file into Pub/Sub directly. The Storage notifications only provide metadata about file operations within buckets. In order to put the content of the files into Pub/Sub, you would have to set up a Cloud Run job, Cloud Functions, Dataflow job, or custom application that receives the Storage notifications, reads a file when getting a OBJECT_FINALIZE message for it, and publishes the contents to a different Pub/Sub topic. However, stay tuned as we are working on features that will soon streamline this process.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your replay ,I used Cloud Run Function to created Cloud Storage trigger,and type is google.cloud.storage.object.v1.finalized,Upload a file to the Cloud Storage bucket ,File events should be sent to pub/sub,but I only saw storage transport event,not file raw event,How can I do?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.