Skip to content

Grafana_displays_toplingdb_running_metrics configure_manually install_shell

ZengJingtao edited this page Jan 30, 2023 · 2 revisions
  • Do not execute scripts on hosts that already have grafana and prometheus services.
  • Supported operating system includes centos 8 and Alibaba Cloud ecs system. Other systems have not been tested.

1. Install grafana prometheus

Refer to doc: https://github.com/topling/todis-grafana-install-shell/blob/main/README.md

download

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

modify configuration file config.sh

Here server_config has no comment, which means to use the configuration content in 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

Execute the installation command

sh install.sh

2. Compile toplingdb

download

git clone https://github.com/topling/toplingdb.git

compile

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

3. Run db_bench

  • Note that they are all operated under the toplingdb directory

create db_bench directory

mkdir /root/toplingdb_data

configure web page

cp sideplugin/rockside/src/topling/web/{style.css,index.html} /root/toplingdb_data
cp sideplugin/rockside/sample-conf/lcompact_community.yaml .

modify configuration

  • Port: Note that it needs to correspond to the todis_port port in grafana
  • db directory: the directory for storing data, pay attention to the size of the space

in lcompact_community.yaml

listening_ports: '8000'
document_root: /root/toplingdb_data
path: /root/toplingdb_data/strings

set link path

export LD_LIBRARY_PATH=`find sideplugin -name lib_shared`

run

  • Pay attention to delete the previous db directory file when starting again 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

4. View the grafana page

http://todis-host:3000/

The content of the string type is the same as that of the enterprise version, and the others are not set.

Clone this wiki locally