-
Notifications
You must be signed in to change notification settings - Fork 979
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
Feat: make SQUID3 captures ecs compliant #270
Conversation
I've left some suggestions. A squid module was recently added in elastic/beats#19713, and I did some comparison against the expected test data there in addition to peeking at the Squid LogFormat docs.
|
Thanks Eric, I've addressed your concerns :
Been following Beats' repo from a tag so I missed squid support (on master), thanks for the links. |
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.
LGTM, assuming either the build goes green OR you plan to fix the build issues in the downstream feature branch.
One comment about the legacy change being unnecessary, feel free to resolve with either an ACK
or a NAK
.
patterns/legacy/squid
Outdated
@@ -1,4 +1,4 @@ | |||
# Pattern squid3 | |||
# Documentation of squid3 logs formats can be found at the following link: | |||
# http://wiki.squid-cache.org/Features/LogFormat | |||
SQUID3 %{NUMBER:timestamp}\s+%{NUMBER:duration}\s%{IP:client_address}\s%{WORD:cache_result}/%{POSINT:status_code}\s%{NUMBER:bytes}\s%{WORD:request_method}\s%{NOTSPACE:url}\s(%{NOTSPACE:user}|-)\s%{WORD:hierarchy_code}/%{IPORHOST:server}\s%{NOTSPACE:content_type} |
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.
🤔 ah. The way this was originally specified, the intent was clearly to make user
not capture a literal -
(which indicates user was not provided), but because NOTSPACE
matches -
, this always ended up capturing anyway 🤦♀️ . That took me a minute to figure out. Good work in making it capture IFF present in the ecs-v1 pattern.
However, I don't think this change to the legacy patterns is necessary here because it is effectively a no-op, and its presence muddies the history of the legacy patterns.
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.
okay than, same for me - took me a few to figure.
we'll let the next person wonder about this than, hopefully no one will have to.
Yeah I like this mapping. Reviewing this made me realize we added But for now this is good 👍 |
Thanks Mat, I've added a check-list item to consider |
"1525334330.556 3 120.65.1.1 TCP_REFRESH_MISS/200 2014 GET http://www.sample.com/hellow_world.txt public-user DIRECT/www.sample.com text/plain 902351708.872"
matching before and after: