'How to resolve "Bucket max cardinality estimate required for influencers host.name but not supplied" for machine learning job in Kibana

I'm currently setting up a machine learning job to detect rare events for host names. However I get the following error on the validation page of the job:

Job Validation Error

[Bucket max] cardinality estimate required for [influencers] [host.name] but not supplied

See the full error

This is the full error:

{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "[illegal_argument_exception: [illegal_argument_exception] Reason: [Bucket max] cardinality estimate required for [influencers] [host.name] but not supplied]: [Bucket max] cardinality estimate required for [influencers] [host.name] but not supplied",
  "attributes": {
    "body": {
      "error": {
        "root_cause": [
          {
            "type": "illegal_argument_exception",
            "reason": "[Bucket max] cardinality estimate required for [influencers] [host.name] but not supplied"
          }
        ],
        "type": "illegal_argument_exception",
        "reason": "[Bucket max] cardinality estimate required for [influencers] [host.name] but not supplied"
      },
      "status": 400
    }
  }
}

What causes this error and how can i mitigate it? Thanks for the help in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source