-
Notifications
You must be signed in to change notification settings - Fork 469
[zscaler_zpa] Cleanup empty field from json to avoid errors #14493
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
base: main
Are you sure you want to change the base?
[zscaler_zpa] Cleanup empty field from json to avoid errors #14493
Conversation
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
packages/zscaler_zpa/data_stream/app_connector_status/elasticsearch/ingest_pipeline/default.yml
Show resolved
Hide resolved
packages/zscaler_zpa/data_stream/audit/elasticsearch/ingest_pipeline/default.yml
Show resolved
Hide resolved
packages/zscaler_zpa/data_stream/browser_access/elasticsearch/ingest_pipeline/default.yml
Show resolved
Hide resolved
packages/zscaler_zpa/data_stream/user_activity/elasticsearch/ingest_pipeline/default.yml
Show resolved
Hide resolved
packages/zscaler_zpa/data_stream/user_status/elasticsearch/ingest_pipeline/default.yml
Show resolved
Hide resolved
…onKoetting/integrations into zscaler_zpa_remove_empty_json_values
🚀 Benchmarks reportPackage
|
Data stream | Previous EPS | New EPS | Diff (%) | Result |
---|---|---|---|---|
app_connector_status |
0 | 1572.33 | 1572.33 ( - %) | 👍 |
audit |
0 | 3937.01 | 3937.01 ( - %) | 👍 |
browser_access |
0 | 1814.88 | 1814.88 ( - %) | 👍 |
user_activity |
0 | 2958.58 | 2958.58 ( - %) | 👍 |
user_status |
0 | 5847.95 | 5847.95 ( - %) | 👍 |
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 inclined to think that adding the guards on the affected processors would be a better approach rather than traversing the full document an extra time.
/test benchmark fullreport |
💚 Build Succeeded
History
|
|
Zscaler uses a template language to send logs. As a result, it's possible for a
field in the JSON we receive to exist but have an empty string as its value.
For date processors in the pipeline, this issue has already been addressed
using conditions like
ctx.json?.LogTimestamp != null && ctx.json.LogTimestamp != ''
.However, we encountered a problem with a user where a non-date field failed
to convert to an IP address due to the error message:
'' is not an IP string literal
.To prevent this from happening with any field, I propose adding a cleanup step
at the beginning of the pipeline in this PR. This would handle all empty fields
directly, allowing us to rely on the
ignore_missing
option instead of addingmultiple conditions like
[field] != null && [field] != ''
for each processor.