steampipe plugin install nomad

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_id
from
nomad_volume;
select
id,
name,
clone_id,
capacity,
namespace,
provider,
plugin_id
from
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_id
from
nomad_volume
where
access_mode ->> 'mode' = 'ReadWriteOnce';
select
id,
name,
clone_id,
capacity,
namespace,
provider,
plugin_id
from
nomad_volume
where
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_id
from
nomad_volume
where
nodes_healthy > 0;
select
id,
name,
clone_id,
capacity,
namespace,
provider,
plugin_id
from
nomad_volume
where
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_id
from
nomad_volume
where
schedulable;
select
id,
name,
clone_id,
capacity,
namespace,
provider,
plugin_id
from
nomad_volume
where
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_id
from
nomad_volume
where
namespace = 'default';
select
id,
name,
clone_id,
capacity,
namespace,
provider,
plugin_id
from
nomad_volume
where
namespace = 'default';

Schema for nomad_volume

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
access_modejsonbThe access mode of the CSI volume.
allocationsjsonbThe list of combined readers and writers allocations.
attachment_modejsonbThe attachment mode of the CSI volume.
capacitybigintThe capacity of the CSI volume.
clone_idtextThe clone ID of the CSI volume.
contextjsonbThe context of the CSI volume.
controller_requiredbooleanA flag that indicates if a controller is required for the CSI volume.
controllers_expectedbigintThe expected number of controllers for the CSI volume.
controllers_healthybigintThe number of healthy controllers for the CSI volume.
create_indexbigintThe index of when the CSI volume was created.
external_idtextThe external ID of the CSI volume.
extra_keys_hcljsonbThe list of extra keys used by the hcl parser to report unexpected keys.
idtext=The unique identifier of the CSI volume.
modify_indexbigintThe index of when the CSI volume was last modified.
mount_optionsjsonbThe mount options of the CSI volume.
nametext=The name of the CSI volume.
namespacetext=The namespace of the CSI volume.
nodes_expectedbigintThe expected number of nodes for the CSI volume.
nodes_healthybigintThe number of healthy nodes for the CSI volume.
parametersjsonbThe parameters of the CSI volume.
plugin_idtextThe ID of the CSI plugin.
providertextThe provider of the CSI volume.
provider_versiontextThe version of the provider of the CSI volume.
read_allocsjsonbThe map of allocation IDs for tracking reader claim status.
requested_capabilitiesjsonbThe requested capabilities of the CSI volume.
requested_capacity_maxbigintThe maximum requested capacity of the CSI volume.
requested_capacity_minbigintThe minimum requested capacity of the CSI volume.
requested_topologiesjsonbThe topologies that were submitted as options to the storage provider at the time the volume was created.
resource_exhaustedtimestamp with time zoneThe time when the CSI volume's resource is exhausted.
schedulablebooleanA flag that indicates if all the denormalized plugin health fields are true.
secretsjsonbThe secrets of the CSI volume.
snapshot_idtextThe snapshot ID of the CSI volume.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextThe title of the volume.
topologiesjsonbThe topologies returned by the storage provider based on the RequestedTopologies and what the storage provider could support.
write_allocsjsonbThe 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