-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Filebeat module sophos, add null safety check and support for an additional timestamp field. #27834
Filebeat module sophos, add null safety check and support for an additional timestamp field. #27834
Conversation
Fix for missing sent_pkts elastic#27833
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
This pull request is now in conflicts. Could you fix it? 🙏
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
…tional timestamp field. (#27834) Sophos Version 18.5 sends sophos.xg.timestamp field. Closes #27833 Co-authored-by: Adrian Serrano <[email protected]> (cherry picked from commit 0741d0a)
…tional timestamp field. (#27834) Sophos Version 18.5 sends sophos.xg.timestamp field. Closes #27833 Co-authored-by: Adrian Serrano <[email protected]> (cherry picked from commit 0741d0a)
…tional timestamp field. (#27834) (#28019) Sophos Version 18.5 sends sophos.xg.timestamp field. Closes #27833 (cherry picked from commit 0741d0a) Co-authored-by: Philipp Kahr <[email protected]> Co-authored-by: Adrian Serrano <[email protected]>
…tional timestamp field. (#27834) (#28020) Sophos Version 18.5 sends sophos.xg.timestamp field. Closes #27833 (cherry picked from commit 0741d0a) Co-authored-by: Philipp Kahr <[email protected]> Co-authored-by: Adrian Serrano <[email protected]>
…tional timestamp field. (elastic#27834) Sophos Version 18.5 sends sophos.xg.timestamp field. Closes elastic#27833 Co-authored-by: Adrian Serrano <[email protected]>
What does this PR do?
Sophos in Version 18.5 sends a field called
timestamp
instead of the olddate
andtime
fields. Since the pipeline does not perform any null safety checks on the set command, the pipeline fails.Additionally, sometimes
sent_pkts
is not populated and atrim
processor is called withoutignore_missing
resulting in a failure.Why is it important?
Better pipeline error handling.
Checklist
I have commented my code, particularly in hard-to-understand areasI have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Ingest simulate for the set processor
```json POST _ingest/pipeline/_simulate { "pipeline": { "processors": [ { "set": { "field": "_temp_.time", "value": "{{sophos.xg.date}} {{sophos.xg.time}}", "if": "ctx?.sophos?.xg?.date != null && ctx?.sophos?.xg?.time != null" } }, { "set": { "field": "_temp_.time", "value": "{{sophos.xg.timestamp}}", "if": "ctx?.sophos?.xg?.timestamp != null" } } ] }, "docs": [ { "_source": { "sophos": { "xg": { "date": "2021-08-12", "time": "10:00" } } } }, { "_source": { "sophos": { "xg": { "timestamp": "2021-08-12T10:00Z" } } } }, { "_source": { "sophos": { "xg": { "date": "2021-08-12", "time": "10:00", "timestamp": "2021-08-12T10:00Z" } } } }] } ```Related issues