Is it possible to forecast automatically in Machine Learning module?

Hi Team,
Kindly let me know if I can do forecast automatically from Machine Learning module in Kibana UI? I already created a ML Job and data feed it real time. Now, I want to forecast it but not manually. For example, I need to run forecast for 1 day at 07:00 in the morning and then in the next morning at the same time, I will run it again for 1 day. This process will repeat every day and it is hard to do it manually. Is it possible to run forecast automatically using Kibana UI?

Kibana and Elastic version: 6.6.2

Hallward Bagus

The forecasting can be automated using the _forecast API:

(You will have to construct your own automation script/cron job)

Notice that each invocation of the _forecast returns a forecast_id that one can reference on a subsequent query to the .ml-anomalies-* index.

The steps would look something like:

POST _xpack/ml/anomaly_detectors/a_forecast_example/_open 

POST _xpack/ml/anomaly_detectors/a_forecast_example/_forecast
    "duration": "1d"

GET .ml-anomalies-*/_search
    "query": {
      "bool": {
        "filter": [
          {"term": {"forecast_id": "pfVYBGsBvI8wQ5-C3xC9"}},
          {"term": {"result_type": "model_forecast"}},
          {"term": {"job_id": "a_forecast_example"}}
} }

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