Skip to content
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

[squid]: squid integration grok error caused by unkown logformat #11279

Open
UweW opened this issue Sep 30, 2024 · 2 comments
Open

[squid]: squid integration grok error caused by unkown logformat #11279

UweW opened this issue Sep 30, 2024 · 2 comments
Labels
Integration:squid Squid Proxy needs:triage Team:Security-Deployment and Devices Deployment and Devices Security team [elastic/sec-deployment-and-devices]

Comments

@UweW
Copy link

UweW commented Sep 30, 2024

Integration Name

Squid Proxy [squid]

Dataset Name

squid.log

Integration Version

1.0.0

Agent Version

8.15.2

Agent Output Type

elasticsearch

Elasticsearch Version

8.15.2

OS Version and Architecture

Fedora 39 x86_64

Software/API Version

No response

Error Message

Hi,
squid integration fails with grok parsing error:
Processor grok with tag grok_message in pipeline logs-squid.log-1.0.0 failed with message: Provided Grok expressions do not match field value: [<166>Sep 30 20:25:30 www.xxxx.xx(squid-1)[72246]: 1727720730.913 70 192.168.254.238 TCP_MISS/204 206 HEAD http://connectivitycheck.gstatic.com/generate_204 - ORIGINAL_DST/142.250.181.227 -]

In the Integration overview you say:

Setup
[Configure Squid](https://wiki.squid-cache.org/Features/LogModules#Module:_System_Log) to export access logs using one of the supported methods (file (Module: Standard I/O), udp (Module: UDP Receiver), or tcp (Module: TCP Receiver)).

But the important infomation about the logformat is missing! Squid has at least 5 diffrent default formats.
What is the format the integration expects ?
It would be best if the grok patterns were considered for all standard squid log formats in the pipeline.

Best regards
Uwe

Event Original

<166>Sep 30 20:25:30 www.xxxx.xx (squid-1)[72246]: 1727720730.913 70 192.168.254.238 TCP_MISS/204 206 HEAD http://connectivitycheck.gstatic.com/generate_204 - ORIGINAL_DST/142.250.181.227 -

What did you do?

configured firewall appliance to send squid logs to elastic-agent

  | TCP(4) | 192.168.250.2 | squid für fed:9004 - squid plugin

What did you see?

grok parsing error

What did you expect to see?

correctly parsed grok pattern.
It would be best if the grok patterns were considered for all standard squid log formats in the pipeline.

Anything else?

correct dokumentation as well

@UweW UweW changed the title [Integration Name]: Brief description of the issue [squid]: squid integration grok error caused by unkown logformat Sep 30, 2024
@andrewkroh andrewkroh added Integration:squid Squid Proxy Team:Security-Deployment and Devices Deployment and Devices Security team [elastic/sec-deployment-and-devices] labels Sep 30, 2024
@elasticmachine
Copy link

Pinging @elastic/sec-deployment-and-devices (Team:Security-Deployment and Devices)

@taylor-swanson
Copy link
Contributor

Hey @UweW, the Squid integration currently supports the "native" format described here.

I'll submit a change to update the documentation to reflect this.

You mention that there are 5 different formats. I see two listed on that page I linked (native and common formats). I know that squid can also be configured with a custom, user-defined pattern, but it is unlikely we'll support custom patterns like this. If there are other well-documented predefined patterns, we can certainly add that as an enhancement request for the squid integration to support them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:squid Squid Proxy needs:triage Team:Security-Deployment and Devices Deployment and Devices Security team [elastic/sec-deployment-and-devices]
Projects
None yet
Development

No branches or pull requests

4 participants