![]() |
VOOZH | about |
Storage Management is in Preview. Request access to start monitoring your object storage.
Request AccessTo collect Google Cloud Storage metrics from your Google Cloud project, install the Google Cloud integration in Datadog. Enable Resource Collection for the project containing the buckets you want to monitor. Resource Collection allows Datadog to associate your buckets’ labels with the metrics collected through Storage Management.
Note: While you can disable specific metric namespaces, keep the Cloud Storage namespace (gcp.storage) enabled.
Enable the Storage Insights API in your Google Cloud project.
After enabling the Storage Insights API, a project-level service agent is created automatically with the following format: service-PROJECT_NUMBER@gcp-sa-storageinsights.iam.gserviceaccount.com
The service agent requires these IAM roles:
roles/storage.insightsCollectorService on the source bucket (includes storage.buckets.getObjectInsights and storage.buckets.get permissions)roles/storage.objectCreator on the destination bucket (includes the storage.objects.create permission)You can create an inventory report configuration in multiple ways. The quickest methods use the Google Cloud CLI or Terraform templates. Regardless of the method, ensure the configuration:
"bucket", "name", "project", "size", "updated", "storageClass"'\n' as the delimiter and ',' as the separator<BUCKET>/{{date}}, where <BUCKET> is the monitored bucket-nameUse the Google Cloud CLI to run the following command:
gcloud storage insights inventory-reports create <SOURCE_BUCKET_URL> \
--no-csv-header \
--display-name=datadog-storage-monitoring \
--destination=gs://<DESTINATION_BUCKET>/<SOURCE_BUCKET>/{{date}}> \
--metadata-fields=project,bucket,name,size,updated,storageClass \
--schedule-starts=<YYYY-MM-DD> \
--schedule-repeats=<DAILY|WEEKLY> \
--schedule-repeats-until=<YYYY-MM-DD>
Copy the following Terraform template, substitute the necessary arguments, and apply it in the Google Cloud project that contains your bucket.
You can allow Datadog to handle the inventory report configuration by providing the proper permissions to your service account:
roles/storageinsights.Admin roleroles/storage.insightsCollectorServiceroles/storage.ObjectViewerroles/storage.objectCreatorroles/storage.insightsCollectorServiceAlternatively, you can create a custom role specifically for Datadog with these required permissions:
storage.buckets.get
storage.objects.list
storage.buckets.getObjectInsights
storage.buckets.get
storage.objects.create
storageinsights.reportConfigs.get
storageinsights.reportConfigs.create
storageinsights.reportConfigs.list
storageinsights.reportConfigs.update
storage.objects.get
storageinsights.reportDetails.get
storageinsights.reportDetails.list
After granting the necessary permissions, Datadog can create the inventory report configuration with your setup details.
Grant Datadog permission to access and extract the generated inventory reports from Google. This permission should be on the destination bucket where the inventory reports are stored.
roles/storage.objectViewer)After completing the setup steps, fill out the post-setup form with the following required information:
To verify your setup:
If you encounter any issues or need assistance:
| |