Hi team I tried sending kubernetes pods logs using promtail to my signoz hosted in a vm but getting ...
d
Hi team I tried sending kubernetes pods logs using promtail to my signoz hosted in a vm but getting the below logs
Copy code
level=error ts=2024-08-13T12:13:54.102750417Z caller=client.go:390 component=client host=20.42.4.16:4318 msg="final error sending batch" status=400 error="server returned HTTP status 400 Bad Request (400): \u0008\u0003\u0012\u0019proto: illegal wireType 7"
1. I have give the otel collector ip and endpoint /v1/logs inside promtail config - "http://collectorip:port/v1/logs" 2. The current configuration of promtail is able to send the logs to loki server
u
hi, i am also trying to achieve the same, here the collector ip:port is the signoz collector or you have setup another otel collector ? and if so how are you able to configure a loki reciever for the same ? .. i am also facing this
s
The
/v1/logs
uses the OTLP/HTTP protocol. You can't use the same to send promtail logs.
Use loki receiver instead
d
yes but the version of signoz i am using has an otel version where loki receiver is not supporter
s
Which version of signoz are you using?
d
latest
s
If you need this missing component, please create a PR adding the component here https://github.com/SigNoz/signoz-otel-collector/blob/main/components/components.go
u
i was able to get the logs using another otel collector which was being used as a loki reciever, on the same vm, and sending the logs to signoz collector. as outlined here : https://signoz.io/blog/using-opentelemetry-loki-receiver-to-collect-logs/
d
can you share your otel config for the other collectpr @Ujjwal Rastogi
youre using latest collector version?
u
sure , here it is , and yes i am using the latest signoz collector with my docker compose setup
d
to be clear there are two collectors running on your vm right now 1. signoz otel collector 2. otel collector with loki receiver which is sending the logs to signoz collector
u
yeah
d
thanks its working for me now
u
🙌