1

Using sensuctl for sensu-go, I want to be able to search for entities by name, preferably using wildcards.

I've tried this:

.\sensuctl.exe entity list --field-selector "testfilter in entity.name"

This still shows all of the entities regardless of the name.

It seems that --field-selector may only be available in the licensed version and that may be why this isn't working.

mrfreester
  • 121
  • 5

1 Answers1

1

Using some shell commands in cmder to parse the json and filter the results I was able to filter the results. Here is the command:

.\sensuctl.exe dump entity --all-namespaces --format wrapped-json | jq ".metadata.name" | grep -i <filtertext>
mrfreester
  • 121
  • 5