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 to send 'A' collector logs to collector 'B' for self monitoring via 'service::telemetry::logs' #35308

Open
vaibhhavv opened this issue Sep 20, 2024 · 1 comment
Labels
bug Something isn't working needs triage New item requiring triage

Comments

@vaibhhavv
Copy link

Component(s)

No response

What happened?

Description

I have two collectors 'A' & 'B'.
Use case is I want to send logs of collector 'A' to collector 'B' for self-monitoring, with the help of the otel pipelines itself.
I am little stuck as I have enabled the telemetry block for logs by the below configuration.

However, after enabling it I am still not getting any logs on collector 'B'.

service:
  telemetry:
    logs:
        level: debug

service::telemetry::logs documentation is very limited and I did not get any idea how to enable this feature.
Could some one help out here?

  1. For the particular use case, this is the correct approach? If not, could you suggest the correct one
  2. If yes, could you add what part I am missing here.

Steps to Reproduce

Expected Result

Actual Result

Collector version

0.93.3

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@vaibhhavv vaibhhavv added bug Something isn't working needs triage New item requiring triage labels Sep 20, 2024
@bacherfl
Copy link
Contributor

Hi @vaibhhavv - I was also just looking into this and it seems like while for metrics there is the possibility to directly send them to another collector via otlp, the self monitoring logs only provide the option to store the logs in a file, using the output_paths config option (see https://opentelemetry.io/docs/collector/internal-telemetry/#configure-internal-logs) and https://github.com/open-telemetry/opentelemetry-collector/blob/1e29f99536c300a877454b52ac372a91a6c05344/service/telemetry/config.go#L87

So with the following example, the logs would be stored in the file otelcol.log:

service:
  telemetry:
    logs:
      level: debug
      output_paths:
        - otelcol.log

One potential option to try out, provided that the log file generated by collector A is accessible by collector B, would be to then use the filelogreceiver to read the log file generated by collector A.

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

No branches or pull requests

2 participants