-
Notifications
You must be signed in to change notification settings - Fork 455
[qualys_vmdr] Update data collection to get unique identifiers for each interval of ingestion #13840
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
Conversation
…o generate unique identifiers for each interval of ingestion
🚀 Benchmarks reportPackage
|
Data stream | Previous EPS | New EPS | Diff (%) | Result |
---|---|---|---|---|
user_activity |
11494.25 | 9259.26 | -2234.99 (-19.44%) | 💔 |
To see the full report comment with /test benchmark fullreport
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested commit message:
qualys_vmdr: use unique identifiers for each asset_host_detection collection interval
This will help to debug if there is any issue in data ingestion.
packages/qualys_vmdr/data_stream/asset_host_detection/agent/stream/input.yml.hbs
Outdated
Show resolved
Hide resolved
packages/qualys_vmdr/data_stream/asset_host_detection/agent/stream/input.yml.hbs
Outdated
Show resolved
Hide resolved
packages/qualys_vmdr/data_stream/asset_host_detection/agent/stream/input.yml.hbs
Outdated
Show resolved
Hide resolved
packages/qualys_vmdr/data_stream/asset_host_detection/agent/stream/input.yml.hbs
Outdated
Show resolved
Hide resolved
packages/qualys_vmdr/data_stream/asset_host_detection/agent/stream/input.yml.hbs
Outdated
Show resolved
Hide resolved
packages/qualys_vmdr/data_stream/asset_host_detection/agent/stream/input.yml.hbs
Outdated
Show resolved
Hide resolved
state.with({ | ||
?"interval_start": state.?want_more.orValue(false) ? optional.none() : optional.of(now), | ||
?"interval_id": state.?want_more.orValue(false) ? optional.none() : optional.of(uuid()), | ||
}).as(state, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that these should be always generated if they do not exist and they should not be included in the returned state in the cases that there is an error or want_more
is unset or false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should generate a UUID for the initial call when want_more
is set to false. For the remaining calls within that interval, where want_more
is true, we should not generate a new UUID but instead preserve the existing one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but what you are doing is using want_more
as a proxy for the reality. The behaviour that you describe can also be achieved by generating the UUID and storing it in state
if it is not present, and removing it from state in the case that want_more
is set to false or is remove from state
. The difference is that the latter implementation is easier to reason about and follow in logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your point and will update the PR. However, this will add a considerable amount of code since there are many instances where we set want_more: false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced that it does. If these two fields are put into a subobject, say interval
, then at the bottom of the program you can have
.as(state, state.with(state.want_more ? {"interval": {}} : {}))
or (probably nicer)
.as(state, state.want_more ? state : state.drop("interval"))
and rename the fields to interval.id
and interval.start
throughout.
packages/qualys_vmdr/data_stream/asset_host_detection/agent/stream/input.yml.hbs
Outdated
Show resolved
Hide resolved
|
💚 Build Succeeded
History
|
Package qualys_vmdr - 6.7.0 containing this change is available at https://epr.elastic.co/package/qualys_vmdr/6.7.0/ |
Proposed commit message
Checklist
changelog.yml
file.How to test this PR locally
Related issues