Please show how to use vector.dev host_metrics with OpenObserve
Describe the problem that you experienced
Tried sending host metrics from vector to OpenObserve, but got errors
Enter the URL of the topic with the problem
No response
Describe what you were looking for in the documentation
how to configure OpenObserver or vector to send/receive host metrics
Describe the actions that led you to experience the problem
No response
Describe what you want to experience that would fix the problem
No response
Add a screenshot if that helps illustrate the problem
No response
If this problem caused an exception or error, please paste it here
No response
If the problem is browser-specific, please specify the device, OS, browser, and version
No response
Provide any additional information here in as much as detail as you can
No response
@neilmcguigan Post your Vector config, this should work
@gaby
sources:
host_metrics:
type: host_metrics
scrape_interval_secs: 60
collectors:
- cpu
- filesystem
- load
- host
- memory
- network
sinks:
openobserve_metrics:
type: prometheus_remote_write
inputs: [host_metrics]
endpoint: http://localhost:5080/api/default/prometheus/api/v1/write
auth:
strategy: basic
user: [email protected]
password: CHANGE_ME
compression: gzip
healthcheck:
enabled: false
@neilmcguigan What error are you getting and where? On vector or openobserve?
on vector, i get these errors:
Jul 24 02:02:19 ip-10-0-5-166 vector[3034]: 2024-07-24T02:02:19.659676Z ERROR sink{component_kind="sink" component_id=openobserve_metrics component_type=prometheus_remote_write}:request{request_id=1}: vector::sinks::util::retries: Not retriable; dropping the request. reason="Http status: 400 Bad Request" internal_log_rate_limit=true
Jul 24 02:02:19 ip-10-0-5-166 vector[3034]: 2024-07-24T02:02:19.659729Z ERROR sink{component_kind="sink" component_id=openobserve_metrics component_type=prometheus_remote_write}:request{request_id=1}: vector_common::internal_event::service: Service call failed. No retries or retries exhausted. error=None request_id=1 error_type="request_failed" stage="sending" internal_log_rate_limit=true
Jul 24 02:02:19 ip-10-0-5-166 vector[3034]: 2024-07-24T02:02:19.659757Z ERROR sink{component_kind="sink" component_id=openobserve_metrics component_type=prometheus_remote_write}:request{request_id=1}: vector_common::internal_event::component_events_dropped: Events dropped intentional=false count=152 reason="Service call failed. No retries or retries exhausted." internal_log_rate_limit=true
What does it say in OpenObserve? Are you using the username/token that OpenObserve gives you in the Ingest -> Metrics page?
@gaby OpenObserve provides no instructions on using Vector.Dev with Metrics, hence my request...
Please note that logging works fine
@gaby actually, if i send vector host metrics to the openobserve log endpoint, i can see them (as logs)
i guess i need to know the metric endpoint that works w vector
@neilmcguigan Copy the vector config that it gives you for logs and change the URL to the one for prometheus remote write.
why would that work? (it doesn't)
either way, I'd really like to use Vector (and OpenObserve should encourage its use too, as it's Rust and VRL)
however, I don't see a way to do so for metrics at this time, so I guess I'll use OTEL instead
I know what your problem is... Remove the compression: gzip
@gaby
sources: host_metrics: type: host_metrics scrape_interval_secs: 60 collectors: - cpu - filesystem - load - host - memory - network sinks: openobserve_metrics: type: prometheus_remote_write inputs: [host_metrics] endpoint: http://localhost:5080/api/default/prometheus/api/v1/write auth: strategy: basic user: [email protected] password: CHANGE_ME compression: gzip healthcheck: enabled: false
In reality you should be using compression: snappy. As stated here: https://prometheus.io/docs/specs/remote_write_spec/#protocol
nope, same prob. thanks anyways
The logs in OpenObserve should be telling you why the request is bad http 400.
@gaby that was it. What a rabbit hole. That fixed it.