Ram
Ram

Reputation: 1

Email Alert when a specific file is available in GCP bucket

I need to get an email alert to my email when a specific file in GCP bucket is arrived/available. Which functionality/tool i can use in GCP.

Upvotes: 0

Views: 1134

Answers (2)

Romin
Romin

Reputation: 8806

You can look at the following approach:

Upvotes: 1

guillaume blaquiere
guillaume blaquiere

Reputation: 75715

@Romin solution will work, you can also have a look to Eventarc and Cloud Run.

However, you can use a hack fully managed by Google Cloud.

Firstly, activate the Cloud Storage Audit Logs (be careful, if you have a lot of activity, it can generate a lot of logs and be costly).

Then, create a log based metrics on the audit logs that mentionned the file creation and with the filter on the file path (you can use the =~ operator for regex filtering)

Finally, create an alert on that metrics, and send an email when the alert is triggered

Upvotes: 0

Related Questions