-
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
Kibana alerting acts strangely when Elasticsearch and/or Kibana clocks are out of sync #87664
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
One way to get the date from Elasticsearch would be to do a call like:
Some brain dump: I was thinking this could be used on task manager startup and ensure the date returned is between the start and end of that request to Elasticsearch. Otherwise, it would mean the clocks are not in sync. This approach would only work on the node that responded and wouldn't work if ever one of the ES nodes is out of sync. For that, I was thinking this script / get ES date could be part of every task manager claim query and we can make sure the responding node has its clocks in sync with the Kibana requesting to claim tasks. |
I think we'd want to do it on every TM claim query - Kibana start up time only would miss too many cases. Although that's generally going to be too often, especially if it's an additional HTTP request. Or could we bundle this into one of our existing searches somehow as an aggregation? And this won't work if the customer disabled scripts. I'd prefer to use a I suspect we are seeing this in alerting, because most of the other parts of Kibana don't really require |
One "simple" way to fix the original issue is to not use kibana/x-pack/plugins/task_manager/server/queries/mark_available_tasks_as_claimed.ts Lines 74 to 81 in 0e118c2
It's kind of brushing the dirt under the rug. You would certainly still see weird stuff in a multi-Kibana deployment where the Kibana clocks are not in sync. But would likely fix the problem in a single Kibana deployment. |
Closing issue as it seems it would be a core issue if the clocks were out of sync and we haven't seen this happen yet. |
There is ongoing work to document that alerting requires clocks to be in sync between all Elasticsearch and Kibana instances (#81532). It would be nice to mitigate this problem and also avoid ourselves debugging such scenarios without knowing.
The text was updated successfully, but these errors were encountered: