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

How can I use the OpenTelemetry Collector (from opentelemetry-collector-contrib) to collect Linux system logs, including details about user logins, and send them to OpenSearch? #36963

Open
NamanGajjar26 opened this issue Dec 26, 2024 · 2 comments
Labels
question Further information is requested

Comments

@NamanGajjar26
Copy link

NamanGajjar26 commented Dec 26, 2024

Hello
I am working with the opentelemetry-collector-contrib project and want to collect Linux system logs, specifically logs related to user logins, and send them to OpenSearch.

System Logs: Logs typically found in /var/log/ directory, such as /var/log/auth.
log or /var/log/secure, depending on the Linux distribution.
Desired Data: I want details about user logins, including successful and failed login attempts.
Output Destination: OpenSearch.

Which components (e.g., receivers, processors, exporters) should I configure in the OpenTelemetry Collector to achieve this? Can you also provide a sample configuration?

@NamanGajjar26 NamanGajjar26 added the needs triage New item requiring triage label Dec 26, 2024
@NamanGajjar26 NamanGajjar26 changed the title how to export linux system logs to opensearch How can I use the OpenTelemetry Collector (from opentelemetry-collector-contrib) to collect Linux system logs, including details about user logins, and send them to OpenSearch? Dec 27, 2024
@JaredTan95 JaredTan95 added question Further information is requested and removed needs triage New item requiring triage labels Dec 27, 2024
@NamanGajjar26
Copy link
Author

NamanGajjar26 commented Dec 27, 2024

i want to get linux (ubuntu) syslog get in opensearch using opentelemetry
i try your solution but in my case not working because i cant get syslog in Kubernetes any pods
i try like this below

` filelog:
       include:
         - /var/log/syslog
         - /var/log/auth.log
       exclude:
         - /var/log/*-debug.log   
       operators:
         - type: json_parser          
           timestamp:
             parse_from: attributes.timestamp            
             layout: '%Y-%m-%dT%H:%M:%S.%LZ' 
           severity:
             parse_from: attributes.level          
       start_at: end     `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants