Reputation: 161
I have a bucket which I created using Terraform. I have regular uploads on this bucket and everything is working fine. Now, I want to monitor the object count on this bucket, when I go to monitoring and select GCS Bucket and bucket name filter, it doesnt show this bucket. All other buckets are visible. Any help would be appreciated.
Upvotes: 1
Views: 933
Reputation: 142
As per monitoring documentation at storage/object_count section it is mentioned that Total number of objects per bucket, grouped by storage class. This value is measured once per day, and the value is repeated at each sampling interval throughout the day.
There is typically a delay between the time the objects were uploaded, and when the data is reported on Cloud Monitoring. Hence we need to check after 1 day when the first object was uploaded to the bucket. Manually we can list the objects by using command
gsutil ls -lR gs://$BUCKETNAME
Upvotes: 1