Table: nomad_volume - Query Nomad Volumes using SQL
Nomad is a workload orchestrator that enables the deployment and management of applications across a fleet of servers, providing features like service discovery, global deployments, and horizontal scalability. One of its resources is the Nomad Volume, which is a logical unit of storage provisioned from a storage provider in the cluster. The Nomad Volume holds data that can be accessed by applications running within the Nomad cluster.
Table Usage Guide
The nomad_volume
table provides insights into the volumes within the Nomad orchestration system. As a systems administrator or DevOps engineer, you can explore volume-specific details through this table, including configuration parameters, usage statistics, and associated metadata. Utilize it to uncover information about volume allocation, such as which tasks are using a volume, the current state of the volume, and the verification of volume configurations.
Examples
Basic info
Explore the fundamental details of your storage volumes, such as their identification, capacity, and associated provider, to better understand and manage your resources. This information can be particularly useful for identifying capacity issues or for tracking volumes across different providers.
select id, name, clone_id, capacity, namespace, provider, plugin_idfrom nomad_volume;
select id, name, clone_id, capacity, namespace, provider, plugin_idfrom nomad_volume;
List volumes with access mode set to ReadWriteOnce
Explore which volumes have their access mode set to 'ReadWriteOnce'. This can be useful for managing data accessibility and ensuring specific volumes are not simultaneously written by multiple users.
select id, name, clone_id, capacity, namespace, provider, plugin_idfrom nomad_volumewhere access_mode ->> 'mode' = 'ReadWriteOnce';
select id, name, clone_id, capacity, namespace, provider, plugin_idfrom nomad_volumewhere json_extract(access_mode, '$.mode') = 'ReadWriteOnce';
List volumes with at least one healthy node
Explore which volumes in your system are functioning optimally by identifying those with at least one healthy node. This can be beneficial for system maintenance and troubleshooting.
select id, name, clone_id, capacity, namespace, provider, plugin_idfrom nomad_volumewhere nodes_healthy > 0;
select id, name, clone_id, capacity, namespace, provider, plugin_idfrom nomad_volumewhere nodes_healthy > 0;
List schedulable volumes
Discover the volumes that can be scheduled for tasks, helping in managing and optimizing resource allocation. This can be particularly useful in understanding and maximizing the utilization of your storage resources.
select id, name, clone_id, capacity, namespace, provider, plugin_idfrom nomad_volumewhere schedulable;
select id, name, clone_id, capacity, namespace, provider, plugin_idfrom nomad_volumewhere schedulable = 1;
List volumes present in default namespace
Explore the storage volumes present within the default operational space. This is useful for understanding the current storage usage and capacity management within your default namespace.
select id, name, clone_id, capacity, namespace, provider, plugin_idfrom nomad_volumewhere namespace = 'default';
select id, name, clone_id, capacity, namespace, provider, plugin_idfrom nomad_volumewhere namespace = 'default';
Schema for nomad_volume
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
access_mode | jsonb | The access mode of the CSI volume. | |
allocations | jsonb | The list of combined readers and writers allocations. | |
attachment_mode | jsonb | The attachment mode of the CSI volume. | |
capacity | bigint | The capacity of the CSI volume. | |
clone_id | text | The clone ID of the CSI volume. | |
context | jsonb | The context of the CSI volume. | |
controller_required | boolean | A flag that indicates if a controller is required for the CSI volume. | |
controllers_expected | bigint | The expected number of controllers for the CSI volume. | |
controllers_healthy | bigint | The number of healthy controllers for the CSI volume. | |
create_index | bigint | The index of when the CSI volume was created. | |
external_id | text | The external ID of the CSI volume. | |
extra_keys_hcl | jsonb | The list of extra keys used by the hcl parser to report unexpected keys. | |
id | text | = | The unique identifier of the CSI volume. |
modify_index | bigint | The index of when the CSI volume was last modified. | |
mount_options | jsonb | The mount options of the CSI volume. | |
name | text | = | The name of the CSI volume. |
namespace | text | = | The namespace of the CSI volume. |
nodes_expected | bigint | The expected number of nodes for the CSI volume. | |
nodes_healthy | bigint | The number of healthy nodes for the CSI volume. | |
parameters | jsonb | The parameters of the CSI volume. | |
plugin_id | text | The ID of the CSI plugin. | |
provider | text | The provider of the CSI volume. | |
provider_version | text | The version of the provider of the CSI volume. | |
read_allocs | jsonb | The map of allocation IDs for tracking reader claim status. | |
requested_capabilities | jsonb | The requested capabilities of the CSI volume. | |
requested_capacity_max | bigint | The maximum requested capacity of the CSI volume. | |
requested_capacity_min | bigint | The minimum requested capacity of the CSI volume. | |
requested_topologies | jsonb | The topologies that were submitted as options to the storage provider at the time the volume was created. | |
resource_exhausted | timestamp with time zone | The time when the CSI volume's resource is exhausted. | |
schedulable | boolean | A flag that indicates if all the denormalized plugin health fields are true. | |
secrets | jsonb | The secrets of the CSI volume. | |
snapshot_id | text | The snapshot ID of the CSI volume. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | The title of the volume. | |
topologies | jsonb | The topologies returned by the storage provider based on the RequestedTopologies and what the storage provider could support. | |
write_allocs | jsonb | The map of allocation IDs for tracking writer claim status. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- nomad
You can pass the configuration to the command with the --config
argument:
steampipe_export_nomad --config '<your_config>' nomad_volume