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_versionfrom nomad_deployment;
select id, namespace, status, is_multiregion, job_id, job_versionfrom 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_versionfrom nomad_deploymentwhere status <> 'running';
select id, namespace, status, is_multiregion, job_id, job_versionfrom nomad_deploymentwhere 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_versionfrom nomad_deploymentwhere is_multiregion;
select id, namespace, status, is_multiregion, job_id, job_versionfrom nomad_deploymentwhere 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_groupsfrom nomad_deployment;
select id, namespace, status, is_multiregion, task_groupsfrom nomad_deployment;
Schema for nomad_deployment
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
create_index | bigint | = | Create index of the deployment. |
id | text | = | Generated UUID for the deployment. |
is_multiregion | boolean | Specifies if this deployment is part of a multi-region deployment. | |
job_create_index | bigint | Create index of the job which the deployment is tracking. | |
job_id | text | = | Job the deployment is created for. |
job_modify_index | bigint | Modify index of the job which the deployment is tracking. | |
job_spec_modify_index | bigint | Job modify index of the job which the deployment is tracking. | |
job_version | text | Version of the job at which the deployment is tracking. | |
modify_index | bigint | Modify index of the deployment. | |
namespace | text | = | Namespace the deployment is created in. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | Status of the deployment. | |
status_description | text | Human-readable description of the deployment status. | |
task_groups | jsonb | Set of task groups effected by the deployment and their current deployment status. | |
title | text | The 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