Vector: Tutorial on https://vector.dev/guides/integrate/sources/syslog/loki/#start-vector failed

Created on 10 Jun 2020  ยท  7Comments  ยท  Source: timberio/vector

The tutorial on:

https://vector.dev/guides/integrate/sources/syslog/loki/#start-vector

Here's what went wrong:
Jun 10 14:45:32.435 ERROR vector: Configuration error: "vector.toml": missing field encoding for key sinks.out

bug

All 7 comments

Thanks for reporting!

adding this line fixed it:

#Encoding
encoding.codec = "json" # optional, default

Thanks, going to reopen this so we can fix the docs.

@nadgobpx01 have you tried this with their cloud offering?

This:

[sinks.loki]
  # General
  type = "loki"
  inputs = ["docker", "syslog"]
  endpoint = "https://logs-prod-us-central1.grafana.net"

  # Auth
  auth.user = "4902"
  auth.password = "<api token here>"
  auth.strategy = "basic"

  # Encoding
  encoding.codec = "json" # optional, default

  # Labels
  labels.job = "varlogs"

gives 400 bad request error in vector sink log :(

Jun 11 16:25:26.011  INFO vector::topology::builder: Healthcheck: Passed.
Jun 11 16:25:26.043  INFO vector::topology::builder: Healthcheck: Passed.
Jun 11 16:25:26.136 ERROR vector::topology::builder: Healthcheck: Failed Reason: A non-successful status returned: 404 Not Found
Jun 11 16:25:27.136  WARN sink{name=loki type=loki}:request{request_id=1}: vector::sinks::util::retries: request is not retryable; dropping the request. reason=response status: 400 Bad Request
Jun 11 16:25:32.444  WARN sink{name=loki type=loki}:request{request_id=1}: vector::sinks::util::retries: request is not retryable; dropping the request. reason=response status: 400 Bad Request
Jun 11 16:25:39.671  WARN sink{name=loki type=loki}:request{request_id=1}: vector::sinks::util::retries: request is not retryable; dropping the request. reason=response status: 400 Bad Request
Jun 11 16:25:52.755  WARN sink{name=loki type=loki}:request{request_id=1}: vector::sinks::util::retries: request is not retryable; dropping the request. reason=response status: 400 Bad Request
Jun 11 16:25:54.530  WARN sink{name=loki type=loki}:request{request_id=1}: vector::sinks::util::retries: request is not retryable; dropping the request. reason=response status: 400 Bad Request
Jun 11 16:25:59.173  WARN sink{name=loki type=loki}:request{request_id=1}: vector::sinks::util::retries: request is not retryable; dropping the request. reason=response status: 400 Bad Request

which is very strange since

~ โฏ curl https://4902:therewasmytoken\=\[email protected]                                                                                                                                                    8s 16:22:45
OK

@pySilver
somehow yesterday responded well on health check , on later try today i have the output from issue #2778.Thank you .

Tutorials were correct, encoding should be optional.

Fixed with #2796.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trK54Ylmz picture trK54Ylmz  ยท  3Comments

a-rodin picture a-rodin  ยท  3Comments

kaarolch picture kaarolch  ยท  3Comments

Hoverbear picture Hoverbear  ยท  3Comments

lewisthompson picture lewisthompson  ยท  3Comments