Comments (3)
很好的建议,我们评估一下
from bailongma.
@xxj123go 参考Bailongma的README,Prometheus接入TDengine需要同时接入remote read/write ,Grafana不需要直接接入TDengine,按照原有的方式和表达式接Prometheus就可以,Bailongma会处理promql到TDengine sql的转换。
from bailongma.
@zitsen 按照你说的试了试,可以,但如果采集点很多,blm_prometheus 会不会成为瓶颈。期间还遇到 blm_prometheus 异常,
2021/09/09 15:55:16 http: panic serving 10.204.11.124:52150: interface conversion: interface {} is time.Time, not string goroutine 326 [running]: net/http.(*conn).serve.func1(0xc00019e1e0) /usr/local/go/src/net/http/server.go:1824 +0x153 panic(0xa821a0, 0xc00086a180) /usr/local/go/src/runtime/panic.go:971 +0x499 bailongma/v2/blm_prometheus/pkg/tdengine/read.(*ReaderProcessor).Process(0xc000161980, 0xc00000e0a8, 0x0, 0x0, 0x0) /usr/local/go/src/bailongma/v2/blm_prometheus/pkg/tdengine/read/reader.go:86 +0x15c7 bailongma/v2/blm_prometheus/pkg/tdengine.(*Client).Read(0x11bce38, 0xc00000e0a8, 0xe, 0xc000055a98, 0x1) /usr/local/go/src/bailongma/v2/blm_prometheus/pkg/tdengine/client.go:72 +0x35 main.readHandle.func1(0xbff158, 0xc0002801c0, 0xc000464d00) /usr/local/go/src/bailongma/v2/blm_prometheus/server.go:241 +0x4bf net/http.HandlerFunc.ServeHTTP(0xc0000b07c8, 0xbff158, 0xc0002801c0, 0xc000464d00) /usr/local/go/src/net/http/server.go:2069 +0x44 net/http.(*ServeMux).ServeHTTP(0x118e140, 0xbff158, 0xc0002801c0, 0xc000464d00) /usr/local/go/src/net/http/server.go:2448 +0x1ad net/http.serverHandler.ServeHTTP(0xc000280000, 0xbff158, 0xc0002801c0, 0xc000464d00) /usr/local/go/src/net/http/server.go:2887 +0xa3 net/http.(*conn).serve(0xc00019e1e0, 0xc002c0, 0xc0006af6c0) /usr/local/go/src/net/http/server.go:1952 +0x8cd created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:3013 +0x39b
简单定位发现这个异常和 读操作有关,总是伴随着如下 log 一块产生:
cat /var/log/taos/blm_prometheus.log
[INFO] 2021/09/09 15:54:56 server.go:239: req info== {[start_timestamp_ms:1631173794494 end_timestamp_ms:1631174094494 matchers:<name:"__name__" value:"up" > hints:<start_ms:1631173794494 end_ms:1631174094494 > ]} [INFO] 2021/09/09 15:54:56 reader.go:204: startTime:1631173794494 ,endTime:1631174094494 [INFO] 2021/09/09 15:54:56 reader.go:50: Executed query:SELECT * FROM up WHERE ts >= 1631173794494 AND ts <= 1631174094494 ORDER BY ts
同样,在prometheus web端查询也可以触发blm_prometheus进程抛上述异常
进一步关联到 /bailongma/v2/blm_prometheus/pkg/tdengine/read.go ,麻烦帮忙进一步确认。
from bailongma.
Related Issues (16)
- fatal error: 'taos.h' file not found HOT 8
- prometheus 配置了BLM 没有数据写到TDengine,也没有报错 HOT 18
- error:too many open files HOT 3
- 启动报错 connection refused HOT 1
- 重新发一个docker镜像吧 HOT 1
- Bailongma can not connect to taos db cluster in kubernetes HOT 8
- 有没有考虑适配Opentsdb HOT 1
- 工程编译问题 HOT 16
- 离线环境无法编译 HOT 3
- 编译 blm_prometheus 报错 HOT 2
- The file "server.go" can't build in TDengine 2.0.3.1 (blm_promepheus) HOT 1
- 提供主流平台的预编译二进制文件会更方便
- blm_prometheus 可能存在内存泄漏,使用内存一直在增长 HOT 3
- 启动后运行一会儿报错 HOT 2
- 能支持prometheus读么? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bailongma.