apache / hertzbeat

Apache HertzBeat(incubating) is a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
https://hertzbeat.apache.org/
Apache License 2.0
5.14k stars 901 forks source link

fix: greptimedb can't work with version >= 0.5 #2095

Closed killme2008 closed 2 weeks ago

killme2008 commented 2 weeks ago

What's changed?

Close #1754

Fixed GreptimeDbDataStorage can't work with GreptimeDB >= 0.5:

Test with MySQL monitor:

Screenshot 2024-06-18 at 14 06 10

Not relevant to this PR, but I found that Prometheus Collector is not working, it always adds a prefix _ to app when saving data but not in queries.

image

Checklist

Add or update API

zqr10159 commented 2 weeks ago

Thank you very much for your help.

tomsun28 commented 2 weeks ago

Thanks for contribution. local test ok. 👍👍

Not relevant to this PR, but I found that Prometheus Collector is not working, it always adds a prefix _ to app when saving data but not in queries.

I found it is other storage common bug due victoriaMetrics adaptation, we will fix it later.

Btw, may i ask how is the protocol compatibility of greptime's prometheus api? We want to try greptime prometheus api in the future, just like victoriaMetrics as a recommond storage. Because we are designing new data stru and integrating the grafana page capabilities, . thanks.

killme2008 commented 2 weeks ago

Thanks for contribution. local test ok. 👍👍

Not relevant to this PR, but I found that Prometheus Collector is not working, it always adds a prefix _ to app when saving data but not in queries.

I found it is other storage common bug due victoriaMetrics adaptation, we will fix it later.

Btw, may i ask how is the protocol compatibility of greptime's prometheus api? We want to try greptime prometheus api in the future, just like victoriaMetrics as a recommond storage. Because we are designing new data stru and integrating the grafana page capabilities, . thanks.

Sure, GreptimeDB totally supports Prometheus remote storage(and compatible with vmagent) protocols, please read the doc

https://docs.greptime.com/user-guide/write-data/prometheus#a-note-for-victoriametrics-remote-write

And if you want to use PromQL query API, it's supported too

https://docs.greptime.com/user-guide/query-data/promql#greptimedb-s-http-api