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:
@@ -0,0 +1 @@
|
||||
* Added better documentation around how the --label flag works in the fleetctl query command.
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user