Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using additional-fields as filters ? #281

Closed
malexe3169 opened this issue Aug 14, 2023 · 4 comments
Closed

Using additional-fields as filters ? #281

malexe3169 opened this issue Aug 14, 2023 · 4 comments

Comments

@malexe3169
Copy link
Sponsor

Is it possible to use the additional-fields as filters ?

I've added the additional-field and it work I see in the data, but I am not able to filter with it.

@jasonish
Copy link
Owner

This should work, but due to escaping and what characters you choose it is possible I break something along the query path:

  • what is your custom fields name and value (or something a close approximation in terms of character set)
  • are you adding this with the agent or the server
  • elasticesearch?

@malexe3169
Copy link
Sponsor Author

malexe3169 commented Aug 15, 2023

It is added with the agent, with the evebox-agent.yaml like this:

additional-fields:
  sensor-name: "LLLL-LLL-NN"

L = Letter
N = Number

using opensearch 2.8.0

@jasonish
Copy link
Owner

jasonish commented Aug 15, 2023

Try this in the search box:

sensor-name.keyword:"AAAA-BBB-12"

I think what Elasticsearch does is analyzes/tokenizes the value and that is what you are searching against with just sensor-name, however, this often doesn't work for exact matches which the .keyword will work for. Internally EveBox has a table of fields where the keyword variant needs to be used to hide most uses of this.

@malexe3169
Copy link
Sponsor Author

it works, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants