-
Notifications
You must be signed in to change notification settings - Fork 42
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
Duplicate journey id, silently groups synthetic pings under the last journey in list #442
Comments
I understand this is by design, where the For instance, if you want to run the same monitor (e.g. From https://www.elastic.co/guide/en/beats/heartbeat/current/heartbeat-reference-yml.html:
cc @andrewvc / @vigneshshanmugam - is that right? |
Yes, that's right @paulb-elastic . Ultimately, we can only do so much to prevent ID duplication. If you run two hearbeats in two locations with the same ID and totally different tests things will be weird. Today heartbeat just lets the last configured ID (which is really just about which one is parsed most recently by the config parser) win, we also log an error. We can definitely do something about shared IDs within a suite. We could either copy the heartbeat behavior or just have heartbeat run neither journey, instead reporting an error status for that journey until fixed. Curious to hear other's preferences, but I kind of prefer the latter. Thoughts? |
Running neither probably makes it more obvious that something is wrong as they won't see any results for either. With the last wins approach, they may see results for one and think everything is ok, not waiting to see if results for the second come through (although, surfacing errors more prominently as being done for suites specifically may help make it more obvious than going hunting in log files). |
I prefer this solution over the current one, Reporting errors on both journeys would make it obvious. |
Just to explain the current heartbeat behavior, the reason heartbeat behaves that way is partially in order to have a softer fail mode in the case of a race in terms of fleet provisioning, e.g. a situation where fleet or libbeat autodiscover replaces a monitor by double adding it then removing the old one, which I sort of suspect happened in the past but was hard to conclusively prove. This constraint doesn't exist for suites, where such a thing is not possible. I propose that if we fix this, we fix this at the |
A last point, it should still be discoverable if duplicated via '--dry-run', that way the error appears in the kibana UI. |
When running synthetics locally:
|
What we've agreed on in our meeting just now:
The error will be at the top level of the response sent from the discovery phase Additional notes
Issues to make:
|
Raised elastic/kibana#123969 and elastic/kibana#123928. For 4, isn't that covered by: elastic/uptime#435 |
Since we have moved away from the discovery phase approach, This would mean the Synthetics agent would skip pushing the monitor id that got duplicated.
We can either go with the proposed approach or even early error and abort the push command if two journeys contains duplicate ids. We don't need any guards on the Kibana/Heartbeat side and the entire logic sits just on the agent alone. |
Can this be closed now with |
I guess with push this shouldn't happen as Kibana would fail to save the SO incase there is a duplicate monitor. I would like to check with @dominiqueclarke. If its not implemented on the Kibana side, we could solve this for the time being on the Synthetics agent side before uploading the monitors. |
If an id is repeated across journeys in a suite, in Uptime, all the pings of the journeys with the same id will go under the journey occurring last in order. Uptime will show only one monitor in monitors overview page, with monitor title as the title of the journey read last.
No warning/error is reported in logs.
Correct data and screenshots are shown under each ping though.
Example:
A journey script as:
Will result in Uptime showing:
Whereas the the list of pings contains pings of both monitors with correct data and screenshots:
Heartbeat version:
heartbeat version 8.1.0 (amd64), libbeat 8.1.0 [84924e9f32d018e360303714c26f754dbab34f93 built 2021-12-30 16:14:09 +0000 UTC]
Synthetics version:
1.0.0-beta.17
The text was updated successfully, but these errors were encountered: