# Wrong ML Job query packetbeat\_rare\_user\_agent or missing event.dataset in network traffic data?

**URL:** <https://discuss.elastic.co/t/wrong-ml-job-query-packetbeat-rare-user-agent-or-missing-event-dataset-in-network-traffic-data/377283>\
**Category:** SIEM\
**Created:** [April 18, 2025, 1:19pm UTC](https://discuss.elastic.co/t/wrong-ml-job-query-packetbeat-rare-user-agent-or-missing-event-dataset-in-network-traffic-data/377283 "2025-04-18T13:19:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![willemdh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willemdh/32/16922_2.png) [@willemdh](https://discuss.elastic.co/u/willemdh)\
**Post date:** [April 18, 2025, 1:19pm UTC](https://discuss.elastic.co/t/wrong-ml-job-query-packetbeat-rare-user-agent-or-missing-event-dataset-in-network-traffic-data/377283/1 "2025-04-18T13:19:04Z")

</div>

Hello,

The query of the managed machine learning job `packetbeat_rare_user_agent` doesn't match with any documents. It seems like `event.dataset` is not in the `logs-network_traffic.http-*` datastream?

`{"bool":{"filter":[{"term":{"agent.type":"packetbeat"}}],"should":[{"term":{"event.dataset":"http"}},{"term":{"event.dataset":"network_traffic.http"}}],"minimum_should_match":1,"must_not":[{"wildcard":{"user_agent.original":{"value":"Mozilla*"}}}]}}`

Changed the to "event.dataset" to "data\_stream.dataset" and it works.

Willem

---

<div class="post-metadata">

**Author:** ![RylandHerrick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rylandherrick/32/67401_2.png) [@RylandHerrick](https://discuss.elastic.co/u/RylandHerrick)\
**Post date:** [April 29, 2025, 6:44pm UTC](https://discuss.elastic.co/t/wrong-ml-job-query-packetbeat-rare-user-agent-or-missing-event-dataset-in-network-traffic-data/377283/2 "2025-04-29T18:44:27Z")

</div>

@willemdh your assessment looks accurate, here: some of our newer integrations are populating `data_stream.dataset` instead of the earlier `event.dataset`, and our ML Jobs have not been updated to capture those data.

The team has filed [an issue](https://github.com/elastic/kibana/issues/219412) to track/update the ML job queries, but your workaround should also suffice in the interim: changing either the query or the data should address the issue.

---

<div class="post-metadata">

**Author:** ![willemdh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willemdh/32/16922_2.png) [@willemdh](https://discuss.elastic.co/u/willemdh)\
**Post date:** [April 29, 2025, 6:56pm UTC](https://discuss.elastic.co/t/wrong-ml-job-query-packetbeat-rare-user-agent-or-missing-event-dataset-in-network-traffic-data/377283/3 "2025-04-29T18:56:15Z")

</div>

Thanks @RylandHerrick !

---

<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:** [May 27, 2025, 6:57pm UTC](https://discuss.elastic.co/t/wrong-ml-job-query-packetbeat-rare-user-agent-or-missing-event-dataset-in-network-traffic-data/377283/4 "2025-05-27T18:57:13Z")

</div>

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