# Detector field "clientIP.keyword" is not an aggregatable field

**URL:** <https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [March 7, 2021, 8:36am UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465 "2021-03-07T08:36:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ingram\_Gultom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ingram_gultom/32/56569_2.png) [@Ingram\_Gultom](https://discuss.elastic.co/u/Ingram_Gultom)\
**Post date:** [March 7, 2021, 8:36am UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465/1 "2021-03-07T08:36:20Z")

</div>

Hello,

Stack version : 7.9.3

I found issue when I tried to create a machine learning job in kibana

The error : Detector field "clientIP.keyword" is not an aggregatable field

The data looks like this in kibana

```auto
{
  "_index": "sample-dns-2021.03.07",
  "_type": "_doc",
  "_id": "71HPC3gBgsMd4G48HpLZ",
  "_version": 1,
  "_score": null,
  "_source": {
    "service": "tmm",
    "requestLn": 45,
    "origin": "CACHE",
    "location": "AS ID Nama Kota ",
    "questionName": "time-a.timefreq.bldrdoc.gov",
    "answer": "{time-a.timefreq.bldrdoc.gov.\t295\tIN\tCNAME\ttime-a-b.nist.gov }",
    "response": "DNS_RESPONSE",
    "rulePath": "/Common/log_dns_query_2",
    "clientIP": "103.124.89.250",
    "clientDescription": "Testing only",
    "queryTime": 0,
    "responseLn": 119,
    "@timestamp": "2021-03-07T08:30:26.504Z",
    "pid": "27589",
    "listener": "1.1.1.1",
    "host": "192.68.1.1",
    "message": "xxx",
    "@version": "1",
    "logLevel": "info",
    "questionType": "AAAA",
    "deviceTimestamp": "Mar 7 15:30:26",
    "deviceHostname": "GTM Bla Bla"
  },
  "fields": {
    "@timestamp": [
      "2021-03-07T08:30:26.504Z"
    ]
  },
  "sort": [
    1615105826504
  ]
}

```

Is there something wrong with field ClientIP that make it not aggregatable? I already using this field in my visualization and it works just fine.

Thank you

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 7, 2021, 9:32am UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465/2 "2021-03-07T09:32:50Z")

</div>

What's the mapping?

---

<div class="post-metadata">

**Author:** ![Ingram\_Gultom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ingram_gultom/32/56569_2.png) [@Ingram\_Gultom](https://discuss.elastic.co/u/Ingram_Gultom)\
**Post date:** [March 7, 2021, 9:50am UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465/3 "2021-03-07T09:50:15Z")

</div>

Here is the mapping

```auto
{
  "sample-dns-2021.03.07" : {
    "mappings" : {
      "properties" : {
        "@timestamp" : {
          "type" : "date"
        },
        "@version" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "answer" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "clientDescription" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "clientIP" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "host" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "ldns" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "listener" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "location" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "port" : {
          "type" : "long"
        },
        "queryTime" : {
          "type" : "long"
        },
        "questionName" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "questionType" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "request" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "request1" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "request2" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "requestLn" : {
          "type" : "integer",
          "ignore_malformed" : false,
          "coerce" : true
        },
        "requestMethod" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "response" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "responseCode" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "responseLn" : {
          "type" : "integer",
          "ignore_malformed" : false,
          "coerce" : true
        },
        "tags" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "version" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 7, 2021, 10:21am UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465/4 "2021-03-07T10:21:43Z")

</div>

Why `clientIP` is not a IP datatype?

I believe that it would be better to make it an IP.

Not sure if that will answer though.

Same for `host` and `listener` BTW.

---

<div class="post-metadata">

**Author:** ![Ingram\_Gultom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ingram_gultom/32/56569_2.png) [@Ingram\_Gultom](https://discuss.elastic.co/u/Ingram_Gultom)\
**Post date:** [March 7, 2021, 2:04pm UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465/5 "2021-03-07T14:04:30Z")

</div>

Yes it doesnt help

What I dont understand I can create machine learning job with my other index

---

<div class="post-metadata">

**Author:** ![Ingram\_Gultom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ingram_gultom/32/56569_2.png) [@Ingram\_Gultom](https://discuss.elastic.co/u/Ingram_Gultom)\
**Post date:** [March 7, 2021, 2:07pm UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465/6 "2021-03-07T14:07:22Z")

</div>

Here is the mapping of my other index

The detector field is source and contain also ip address

```auto
{
  "msrouter-2021.01.18" : {
    "mappings" : {
      "properties" : {
        
        "deviceHostname" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "deviceMessage" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "deviceVendor" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "facility" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "facilityMnemonic" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "host" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "logLevel" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "message" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "reason" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "source" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "tags" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        },
        "user" : {
          "type" : "text",
          "fields" : {
            "keyword" : {
              "type" : "keyword",
              "ignore_above" : 256
            }
          }
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 7, 2021, 4:56pm UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465/7 "2021-03-07T16:56:49Z")

</div>

I don't understand either. May be someone from the machine learning team could help?

---

<div class="post-metadata">

**Author:** ![Tom\_Veasey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tom_veasey/32/47095_2.png) [@Tom\_Veasey](https://discuss.elastic.co/u/Tom_Veasey)\
**Post date:** [March 8, 2021, 9:26am UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465/8 "2021-03-08T09:26:12Z")

</div>

First you need to check for consistent mappings across _every_ index which matches the pattern used in the data feed; if you are using wildcards check there aren't different mappings for `clientIP.keyword` in some indices. However, note that this error message can be misleadingly reported for other reasons. See [this](https://github.com/elastic/kibana/issues/67789) issue.

---

<div class="post-metadata">

**Author:** ![Ingram\_Gultom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ingram_gultom/32/56569_2.png) [@Ingram\_Gultom](https://discuss.elastic.co/u/Ingram_Gultom)\
**Post date:** [March 8, 2021, 10:07am UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465/9 "2021-03-08T10:07:00Z")

</div>

Yes looks like misleading error

I can create the job using ML APIs now

Thanks for the info

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 5, 2021, 10:07am UTC](https://discuss.elastic.co/t/detector-field-clientip-keyword-is-not-an-aggregatable-field/266465/10 "2021-04-05T10:07:58Z")

</div>

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