#support

Configuring OTel Collector to Export Data to SigNoz

TLDR James asked how to configure the otel collector to send data to SigNoz. Ankit suggested using the otlp exporter in the collector configuration. James found that SigNoz uses its own otel collector and adjusted the port bindings accordingly.

Powered by Struct AI

1

17
5mo
Solved
Join the chat
Jun 22, 2023 (5 months ago)
James
Photo of md5-ac5d64b63e48fd1a3cf936c3e2221a2c
James
03:36 PM
Hello - I'm looking to evaluate Signoz with the OpenTelemetry collector, but I'm a bit confused. I'm running otelcol locally on my host, SigNoz is running via Docker, and I have applications running locally on the host as well. My applications are able to collect and send data to otelcol successfully, I can see the data being written when a file exporter is configured. Now I'd like otelcol to send data to Signoz. However, I've seen a lot of conflicting guides, and most produces an error. One example I've been trying to work with is here:

https://signoz.io/blog/opentelemetry-collector-complete-guide/

However, attempting to configure these clickhousetraces exporters always results in an error from otelcol when attempting to start of:

error decoding 'exporters': unknown type: "clickhousetraces" for id: "clickhousetraces" (valid values: [opencensus zipkin file jaeger otlphttp kafka prometheus prometheusremotewrite logging otlp])

Interestingly, with that SAME URL, we see two other exporters mentioned that are not included later on, kafka/traces and kafka/metrics. When I attempt to configure these I receive the error that effectively nothing is running on port 9092, and I can confirm the local docker configuration doesn't expose anything on port 9092 and I'm not entirely sure if that configuration even includes kafka anything: https://github.com/SigNoz/signoz/blob/develop/deploy/docker/clickhouse-setup/docker-compose.yaml

I feel like this situation should be fairly straightforward - what should my exporter(s) be configured as when using otelcol locally and the Signoz local docker instance?
Pranay
Photo of md5-8df7ce0274b2473ec07403336e48b574
Pranay
04:50 PM
Srikanth do you have more ideas on this?
Ankit
Photo of md5-dbe7088320fe1d922707613e02f3420d
Ankit
06:02 PM
James did you use signoz's otel-collector distribution? clickhousetraces is part of signoz's distribution. You need to use a different image signoz/signoz-otel-collector:0.79.1https://github.com/SigNoz/signoz/blob/develop/deploy/docker/clickhouse-setup/docker-compose.yaml#L196
06:05
Ankit
06:05 PM
> I receive the error that effectively nothing is running on port 9092, and I can confirm the local docker configuration doesn't expose anything on port 9092 and I'm not entirely sure if that configuration even includes kafka anything:
this is true...Maybe the blog just shows an example config ( Ashu please note).

James the kafkaexporter in the blog needs a kafka already running. The broker of kafka has a port address of 9092 which would make the above config work then.

1

06:06
Ankit
06:06 PM
users usually don't get started with that guide. They usually pick a language for APM and traces integration. Some start with logs integration which out-of-box for k8s.
06:07
Ankit
06:07 PM
What do you want to get started with? We can help you with the right docs to get you started with your use cases
James
Photo of md5-ac5d64b63e48fd1a3cf936c3e2221a2c
James
06:11 PM
Appreciated. I'd like to bring-my-own-otel-collector. I have it running as a service on my host machine. I'd like to configure that otel collector to export data to SigNoz, which I have running in docker via the deply/docker/clickhouse-setup/docker-compose.yaml configuration. Having trouble knowing how to export what it receives to SigNoz atm
Ankit
Photo of md5-dbe7088320fe1d922707613e02f3420d
Ankit
07:29 PM
got it... then just use otlp exporter at your otel-collector to send data to SigNoz. SigNoz has otlp receivers enabled by default
07:31
Ankit
07:31 PM
like this:
exporters:
   otlp:
     endpoint: "<IP of machine hosting SigNoz>:4317"
     tls:
       insecure: true
James
Photo of md5-ac5d64b63e48fd1a3cf936c3e2221a2c
James
07:31 PM
Beautiful - thank you and will give this a shot soon! This is much more consistent with how I felt it should have been, was getting thrown off track unfortunately it seems
Ankit
Photo of md5-dbe7088320fe1d922707613e02f3420d
Ankit
07:32 PM
yeah... we need to work more in organising docs it seems 🙂
James
Photo of md5-ac5d64b63e48fd1a3cf936c3e2221a2c
James
09:47 PM
&gt; SigNoz has otlp receivers enabled by default
Started looking back at this and I'm a bit confused. I configured my otelcol to send data to Signoz on port 4317, but a connection was refused. Nothing was listening on that port. Looking to the Docker configuration, we have this:

https://github.com/SigNoz/signoz/blob/develop/deploy/docker/clickhouse-setup/docker-compose.yaml#L208

This appears to indicate the service which I could potentially route traffic from port 4317 to is...another otel collector? Is that the correct way to get data ingested into SigNoz? Basically:

App -&gt; OTel Collector -&gt; SigNoz OTel Collector -&gt; SigNoz?
Jun 23, 2023 (5 months ago)
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
03:55 AM
&gt; This appears to indicate the service which I could potentially route traffic from port 4317 to is...another otel collector?
No, it makes the port accessible to the host machine, which otherwise could only be accessed by other containers.

The flow will be
App -> OTel Collector (optional) -> SigNoz
James
Photo of md5-ac5d64b63e48fd1a3cf936c3e2221a2c
James
06:25 PM
Getting back to this - unfortunately from what I can tell it's exactly as I described. To get data to SigNoz it seems to require the use of its own otel collector. We can see the repo, Dockerfile and code the signoz-otel-collector is based on in this repo, and specifically where it creates its own instance of an otel collector here: https://github.com/SigNoz/signoz-otel-collector/blob/main/cmd/signozcollector/main.go. I assumed this was the case as the configuration passed to this collector was, in fact, the identical shape of the configuration for otel.

So, in other words, if I wanted to have my own generic otel collector that I can use to send data to both Signoz AND other endpoints, such as my own company's database, the process would look like:

App > Otel > SigNoz Otel > Signoz

This is a bit challenging since, at least locally for a PoC, my own Otel is binding on port 4318 to receive telemetry, but of course the SigNoz Otel Collector wants to bind on the same port.
06:26
James
06:26 PM
I'll remap the port bindings, but its a little funny this is a situation
Ankit
Photo of md5-dbe7088320fe1d922707613e02f3420d
Ankit
07:30 PM
You should think of signoz otel as part of SigNoz.

SigNoz Community

Built with ClickHouse as datastore, SigNoz is an open-source APM to help you find issues in your deployed applications & solve them quickly | Knowledge Base powered by Struct.AI

Indexed 1023 threads (61% resolved)

Join Our Community