Better documentation in fleetctl query command for label flag (#24556)

# Checklist for submitter

https://github.com/fleetdm/fleet/issues/23880

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
This commit is contained in:
Konstantin Sykulev
2024-12-09 12:47:52 -06:00
committed by GitHub
parent 7aef48ccb1
commit ed2e6dffdf
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
* Added better documentation around how the --label flag works in the fleetctl query command.
+7 -1
View File
@@ -24,6 +24,12 @@ func queryCommand() *cli.Command {
Name: "query",
Usage: "Run a live query",
UsageText: `fleetctl query [options]`,
Description: `Runs the specified query as a live query on the specified targets.
Using the --hosts flag individual hosts can be specified with the host's hostname. Groups of hosts can
specified by using labels. Note if both the --hosts and --labels flags are specified, the query will
be run on the union of the hosts and hosts with matching labels.
`,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "hosts",
@@ -37,7 +43,7 @@ func queryCommand() *cli.Command {
EnvVars: []string{"LABELS"},
Value: "",
Destination: &flLabels,
Usage: "Comma-separated label names to target",
Usage: "Comma-separated label names to target. Hosts with any of the labels will be targeted.",
},
&cli.BoolFlag{
Name: "quiet",