Table: digitalocean_volume - Query DigitalOcean Volumes using SQL
DigitalOcean Volumes are highly available and reliable storage volumes that you can attach to your DigitalOcean Droplets. Volumes are network-based block storage that provide additional data storage for your Droplets. They are independent entities that you can move between Droplets within the same datacenter.
Table Usage Guide
The digitalocean_volume
table provides insights into the storage volumes within DigitalOcean. As a DevOps engineer, explore volume-specific details through this table, including size, region, and droplet attachments. Utilize it to manage and optimize your storage resources, such as identifying unattached volumes or volumes with low utilization.
Examples
List all volumes
Explore all the storage volumes available in your DigitalOcean account to understand your current storage usage and plan for future needs. This query is useful for managing your resources effectively and avoiding potential storage shortages.
select *from digitalocean_volume;
select *from digitalocean_volume;
Get a volume by ID
Discover the details of a specific storage volume in your DigitalOcean environment using its unique ID. This can be useful for troubleshooting or auditing purposes, to understand the settings and configuration of a particular volume.
select *from digitalocean_volumewhere id = '12005676-5a92-11eb-a53a-0a58ac14663a';
select *from digitalocean_volumewhere id = '12005676-5a92-11eb-a53a-0a58ac14663a';
Volumes by region
Analyze the distribution of storage volumes across different regions to understand resource allocation and usage patterns. This can aid in identifying regions with high storage usage and help in strategic planning for resource provisioning.
select region_name, count(id), sum(size_gigabytes) as size_gigabytesfrom digitalocean_volumegroup by region_nameorder by region_name;
select region_name, count(id), sum(size_gigabytes) as size_gigabytesfrom digitalocean_volumegroup by region_nameorder by region_name;
Largest volumes
Explore which digital ocean volumes are the largest in terms of gigabytes across different regions. This can be useful for managing storage resources and identifying areas that may require capacity adjustments.
select name, region_name, size_gigabytesfrom digitalocean_volumeorder by size_gigabytes desclimit 10;
select name, region_name, size_gigabytesfrom digitalocean_volumeorder by size_gigabytes desclimit 10;
Oldest volumes
Identify the oldest storage volumes in your DigitalOcean account to assess whether they're still needed or if they can be deleted to save costs. This query helps in managing resources effectively by highlighting potential areas for cleanup and cost savings.
select name, region_name, created_atfrom digitalocean_volumeorder by created_atlimit 10;
select name, region_name, created_atfrom digitalocean_volumeorder by created_atlimit 10;
Volumes with tag "production"
Discover the segments that are tagged as 'production' within the DigitalOcean platform, allowing you to focus on areas of your business that are in active use or deployment.
select name, region_name, tagsfrom digitalocean_volumewhere tags ? 'production';
Error: SQLite does not support the '?' operator for JSON objects.
Query examples
- blockstorage_volume_1_year_count
- blockstorage_volume_24_hours_count
- blockstorage_volume_30_90_days_count
- blockstorage_volume_30_days_count
- blockstorage_volume_90_365_days_count
- blockstorage_volume_age_table
- blockstorage_volume_attached_droplets_count
- blockstorage_volume_by_droplet_attached
- blockstorage_volume_by_filesystem_type
- blockstorage_volume_by_region
- blockstorage_volume_count
- blockstorage_volume_creation_month
- blockstorage_volume_droplet_attached_count
- blockstorage_volume_filesystem_type
- blockstorage_volume_input
- blockstorage_volume_overview
- blockstorage_volume_storage
- blockstorage_volume_storage_by_filesystem_type
- blockstorage_volume_storage_creation_month
- blockstorage_volume_tags
- blockstorage_volume_total_storage
- blockstorage_volume_volume_by_region
- blockstorage_volumes_for_droplet
- droplet_attached_volumes
- droplet_droplets_for_blockstorage_volume
- network_floating_ips_for_blockstorage_volume
Schema for digitalocean_volume
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
created_at | timestamp with time zone | Time when the block storage volume was created. | |
description | text | An optional free-form text field to describe a block storage volume. | |
droplet_ids | jsonb | An array containing the IDs of the Droplets the volume is attached to. Note that at this time, a volume can only be attached to a single Droplet. | |
filesystem_label | text | The label currently applied to the filesystem. | |
filesystem_type | text | The type of filesystem currently in-use on the volume. | |
id | text | = | The unique identifier for the block storage volume. |
name | text | A human-readable name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter. | |
region_name | text | The name of the region the volume is deployed in. | |
region_slug | text | The unique slug identifier for the region the volume is deployed in. | |
size_gigabytes | bigint | The size of the block storage volume in GiB (1024^3). | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | An array of tags the volume has been tagged with | |
title | text | Title of the resource. | |
urn | text | The uniform resource name (URN) for the volume. |