-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timestamp data type date nanoseconds causes rule to fail #156689
Comments
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
Hi, |
@ersin-erdal great that date_nanos support was integrated 👍 just wanted to ask, looking at the failure of here, are you sure this part of the code works with any data nanos value? kibana/x-pack/plugins/stack_alerts/server/rule_types/es_query/executor.ts Lines 126 to 128 in a1923c5
It's using this function under the hood: kibana/x-pack/plugins/stack_alerts/server/rule_types/es_query/executor.ts Lines 225 to 230 in a1923c5
And this implementation high can high likely cause troubles with |
Hi @kertal, |
Hi @ersin-erdal, I've upgraded a cluster to 8.7.1 and can confirm that it is working as expected. Thanks a lot :) |
I see, how do you test it? I'm getting an invalid date |
You are right, i think i copied the wrong output... |
@kertal When i create a test index with the below mappings and try to push data that has more than 13 digits to date_nanos filed i get a mapping:
data:
error:
So the data format has to be milliseconds. That's why it worked for @clwo. |
As shown in the documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/date_nanos.html date_nanos field does not take a date as nanoseconds. As the possible biggest number that we can get is milliseconds there is no need to support nanoseconds (aka BigInt) in the code. Closing the issue as the user's problem has also been solved by upgrading to 8.7. |
Kibana version:
v8.6.2
Elasticsearch version:
v8.6.2
Describe the bug:
If a es-query rule is executed against a data view containing timestamps with data type
Date nanoseconds
instead of typeDate
the rule will fail if it matches documents. If no documents are matched the rule will succeed.The following error is present in the Kibana logs:
Steps to reproduce:
Date nanoseconds
Expected behavior:
Rule execution should succeed and trigger alerts.
The text was updated successfully, but these errors were encountered: