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

filelog add jsonlogs in opensearch there are problem there are not show logs in logs-section opensearch-dashboard #36816

Open
NamanGajjar26 opened this issue Dec 13, 2024 · 0 comments
Labels
needs triage New item requiring triage

Comments

@NamanGajjar26
Copy link

Component(s)

No response

Describe the issue you're reporting

hello
i am using opensearch and opentelemetry-collector-contrib filelog to send json log to opensearch
json logs like this

` {"timestamp":"2024-12-12T10:23:30.456Z","level":"INFO","message":"User logged in successfully1.","userId":101,"service":"Authentication"}
  {"timestamp":"2024-12-12T10:24:20.755Z","level":"INFO","message":"User logged in successfully2.","userId":101,"service":"Authentication"}
  {"timestamp":"2024-12-12T10:25:13.212Z","level":"INFO","message":"User logged in successfully3.","userId":101,"service":"Authentication"}
  {"timestamp":"2024-12-12T10:26:33.333Z","level":"INFO","message":"User logged in successfully4.","userId":101,"service":"Authentication"}
  {"timestamp":"2024-12-12T10:27:01.342Z","level":"INFO","message":"User logged in successfully5.","userId":101,"service":"Authentication"}          
 `

opentelemtry in receiver configure like this

`receivers:    
    filelog:
      include:
        - /var/log/naman-log/mylog.log   
      start_at: beginning  
      operators:
      - type: json_parser
        timestamp:
          parse_from: attributes.timestamp
          layout: '%Y-%m-%d %H:%M:%S.%LZ'
        --- exporters ---
    exporters:  
        opensearch/log:
          logs_index: test-otel-log
          http:
            endpoint: https://opensearch-cluster-master.newopensearch.svc.cluster.local:9200/
            auth:
              authenticator: basicauth/client
            tls:
              insecure: false
              insecure_skip_verify: true
            timeout: 2m
          retry_on_failure:
            enabled: true 
    --- service ---
    service:
        telemetry:
          metrics:
            address: ${env:MY_POD_IP}:8888
        extensions:
          - basicauth/client
          - health_check
        pipelines:
          logs:
            receivers: [filelog]  
            processors: [] 
            exporters: [opensearch/log]      
`

there are log get in test-otel-log but not show in log Event Explorer not show how to solved this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

1 participant