steampipe plugin install nomad

Table: nomad_node - Query Nomad Nodes using SQL

A Nomad Node is a physical or virtual machine that has the Nomad agent running on it. It is responsible for running tasks and reporting on their status. Nodes are registered with a Nomad cluster and are managed by the server agents.

Table Usage Guide

The nomad_node table provides insights into nodes within HashiCorp Nomad. As a DevOps engineer, explore node-specific details through this table, including status, resources, and associated metadata. Utilize it to uncover information about nodes, such as their availability, resource utilization, and the tasks they are running.

Examples

Basic info

Explore the status and configuration of nodes within your network to understand their performance and identify any potential issues. This can help in maintaining optimal network performance and preemptively addressing any problems.

select
name,
id,
node_class,
drain,
status,
datacenter,
cgroup_parent
from
nomad_node;
select
name,
id,
node_class,
drain,
status,
datacenter,
cgroup_parent
from
nomad_node;

List nodes with drain enabled

Uncover the details of nodes that have the drain feature enabled. This is particularly useful for identifying nodes that are temporarily not accepting any new allocations, which can aid in resource management and troubleshooting.

select
name,
id,
node_class,
status,
datacenter,
cgroup_parent
from
nomad_node
where
drain;
select
name,
id,
node_class,
status,
datacenter,
cgroup_parent
from
nomad_node
where
drain = 1;

List nodes which are not ready

Determine the areas in which nodes are not yet ready for operation. This is beneficial for identifying potential issues in your network and addressing them proactively to avoid disruptions.

select
name,
id,
node_class,
status,
datacenter,
cgroup_parent
from
nomad_node
where
status <> 'ready';
select
name,
id,
node_class,
status,
datacenter,
cgroup_parent
from
nomad_node
where
status != 'ready';

List nodes with TLS disabled

Discover the segments that have Transport Layer Security (TLS) disabled in your network. This is essential to identify potential security vulnerabilities and ensure all nodes in your network are secure.

select
name,
id,
node_class,
status,
datacenter,
cgroup_parent
from
nomad_node
where
not tls_enabled;
select
name,
id,
node_class,
status,
datacenter,
cgroup_parent
from
nomad_node
where
tls_enabled = 0;

List nodes which are eligible for scheduling

Discover the segments that are eligible for scheduling in a data center, allowing you to better manage resource allocation and workload distribution. This can help you optimize performance and ensure the smooth operation of your systems.

select
name,
id,
node_class,
status,
datacenter,
cgroup_parent
from
nomad_node
where
scheduling_eligibility = 'eligible';
select
name,
id,
node_class,
status,
datacenter,
cgroup_parent
from
nomad_node
where
scheduling_eligibility = 'eligible';

Schema for nomad_node

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
attributesjsonbA map containing user-defined attributes associated with the node.
cgroup_parenttextA string specifying the parent cgroup for the node.
create_indexbigint=An unsigned 64-bit integer representing the index at which the node was created.
csi_controller_pluginsjsonbA map containing information about the CSI controller plugins installed on the node.
csi_node_pluginsjsonbA map containing information about the CSI node plugins installed on the node.
datacentertextA string specifying the datacenter in which the node is located.
drainbooleanA boolean value indicating whether the node is currently being drained.
drain_strategyjsonbRepresents the strategy used for draining the node.
driversjsonbA map containing information about the drivers installed on the node.
eventsjsonbRepresents events associated with the node.
host_networksjsonbA map containing information about the networks attached to the node.
host_volumesjsonbA map containing information about the volumes attached to the node.
http_addresstextA string specifying the HTTP address of the node.
idtext=A string representing the unique identifier of the node.
last_drainjsonbRepresents the metadata for the last drain operation performed on the node.
linksjsonbA map containing links to related resources associated with the node.
metajsonbA map containing additional metadata associated with the node.
modify_indexbigintAn unsigned 64-bit integer representing the index at which the node was last modified.
nametext=A string representing the name of the node.
node_classtextA string specifying the class of the node.
node_resourcesjsonbRepresents the resources allocated to the node.
reservedjsonbRepresents the reserved resources on the node.
reserved_resourcesjsonbRepresents the reserved resources on the node.
resourcesjsonbRepresents the total resources available on the node.
scheduling_eligibilitytextA string specifying the node's scheduling eligibility.
statustextA string representing the current status of the node.
status_descriptiontextA string providing a description of the node's current status.
status_updated_attimestamp with time zoneAn integer representing the timestamp at which the node's status was last updated.
titletextThe title of the node.
tls_enabledbooleanA boolean value indicating whether TLS is enabled for the node.

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_node