-
Notifications
You must be signed in to change notification settings - Fork 136
toplingdb 使用 grafana prometheus 展示监控数据
mytrygithub edited this page Mar 9, 2022
·
1 revision
- 请勿在已有 grafana 和 prometheus 服务的主机上执行脚本。
- 操作系统支持centos 8 和阿里云 ecs 系统,其他系统未测试。
参考文档:https://github.com/topling/todis-grafana-install-shell/blob/main/README.md
git clone https://github.com/topling/todis-grafana-install-shell.git
cd todis-grafana-install-shell
wget "https://github.com/topling/todis-grafana-install-shell/releases/download/download_file/download.tar.gz"
tar xf download.tar.gz
这里 server_config 没有注释表示使用 server_config 中的配置内容。
function server_config() {
#server config
todis_host=localhost
todis_port=8000
prometheus_port=9090
prometheus_listen_port=9090
prometheus_host=localhost
grafana_host=localhost
grafana_port=3000
}
server_config
#local_config
#grafana_install_config
#toplingdb_config
#dell1_config
#oauth_config
sh install.sh
git clone https://github.com/topling/toplingdb.git
sudo yum -y install git libaio-devel gcc-c++ gflags-devel zlib-devel bzip2-devel
cd toplingdb
make -j`nproc` db_bench DEBUG_LEVEL=0
- 注意都是toplingdb目录下操作
mkdir /root/toplingdb_data
cp sideplugin/rockside/src/topling/web/{style.css,index.html} /root/toplingdb_data
cp sideplugin/rockside/sample-conf/lcompact_community.yaml .
- 端口:注意需要和 grafana 中 todis_port 端口对应
- db 目录:存储数据的目录,注意空间大小
lcompact_community.yaml中
listening_ports: '8000'
document_root: /root/toplingdb_data
path: /root/toplingdb_data/strings
export LD_LIBRARY_PATH=`find sideplugin -name lib_shared`
- 再次启动时注意删除之前遗留的db目录文件
rm -rf /root/toplingdb_data/strings/*
./db_bench -json lcompact_community.yaml -num 10000000 -disable_wal=true -value_size 2000 -benchmarks=fillrandom,readrandom -batch_size=10
string类型的内容和企业版相同,其他未设置。