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.


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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.