steampipe plugin install nomad

Table: nomad_deployment - Query Nomad Deployments using SQL

Nomad is a flexible workload orchestrator designed to deploy, manage, and scale containerized and non-containerized applications. Deployments in Nomad represent a series of actions to be taken on a particular job version to transition it from a previous job version. It provides details about the status, configuration, and progress of a deployment.

Table Usage Guide

The nomad_deployment table provides insights into deployments within Nomad. As a DevOps engineer, explore deployment-specific details through this table, including status, configuration, and progress. Utilize it to uncover information about deployments, such as their current state, the job version they are associated with, and the tasks involved in the deployment.

Examples

Basic info

Explore the status and version details of various jobs within a deployment to assess their performance and identify any potential issues. This can be useful for maintaining efficiency and troubleshooting in multi-region deployments.

select
id,
namespace,
status,
is_multiregion,
job_id,
job_version
from
nomad_deployment;
select
id,
namespace,
status,
is_multiregion,
job_id,
job_version
from
nomad_deployment;

List deployments which are not running

Explore which deployments are not currently active. This can be useful in identifying potential issues or inefficiencies within your system.

select
id,
namespace,
status,
is_multiregion,
job_id,
job_version
from
nomad_deployment
where
status <> 'running';
select
id,
namespace,
status,
is_multiregion,
job_id,
job_version
from
nomad_deployment
where
status != 'running';

List multi region deployments

Discover the segments that have multiple region deployments to better understand and manage your distributed resources. This can help in identifying potential areas for optimization and risk mitigation.

select
id,
namespace,
status,
is_multiregion,
job_id,
job_version
from
nomad_deployment
where
is_multiregion;
select
id,
namespace,
status,
is_multiregion,
job_id,
job_version
from
nomad_deployment
where
is_multiregion;

Show task group details of the deployments

Explore the status and configuration of deployments, including whether they span multiple regions. This can be useful for understanding the complexity and reach of your deployments.

select
id,
namespace,
status,
is_multiregion,
jsonb_pretty(task_groups) as task_groups
from
nomad_deployment;
select
id,
namespace,
status,
is_multiregion,
task_groups
from
nomad_deployment;

Schema for nomad_deployment

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
create_indexbigint=Create index of the deployment.
idtext=Generated UUID for the deployment.
is_multiregionbooleanSpecifies if this deployment is part of a multi-region deployment.
job_create_indexbigintCreate index of the job which the deployment is tracking.
job_idtext=Job the deployment is created for.
job_modify_indexbigintModify index of the job which the deployment is tracking.
job_spec_modify_indexbigintJob modify index of the job which the deployment is tracking.
job_versiontextVersion of the job at which the deployment is tracking.
modify_indexbigintModify index of the deployment.
namespacetext=Namespace the deployment is created in.
statustextStatus of the deployment.
status_descriptiontextHuman-readable description of the deployment status.
task_groupsjsonbSet of task groups effected by the deployment and their current deployment status.
titletextThe title of the deployment.

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_deployment