zqr10159 commented on PR #3403: URL: https://github.com/apache/hertzbeat/pull/3403#issuecomment-2923977737
> 👍hi, what the different between PrometheusProxyCollectImpl and PrometheusAutoCollectImpl, can you share the design of this piece?? 1. Auto Mode (PrometheusAutoCollectImpl) How it works: HertzBeat’s collector directly scrapes the Prometheus-compatible endpoints (such as node_exporter, blackbox_exporter, or custom Prometheus endpoints). Use case: Use this mode for standard Prometheus monitoring scenarios, where HertzBeat collects metrics directly from the target application or exporter. Mechanism: The collector parses the Prometheus metrics format and processes the data itself. 2. Proxy Mode (PrometheusProxyCollectImpl) How it works: HertzBeat acts as a proxy that forwards requests to a time-series database backend (like GreptimeDB or VictoriaMetrics) that supports the Prometheus API. Instead of scraping exporters directly, it queries historical or real-time metrics from the database via API. Use case: Use this mode when integrating with large-scale metric storage (such as GreptimeDB or VictoriaMetrics). It's especially useful if you want to use HertzBeat as a unified data source for Grafana dashboards, querying through the database rather than directly from exporters. Mechanism: HertzBeat does not parse/export data itself, but relays requests and responses between Grafana (or another client) and the backend database. Currently, the proxy code is marked as todo because for the current architecture, although proxy can reduce the load on hertzbeat, direct forwarding to the database makes alerting impossible. I'm sure he'll be useful as a future feature for lossless collection of metrics! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For additional commands, e-mail: notifications-h...@hertzbeat.apache.org