open-falcon-archive / graph Goto Github PK
View Code? Open in Web Editor NEW历史数据存储组件
License: Apache License 2.0
历史数据存储组件
License: Apache License 2.0
MySQL只需要配一台吗?graph集群里的多个graph连接的是同一个mysql?
类似的问题,多个judge连接的也是同一个redis实例?
RT
该如何定位慢的原因?有最佳实践吗?
一次性查看30台机器的数据,counter视图。大约3-4秒,有时要多次刷新才出现。endpoint视图快一些。
如何提高查询速度。
程序运行一会出这个错误
errno: 0x023a, str:opening error
errno: 0panic: runtime error: cgo argument has Go pointer to Go pointer
goroutine 23 [running]:
panic(0x90e0a0, 0xc8203d24e0)
/usr/local/go/src/runtime/panic.go:464 +0x3e6
github.com/open-falcon/rrdlite.(_Updater).update(0xc820032de8, 0xc82039b3c0, 0x6, 0x8, 0x0, 0x0)
/home/work/workspace/src/github.com/open-falcon/rrdlite/rrd_c.go:70 +0x100
github.com/open-falcon/rrdlite.(_Updater).Update(0xc820032de8, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/work/workspace/src/github.com/open-falcon/rrdlite/rrd.go:130 +0x27f
github.com/open-falcon/graph/rrdtool.update(0xc8203ae9b0, 0x46, 0xc8203a9020, 0x6, 0x6, 0x0, 0x0)
/home/work/workspace/src/github.com/open-falcon/graph/rrdtool/rrdtool.go:117 +0x45e
github.com/open-falcon/graph/rrdtool.flushrrd(0xc8203ae9b0, 0x46, 0xc8203a9020, 0x6, 0x6, 0x0, 0x0)
/home/work/workspace/src/github.com/open-falcon/graph/rrdtool/rrdtool.go:142 +0x1a2
github.com/open-falcon/graph/rrdtool.ioWorker()
/home/work/workspace/src/github.com/open-falcon/graph/rrdtool/sync_disk.go:95 +0x38f
created by github.com/open-falcon/graph/rrdtool.Start
/home/work/workspace/src/github.com/open-falcon/graph/rrdtool/rrdtool.go:54 +0x24f
例如配置成:
/a/b/c
如果没有b目录,那么不会生成rrd文件,且不会报错。
刚刚开始试试open-falcon,安装还顺利 正在熟悉,发现graph两次自动down掉了。下面的报错是什么原因呢?
2016/03/24 23:24:18 cfg.go:90: g.ParseConfig ok, file cfg.json
2016/03/24 23:24:18 db.go:26: g.InitDB ok
2016/03/24 23:24:18 rrdtool.go:55: rrdtool.Start ok
2016/03/24 23:24:18 index.go:15: index.Start ok
2016/03/24 23:24:18 main.go:20: 15851 register signal notify
2016/03/24 23:24:18 rpc.go:54: rpc.Start ok, listening on 0.0.0.0:6070
2016/03/24 23:24:18 http.go:96: http listening 0.0.0.0:6071
panic: runtime error: cgo argument has Go pointer to Go pointer
goroutine 14 [running]:
panic(0x90f2e0, 0xc820315e30)
/usr/local/go/src/runtime/panic.go:464 +0x3e6
github.com/open-falcon/rrdlite.(_Updater).update(0xc820036de8, 0xc82031c240, 0x6, 0x8, 0x0, 0x0)
/workspace/golang/src/github.com/open-falcon/rrdlite/rrd_c.go:70 +0x100
github.com/open-falcon/rrdlite.(_Updater).Update(0xc820036de8, 0x0, 0x0, 0x0, 0x0, 0x0)
/workspace/golang/src/github.com/open-falcon/rrdlite/rrd.go:130 +0x27f
github.com/open-falcon/graph/rrdtool.update(0xc8202ec4b0, 0x45, 0xc82031a210, 0x6, 0x6, 0x0, 0x0)
/workspace/golang/src/github.com/open-falcon/graph/rrdtool/rrdtool.go:117 +0x45e
github.com/open-falcon/graph/rrdtool.flushrrd(0xc8202ec4b0, 0x45, 0xc82031a210, 0x6, 0x6, 0x0, 0x0)
/workspace/golang/src/github.com/open-falcon/graph/rrdtool/rrdtool.go:142 +0x1a2
github.com/open-falcon/graph/rrdtool.ioWorker()
/workspace/golang/src/github.com/open-falcon/graph/rrdtool/sync_disk.go:95 +0x38f
created by github.com/open-falcon/graph/rrdtool.Start
/workspace/golang/src/github.com/open-falcon/graph/rrdtool/rrdtool.go:54 +0x24f
有时候报这个错误 errno: 0x023d, str:mmap error
不知道什么原因,没有详细说明。
已经更新到最新的代码,golang 1.7.4 (docker官方仓库golang:lastest版本) build的。
"rrd": {
"storage": "/home/work/data/6070"
}
这段storage的配置,是否可以配置多个?
如果可以,该怎么配置?
不可以,若需要多个存储目录,该怎么配置?启动多个graph实例吗?还是咋整
在我们线上部署graph后,rrd数据存储量非常大,结合rrd存储的相关概念,由于不懂开发语言,线上已经部署,所以有以下疑问紧急请教以下:
1.按照文档的解释,我得理解是:graph将采集的数据通过rrd的方式存储,同一个metric存一个rrd文件,rrd文件大小事固定的,相同metric在不同时间点的数据采集上来都在同一个rrd文件中,直至rrd环被写满,默认情况是五年,但是我们线上的graph数据存储目录下的rrd文件数量在不断的增长,只是磁盘使用情况非常的巨大。
2.线上监控的项目中包括nginx和mysql,插件用得open-falcon官方推荐的,这些采集的metric数量比较大,会不会产生他们的metric疯狂创建rrd文件的情况
非常感谢!!!
想问下,我如果想修改历史数据存储粒度为10s钟的点存储7天,应该怎么修改rrdtool.go文件
“我们参考RRDtool的理念,在数据每次存入的时候,会自动进行采样、归档。在默认的归档策略,一分钟push一次的频率下,历史数据保存5年。同时为了不丢失信息量,数据归档的时候,会按照平均值采样、最大值采样、最小值采样存三份。用户在查询某个metric,在过去一年的历史数据时,Graph会选择最合适的采样频率,返回采样过后的数据,提高了数据查询速度。”
对这段话,有几个疑问:
1、数据每次存入,怎么理解?什么情况下会触发一次数据存储?一次的存入量,怎么衡量?
2、一分钟push一次的频率下,历史数据保存5年。频率降低的话,是否可以存储更久的数据?
3、对于较久远的历史数据,保存的数据点会不会减少?
代码http/debug_http.go中 141行
if item.Step < g.MIN_STEP {
item.Step = g.MIN_STEP
}
为什么步长小于30s的强制设定成30s呢,而且是写死没法配置,不太理解,这个设计是出于什么考虑
root@fdc055cabfe3:/home/work/open-falcon# cat logs/graph.log
errno: 0x023a, str:opening error
errno: 0x023a, str:opening error
errno: 0x023a, str:opening error
errno: 0x023a, str:opening error
errno: 0x023a, str:opening error
errno: 0x023a, str:opening error
errno: 0x023a, str:opening error
errno: 0x023a, str:opening error
errno: 0x023a, str:opening error
errno: 0x023a, str:opening error
使用docker镜像默认配置部署的,dashboard 全部是空白没数据,发现这个错误信息, 不明白什么意思。
"rrd": {
"storage": "/home/work/open-falcon/data/6070"
},
这个目录下是空的,感觉是写数据打开文件失败?,但root启动有写入权限的
graph内存使用越来越大,不断增长,最后导致oomk,如何解决,谢谢~
store/storage.go 文件中
func (this *GraphItemMap) First(key string) *cmodel.GraphItem {
this.RLock()
defer this.RUnlock()
idx := int(hashKey(key)) % this.Size
L, ok := this.A[idx][key]
最近做tomcat的监控数据push到agent时,发现DashBoard上图标全是空白的,然后看falcon的日志,发现graph的app.log总是在报错:
[mysql] 2016/05/09 14:51:04 packets.go:33: unexpected EOF
[mysql] 2016/05/09 14:51:04 packets.go:124: write tcp 127.0.0.1:3306: broken pipe
[mysql] 2016/05/09 14:51:04 packets.go:124: write tcp 127.0.0.1:3306: broken pipe
[mysql] 2016/05/09 14:51:18 packets.go:33: unexpected EOF
[mysql] 2016/05/09 14:51:18 packets.go:124: write tcp 127.0.0.1:3306: broken pipe
是不是这里写数据库失败,导致DashBoard上都是空白 啊
curl -vsq localhost:6071/history/
$ cd ~/falcon-graph/
$ ./control tail
2017/05/12 18:08:51 server.go:2753: http: panic serving [::1]:59985: runtime error: index out of range
goroutine 20788 [running]:
net/http.(*conn).serve.func1(0xc4200a2c80)
/usr/local/go/src/net/http/server.go:1721 +0xd0
panic(0x4474900, 0x4720b30)
/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/open-falcon/graph/http.configProcRoutes.func3(0x46fb0a0, 0xc4202582a0, 0xc42000aa00)
/Users/youzhengchuan/go/src/github.com/open-falcon/graph/http/proc_http.go:30 +0x35c
net/http.HandlerFunc.ServeHTTP(0x450fe28, 0x46fb0a0, 0xc4202582a0, 0xc42000aa00)
/usr/local/go/src/net/http/server.go:1942 +0x44
net/http.(*ServeMux).ServeHTTP(0x472f380, 0x46fb0a0, 0xc4202582a0, 0xc42000aa00)
/usr/local/go/src/net/http/server.go:2238 +0x130
net/http.serverHandler.ServeHTTP(0xc4201ee000, 0x46fb0a0, 0xc4202582a0, 0xc42000aa00)
/usr/local/go/src/net/http/server.go:2568 +0x92
net/http.(*conn).serve(0xc4200a2c80, 0x46fba20, 0xc420224680)
/usr/local/go/src/net/http/server.go:1825 +0x612
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2668 +0x2ce
用的是最新版本的代码(gitversion 2d27dc2)
长期运行一直很稳定,今天凌晨意外崩溃了。。
可能和当时磁盘IO偏高有关
日志显示这样:
fatal error: concurrent map read and map write
goroutine 61213088 [running]:
runtime.throw(0x86725a, 0x21)
/usr/local/go/src/runtime/panic.go:566 +0x95 fp=0xc438085250 sp=0xc438085230
runtime.mapaccess2(0x7e6e60, 0xc42000d650, 0xc4399b9ac0, 0xc4380852e0, 0xc4380852e0)
/usr/local/go/src/runtime/hashmap.go:340 +0x249 fp=0xc438085298 sp=0xc438085250
reflect.mapaccess(0x7e6e60, 0xc42000d650, 0xc4399b9ac0, 0xc42000d650)
/usr/local/go/src/runtime/hashmap.go:1008 +0x3f fp=0xc4380852d0 sp=0xc438085298
reflect.Value.MapIndex(0x7e6e60, 0xc420088220, 0x195, 0x7c6f20, 0xc4399b9ac0, 0x98, 0x7dcc40, 0xc4399b9af0, 0x94)
/usr/local/go/src/reflect/value.go:1040 +0x128 fp=0xc438085358 sp=0xc4380852d0
encoding/json.(*mapEncoder).encode(0xc42012c208, 0xc42032e0b0, 0x7e6e60, 0xc420088220, 0x195, 0x100)
/usr/local/go/src/encoding/json/encode.go:646 +0x4f0 fp=0xc4380854b0 sp=0xc438085358
encoding/json.(*mapEncoder).(encoding/json.encode)-fm(0xc42032e0b0, 0x7e6e60, 0xc420088220, 0x195, 0x100)
/usr/local/go/src/encoding/json/encode.go:662 +0x64 fp=0xc4380854f0 sp=0xc4380854b0
encoding/json.(*structEncoder).encode(0xc420418ba0, 0xc42032e0b0, 0x83a420, 0xc4200881c0, 0x199, 0x100)
/usr/local/go/src/encoding/json/encode.go:601 +0x253 fp=0xc438085650 sp=0xc4380854f0
encoding/json.(*structEncoder).(encoding/json.encode)-fm(0xc42032e0b0, 0x83a420, 0xc4200881c0, 0x199, 0xc420080100)
/usr/local/go/src/encoding/json/encode.go:615 +0x64 fp=0xc438085690 sp=0xc438085650
encoding/json.(*ptrEncoder).encode(0xc42012c210, 0xc42032e0b0, 0x827500, 0xc4200881c0, 0x16, 0x820100)
/usr/local/go/src/encoding/json/encode.go:742 +0xe3 fp=0xc4380856d0 sp=0xc438085690
encoding/json.(*ptrEncoder).(encoding/json.encode)-fm(0xc42032e0b0, 0x827500, 0xc4200881c0, 0x16, 0xc420080100)
/usr/local/go/src/encoding/json/encode.go:747 +0x64 fp=0xc438085710 sp=0xc4380856d0
encoding/json.(*encodeState).reflectValue(0xc42032e0b0, 0x827500, 0xc4200881c0, 0x16, 0xc420080100)
/usr/local/go/src/encoding/json/encode.go:307 +0x82 fp=0xc438085748 sp=0xc438085710
encoding/json.interfaceEncoder(0xc42032e0b0, 0x7dcc40, 0xc42e1b02a0, 0x194, 0x7d0100)
/usr/local/go/src/encoding/json/encode.go:573 +0xdb fp=0xc438085788 sp=0xc438085748
encoding/json.(*arrayEncoder).encode(0xc42012c1a8, 0xc42032e0b0, 0x7bfa40, 0xc4416efaa0, 0x97, 0x100)
/usr/local/go/src/encoding/json/encode.go:723 +0xee fp=0xc4380857e0 sp=0xc438085788
encoding/json.(*arrayEncoder).(encoding/json.encode)-fm(0xc42032e0b0, 0x7bfa40, 0xc4416efaa0, 0x97, 0x100)
/usr/local/go/src/encoding/json/encode.go:730 +0x64 fp=0xc438085820 sp=0xc4380857e0
encoding/json.(*sliceEncoder).encode(0xc42012c1b0, 0xc42032e0b0, 0x7bfa40, 0xc4416efaa0, 0x97, 0x7b0100)
/usr/local/go/src/encoding/json/encode.go:697 +0xc1 fp=0xc438085860 sp=0xc438085820
encoding/json.(*sliceEncoder).(encoding/json.encode)-fm(0xc42032e0b0, 0x7bfa40, 0xc4416efaa0, 0x97, 0xc4416e0100)
/usr/local/go/src/encoding/json/encode.go:709 +0x64 fp=0xc4380858a0 sp=0xc438085860
encoding/json.(*encodeState).reflectValue(0xc42032e0b0, 0x7bfa40, 0xc4416efaa0, 0x97, 0xc4416e0100)
/usr/local/go/src/encoding/json/encode.go:307 +0x82 fp=0xc4380858d8 sp=0xc4380858a0
encoding/json.interfaceEncoder(0xc42032e0b0, 0x7dcc40, 0xc4416efcb0, 0x94, 0x100)
/usr/local/go/src/encoding/json/encode.go:573 +0xdb fp=0xc438085918 sp=0xc4380858d8
encoding/json.(*structEncoder).encode(0xc420418a20, 0xc42032e0b0, 0x802880, 0xc4416efca0, 0x99, 0x800100)
/usr/local/go/src/encoding/json/encode.go:601 +0x253 fp=0xc438085a78 sp=0xc438085918
encoding/json.(*structEncoder).(encoding/json.encode)-fm(0xc42032e0b0, 0x802880, 0xc4416efca0, 0x99, 0xc4416e0100)
/usr/local/go/src/encoding/json/encode.go:615 +0x64 fp=0xc438085ab8 sp=0xc438085a78
encoding/json.(*encodeState).reflectValue(0xc42032e0b0, 0x802880, 0xc4416efca0, 0x99, 0x100)
/usr/local/go/src/encoding/json/encode.go:307 +0x82 fp=0xc438085af0 sp=0xc438085ab8
encoding/json.(*encodeState).marshal(0xc42032e0b0, 0x802880, 0xc4416efca0, 0x100, 0x0, 0x0)
/usr/local/go/src/encoding/json/encode.go:280 +0xb8 fp=0xc438085b28 sp=0xc438085af0
encoding/json.Marshal(0x802880, 0xc4416efca0, 0x20, 0xc4204d2401, 0xc4416efca0, 0xc42bde3bd0, 0x41131b)
/usr/local/go/src/encoding/json/encode.go:145 +0x8f fp=0xc438085b70 sp=0xc438085b28
github.com/open-falcon/graph/http.RenderJson(0xc3d3e0, 0xc4287aa410, 0x802880, 0xc4416efca0)
/usr/local/gopath/src/github.com/open-falcon/graph/http/http.go:32 +0x39 fp=0xc438085bd0 sp=0xc438085b70
github.com/open-falcon/graph/http.RenderDataJson(0xc3d3e0, 0xc4287aa410, 0x7bfa40, 0xc4416efaa0)
/usr/local/gopath/src/github.com/open-falcon/graph/http/http.go:42 +0xb4 fp=0xc438085c28 sp=0xc438085bd0
github.com/open-falcon/graph/http.configProcRoutes.func2(0xc3d3e0, 0xc4287aa410, 0xc4336d50e0)
/usr/local/gopath/src/github.com/open-falcon/graph/http/proc_http.go:20 +0x92 fp=0xc438085c78 sp=0xc438085c28
net/http.HandlerFunc.ServeHTTP(0x893c08, 0xc3d3e0, 0xc4287aa410, 0xc4336d50e0)
/usr/local/go/src/net/http/server.go:1726 +0x44 fp=0xc438085ca0 sp=0xc438085c78
net/http.(*ServeMux).ServeHTTP(0xc53c40, 0xc3d3e0, 0xc4287aa410, 0xc4336d50e0)
/usr/local/go/src/net/http/server.go:2022 +0x7f fp=0xc438085ce0 sp=0xc438085ca0
net/http.serverHandler.ServeHTTP(0xc420138100, 0xc3d3e0, 0xc4287aa410, 0xc4336d50e0)
/usr/local/go/src/net/http/server.go:2202 +0x7d fp=0xc438085d28 sp=0xc438085ce0
net/http.(*conn).serve(0xc42badfc80, 0xc3de60, 0xc45161aec0)
/usr/local/go/src/net/http/server.go:1579 +0x4b7 fp=0xc438085f88 sp=0xc438085d28
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc438085f90 sp=0xc438085f88
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2293 +0x44d
我们上报了一个数值,python 写的,value 大概是 79.999909123972 这个样子。基本不变。
但是看图的时候,graph 的 y 座标全部写的 80.000,曲线看起来波动很大(实际上极差不超过 0.0000001)。
应该可以限制绘图的最小精度?
没有错误日志,如何定位原因
现在graph和mysql连接后,是否对wait_timeout的心跳检测,今天在日志中发现了如下日志:
[MySQL] 2015/09/14 14:52:41 packets.go:118: write tcp 127.0.0.1:3306: broken pipe
[MySQL] 2015/09/14 14:52:41 packets.go:118: write tcp 127.0.0.1:3306: broken pipe
[MySQL] 2015/09/14 14:52:41 packets.go:118: write tcp 127.0.0.1:3306: broken pipe
[MySQL] 2015/09/14 14:52:41 packets.go:118: write tcp 127.0.0.1:3306: broken pipe
如果有该如何配置呢?
2015/07/16 17:09:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:10:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:10:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:11:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:11:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:12:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:12:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:13:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:13:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:14:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:14:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
2015/07/16 17:15:00 index_update_incr_task.go:90: 127.0.0.1 Error 1146: Table 'graph.endpoint' doesn't exist
`nowTs := time.Now().Unix()
lastUpTs := nowTs - nowTs%int64(step)
rra1StartTs := lastUpTs - int64(rrdtool.RRA1PointCnt*step)
// consolidated, do not merge
if start_ts < rra1StartTs {
resp.Values = datas
goto _RETURN_OK
}`
rra1StartTs 代表什么意思?怎样理解这段代码?
[root@localhost graph]# ls
api cfg.example.json control cron g http index LICENSE main.go NOTICE proc README.md rrdtool store test
[root@localhost graph]# git pull
Already up-to-date.
[root@localhost graph]# go get ./...
# github.com/open-falcon/graph/store
store/history.go:38: itemlist.(*"github.com/toolkits/container/list".SafeListLimited).FrontAll undefined (type *"github.com/toolkits/container/list".SafeListLimited has no field or method FrontAll)
store/history.go:57: slist.PushFrontViolently undefined (type *"github.com/toolkits/container/list".SafeListLimited has no field or method PushFrontViolently)
[root@localhost graph]# ./control build
# github.com/open-falcon/graph/store
store/history.go:38: itemlist.(*"github.com/toolkits/container/list".SafeListLimited).FrontAll undefined (type *"github.com/toolkits/container/list".SafeListLimited has no field or method FrontAll)
store/history.go:57: slist.PushFrontViolently undefined (type *"github.com/toolkits/container/list".SafeListLimited has no field or method PushFrontViolently)
./control: line 114: ./falcon-graph: No such file or directory
我是小白,不知道为什么graph启动报:IOWorkerNum must be 2^N, current IOWorkerNum is 0这个错,请大神帮助解答一下。
环境是四台Graph组成的集群,已经稳定运行一段时间,go是1.6.2,系统是centos 6,ssd硬盘
但是今天发现日志中出现大量的 errno: 0x023a, str:opening error
问题,大概每台有千行左右,四台graph都出现这样的问题,而且影响了出图,重启后又正常。
没有像 #17 中那样伴随着 errno: 0panic: runtime error: cgo argument has Go pointer to Go pointer
也没有像 #12 中那样一直报问题,版本也比较新,除了 #25 其他commit都有,而且部署的是实体机,没用docker
对于此问题也是没有一点头绪,请问能否解答分析一下问题出现的原因,如何避免呢?
现在group模块对metric在同一个timestamp的数据只保留收到的第一份,但业务上我们需要实现类似update的功能,数据有了变化会多次发送timestamp相同的数据。简单把下面代码中的continue去掉会到导致程序错误,有什么好的建议吗?
proc.GraphRpcRecvCnt.Incr()
// To Graph
first := store.GraphItems.First(key)
if first != nil && items[i].Timestamp <= first.Timestamp {
continue
}
store.GraphItems.PushFront(key, items[i], checksum, cfg)
// To Index
index.ReceiveItem(items[i], checksum)
// To History
store.AddItem(checksum, items[i])
手动上报的数据,用的 book 里面那个例子
如果只上报一次,Dashboard里出现的那个单点有约一半的概率会在接下来的20min内消失,去 graph/history 里查也显示没有数据
请问这是怎么回事?
PS:连续上报的数据没问题。
[root@yafei graph]# ./control start
start ok, pid=32122
[root@yafei graph]# ./control tail
2016/06/15 10:04:20 cfg.go:90: g.ParseConfig ok, file cfg.json
2016/06/15 10:04:20 db.go:22: g.InitDB, get db conn fail Error 1045: Access denied for user 'root'@'localhost' (using password: NO)
2016/06/15 10:06:09 cfg.go:90: g.ParseConfig ok, file cfg.json
2016/06/15 10:06:09 db.go:22: g.InitDB, get db conn fail Error 1193: Unknown system variable 'parsseTime'
2016/06/15 10:29:11 cfg.go:90: g.ParseConfig ok, file cfg.json
2016/06/15 10:29:11 db.go:22: g.InitDB, get db conn fail Error 1193: Unknown system variable 'parsseTime'
2016/06/15 10:36:27 cfg.go:90: g.ParseConfig ok, file cfg.json
2016/06/15 10:36:27 db.go:22: g.InitDB, get db conn fail Error 1193: Unknown system variable 'parsseTime'
2016/06/15 10:36:46 cfg.go:90: g.ParseConfig ok, file cfg.json
2016/06/15 10:36:46 db.go:22: g.InitDB, get db conn fail Error 1193: Unknown system variable 'parsseTime'
我在push data时,设定的timestamp比如是
tp=int(time.mktime(time.strptime('2017-07-08 00:10:00', '%Y-%m-%d %H:%M:%S')))
tp是1499443800,给定的value=93
我在调用/graph/history时候,设定"start": 1499150029, "end": 1499505624,返回的结果里面却没有这个时间戳,
[
{
"endpoint": "test-endpoint",
"counter": "test-metric/stats=cw",
"dstype": "GAUGE",
"step": 86400,
"Values": [
{
"timestamp": 1499212800,
"value": null
},
{
"timestamp": 1499299200,
"value": null
},
{
"timestamp": 1499385600,
"value": 93
},
{
"timestamp": 1499472000,
"value": null
}
]
}
]
值为93的时间戳显示的是1499385600,为什么会不一样呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.