<p>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:</p>

<pre><code>.\sensuctl.exe dump entity --all-namespaces --format wrapped-json | jq ".metadata.name" | grep -i &lt;filtertext&gt;
</code></pre>

CC BY-SA 4.0
2020-02-03T15:35:21.457Z
2020-02-03T15:35:21.457Z
mrfreester
<p>Using sensuctl for sensu-go, I want to be able to search for entities by name, preferably using wildcards.</p>

<p>I've tried this:</p>

<p><code>.\sensuctl.exe entity list --field-selector "testfilter in entity.name"</code></p>

<p>This still shows all of the entities regardless of the name.</p>

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

<sensu>
How to filter by entity name using sensuctl?
mrfreester
# How to filter by entity name using sensuctl?

(Asked by: username_0 on 2020-01-31)

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.

**Tags:** sensu


---

## 1 answers

### Answer by username_0 on 2020-02-03. Score: 1 | Accepted answer

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


---

