logginggoogle-cloud-platformgcloudstackdrivergoogle-cloud-stackdriver

Show size of logs in Google Cloud Platform


I want to know the size of my project's logs so I can delete the biggest ones.

With gcloud logging logs list I can list all my project's logs. However, there is no size displayed.

How can I list the size of my project's logs with gcloud or the Google Cloud Console?


Solution

  • You can view the total size of your logs by looking under the "Ingested (MTD)" tab at the Logs Ingestion page of Stackdriver Logging in the Cloud Console. The logs will be sorted by size by clicking on it.

    If you wish, you can exclude a specific log (exclusion query) or resource type from ingestion to minimize charges, as documented here and here respectively. Remember, however, that you are given a free log allotment of 50 GiB per month.