[Kibana][Machine learning]Custom Rule

When I use Machine learning , I need write myself rule , I just see the conditions is number,I need the time range , how can I use by conditions.

@hyhong

You can specify a time range by supplying the time as Seconds since the Epoch and setting applies_to: time

Example, applies the rule according to the time field where it is after than October 30, 2018 1:32:20 PM

"conditions": [
   {
      "applies_to": "time",
      "operator": "gt",
      "value": 1540906340
   }
]

While the above is true, this is typically not the way that people ignore time periods. More common ways are to:

  1. control the start/stop time of the datafeed: https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html

  2. defining calendar events to have the job ignore time periods: https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html

Thanks,but the time range is change.For example,from 00:00 to 09:00 every day.

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