-
Notifications
You must be signed in to change notification settings - Fork 385
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
[New Analyzer] Elasticsearch Analyzer #876
Conversation
Hey @azgaviperr, what code did you change? What fields did you want to add to the table? Basically you need to define new fields in the python analyzer file and then adjust the template code to display the new field. If you are just looking to search on something specific you should just be able to add whatever fields you want to search on and the indices you want to search in the cortex configuration in the UI. What exactly are you looking to tweak? |
Hello @nicpenning May main trouble is that the report table is mostly empty as show in my screenshot. I suppose this is due to the field used there are not right with the one used on my ELK. My source ip field is "src_ip" butn ot sure where in the code I should change it. |
I will recommend that you start converting your fields to follow the ecs format, so you won't have to model everything around your custom fields :) |
I would push what @LaZyDK said, it will pay dividends if you can use Logstash or Elastic ingest pipelines to convert your src_ip to source.ip to match the Elastic Common Schema (ECS). But, if you did want to use custom fields then find the source ip fields in the analyzer and duplicate the code and change it to src_ip. I can give a more detailed way to do this when I get to a computer. |
You would need to add this at 274:
I didn't test but that should be close. But again, you are way better off to convert that that field on ingest from src_ip to source.ip ( [source][ip] ). Because I have the feeling you will need to do the same for destination ip, domain, etc.. ECS is worth every minute of understanding and using. If one does make those changes above then they should show up in the analyzer report under the Source IP column since we mapped that field to the source_ip variable. If you wanted to create it's own column for src_ip you could do that by adding a table header and body on lines 124 and 169 in the html template as such:
I am sure the creator of this analyzer will be able to validate these claims :D |
Thanks a lot for those info. I am going to move for ECS, but got a lot to do to translate all I got old style if I must say :) . |
@nmprokop thanks for this PR!
What I noticed:
But for the v.1.0 I think it is already usable as is. |
Query any ElasticSearch cluster or multiple clusters for any field and any index and return common fields that use the ElasticSearch Common Schema (ECS)
#841