一个比较老的问题了,因在Grafana界面上查询es数据时,传递的时间范围参数并不是浏览器本地时区(如CST),导致查询不到当天0~8h的数据: https://github.com/grafana/grafana/issues/16765
解决方法:
git clone --branch v6.5.2 https://github.com/grafana/grafana
//下载依赖
yarn install --pure-lockfile
//编译
yarn start
cd $GOPATH/src/github.com/grafana/grafana
vim public/app/plugins/datasource/elasticsearch/index_pattern.ts
// 将以下位置的utc替换成local
//编译
yarn start
//打包前端静态文件
tar zcvf public-fix.tar.gz public
修复前:
修复后:
原始数据: