I want to create an alert in my project in GCP that lets me know when a new user or service account is added to the project. I understand I need to use Logs Explorer and run a query but I am not sure what query to run.
Thanks!
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityYou would need to create a log-based metric for the api call for the operations you're interested in. In this case, for example, for service account creation:
https://cloud.google.com/iam/docs/reference/rest/v1/projects.serviceAccounts
You could create a metric to look for any operations that create, update etc.