Query and explore jobs on your Nomad clusters from the comfort of the command line.
The output is raw JSON, to facilitate integration with tooling such
as jq
.
```bash
$ nquery --pretty redis [ { "ID": "redis", "Name": "redis", "Namespace": "default", "ParameterizedJob": null, # ... "TaskGroups": [ { # ... "Tasks": [ { # ... "Meta": null, "Name": "redis", } ] } ] } ]
$ nquery --pretty --parameterized -f Meta.data-source etl [ { "ID": "etl-cluster-1" "Meta.data-source": "db-cluster-1", }, { "ID": "etl-cluster-2" "Meta.data-source": "db-cluster-2", } ]
$ nquery --parameterized -f Meta.data-source etl | jq '. | length' ```
bash
cargo install nquery
To get helpful debugging information, run nquery with the NQUERY_LOG=nquery
environment variable set.