Filter logs in ML Job

Hello,

I'm trying to do a Job Machine Learning but I would need to the logs for a field that I created with a index script. The problem is that I can only access the fields defined in the index, but not those created. How could I access these fields to filter by them?

Hello Jesus,

I'm having a little trouble understanding what you mean by "field that I created with a index script". Are you referring to script fields?

Hi, thanks you for your reply.

I'm referring to script field that I calculate with script in index pattern. For example, with a date, I extract if the day is monday, tuesday, etc. And I will filter my logs and discard those that occurred on weekends

Ok, well, if you already have a working filter for a standard elasticsearch search, then the only thing that remains is getting an ML job to implement that search.

You have a few choices, you can either:

  1. Use the Advanced Job configuration wizard and use the Datafeed tab to put in your custom query. For example:

image

  1. Use the Advanced Job configuration wizard and use the JSON tab to put in your custom query:

image

  1. Use the datafeed API to set the custom query you want the ML job to use

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.