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

Clickhouse/Sink Healthcheck broken since 0.33? #19061

Closed
idl0r opened this issue Nov 6, 2023 · 1 comment · Fixed by #19067
Closed

Clickhouse/Sink Healthcheck broken since 0.33? #19061

idl0r opened this issue Nov 6, 2023 · 1 comment · Fixed by #19067
Labels
meta: regression This issue represents a regression type: bug A code related bug.

Comments

@idl0r
Copy link

idl0r commented Nov 6, 2023

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

After upgrading to 0.33 it seems that health checks are broken. I checked https://vector.dev/highlights/2023-09-27-0-33-0-upgrade-guide/ but I couldn't find a solution for my problem, even though it mentions breakage / changes related to the endpoints.

It looks like a slash is always appended to the endpoint, which results into vector (at least vector validate) doing stuff like endpoint + //?query=SELECT%201. I tried to "curl" that by hand it seems to be ok when I remove one slash, so like http://localhost:8123/?query=SELECT%201. I tried to append a slash at the end of the endpoint in the YAML file but it didn't work.

parts.path_and_query = Some(PathAndQuery::from_static(""));
is that appending a slash perhaps? And
let uri = format!("{}/?query=SELECT%201", endpoint);
will then add another one?

Configuration

sources:
  syslog:
    type: "socket"
    address: "0.0.0.0:9001"
    mode: "tcp"
    decoding:
      codec: "bytes"

sinks:
  clickhouse:
    type: "clickhouse"
    inputs:
      - "syslog"
    endpoint: "http://localhost:8123"
    database: "haproxy"
    table: "raw_logs"

Version

vector 0.33.1 (x86_64-unknown-linux-gnu 3cc27b9 2023-10-30 16:50:49.747931844)

Debug Output

# RUST_BACKTRACE=full vector -vvv validate
2023-11-06T15:02:21.943098Z DEBUG vector::app: Internal log rate limit configured. internal_log_rate_secs=10
2023-11-06T15:02:21.943120Z  INFO vector::app: Log level is enabled. level="vector=trace,codec=trace,vrl=trace,file_source=trace,tower_limit=trace,rdkafka=trace,buffers=trace,lapin=trace,kube=trace"
2023-11-06T15:02:21.943160Z DEBUG vector::app: messaged="Building runtime." worker_threads=128
2023-11-06T15:02:21.952988Z  WARN vector::config::loading: The "/etc/vector/vector.toml" config path does not exist. Vector will attempt to use new default "/etc/vector/vector.yaml" instead.
√ Loaded ["/etc/vector/vector.yaml"]
2023-11-06T15:02:21.954378Z DEBUG vector::topology::builder: Building new source. component=syslog
2023-11-06T15:02:21.955275Z DEBUG vector::topology::builder: Building new sink. component=clickhouse
2023-11-06T15:02:21.967461Z DEBUG sink{component_kind="sink" component_id=clickhouse component_type=clickhouse component_name=clickhouse}: vector_core::tls::settings: Fetching system root certs.
2023-11-06T15:02:21.979267Z DEBUG sink{component_kind="sink" component_id=clickhouse component_type=clickhouse component_name=clickhouse}: vector_core::tls::settings: Fetching system root certs.
√ Component configuration
2023-11-06T15:02:21.989344Z TRACE vector::validate: Healthcheck for clickhouse starting.
2023-11-06T15:02:21.989630Z DEBUG http: vector::internal_events::http_client: Sending HTTP request. uri=http://localhost:8123//?query=SELECT%201 method=GET version=HTTP/1.1 headers={"user-agent": "Vector/0.33.1 (x86_64-unknown-linux-gnu 3cc27b9 2023-10-30 16:50:49.747931844)", "accept-encoding": "identity"} body=[empty]
2023-11-06T15:02:21.991707Z DEBUG http: vector::internal_events::http_client: HTTP response. status=404 Not Found version=HTTP/1.1 headers={"date": "Mon, 06 Nov 2023 15:02:21 GMT", "connection": "Close"} body=[unknown]
2023-11-06T15:02:21.991754Z ERROR vector::topology::builder: msg="Healthcheck failed." error=Unexpected status: 404 Not Found component_kind="sink" component_type="clickhouse" component_id=clickhouse component_name=clickhouse
x Health check for "clickhouse" failed: Unexpected status: 404 Not Found
2023-11-06T15:02:21.991801Z TRACE vector::validate: Healthcheck for clickhouse done.

Example Data

No response

Additional Context

No response

References

No response

@dsmith3197
Copy link
Contributor

dsmith3197 commented Nov 6, 2023

Hey @idl0r,

Thanks for bringing this to our attention. I opened #19067 to fix it.

@jszwedko jszwedko added the meta: regression This issue represents a regression label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta: regression This issue represents a regression type: bug A code related bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants