-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from resilientdb/grafna
Grafna
- Loading branch information
Showing
6 changed files
with
118 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Download Prometheus | ||
wget https://github.com/prometheus/prometheus/releases/download/v2.47.0/prometheus-2.47.0.linux-amd64.tar.gz | ||
tar xvf prometheus-2.47.0.linux-amd64.tar.gz | ||
mv prometheus-2.47.0.linux-amd64 prometheus | ||
|
||
# Download node_exporter | ||
wget https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz | ||
tar xvf node_exporter-1.6.1.linux-amd64.tar.gz | ||
|
||
# Download and Install grafana | ||
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - | ||
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main" | ||
sudo apt update | ||
sudo apt install grafana | ||
|
||
# Start Prometheus | ||
cp prometheus.yml prometheus/ | ||
|
||
#Start grafana | ||
sudo service grafana-server start | ||
|
||
#Start Prometheus | ||
./prometheus | ||
|
||
#Start exporter in each node where the service is running | ||
./node_exporter | ||
|
||
#Running Prometheus or Exporter in dark | ||
nohup ./prometheus & 2>&1 | ||
nohup ./node_exporter & 2>&1 | ||
|
||
More details: | ||
https://blog.resilientdb.com/2022/12/06/NexResGrafanaDashboardInstallation.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# my global config | ||
global: | ||
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. | ||
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. | ||
# scrape_timeout is set to the global default (10s). | ||
|
||
# Alertmanager configuration | ||
alerting: | ||
alertmanagers: | ||
- static_configs: | ||
- targets: | ||
# - alertmanager:9093 | ||
|
||
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. | ||
rule_files: | ||
# - "first_rules.yml" | ||
# - "second_rules.yml" | ||
|
||
# A scrape configuration containing exactly one endpoint to scrape: | ||
# Here it's Prometheus itself. | ||
scrape_configs: | ||
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. | ||
- job_name: "prometheus" | ||
static_configs: | ||
- targets: ["localhost:9090"] | ||
- job_name: "node_exporter1" | ||
static_configs: | ||
- targets: ["172.31.52.247:9100"] | ||
- job_name: "node_exporter2" | ||
static_configs: | ||
- targets: ["172.31.54.193:9100"] | ||
- job_name: "node_exporter3" | ||
static_configs: | ||
- targets: ["172.31.55.48:9100"] | ||
- job_name: "node_exporter4" | ||
static_configs: | ||
- targets: ["172.31.53.140:9100"] | ||
- job_name: "node_exporter5" | ||
static_configs: | ||
- targets: ["172.31.57.186:9100"] | ||
- job_name: "cpp_client1" | ||
static_configs: | ||
- targets: ["172.31.52.247:8090"] | ||
- job_name: "cpp_client2" | ||
static_configs: | ||
- targets: ["172.31.54.193:8090"] | ||
- job_name: "cpp_client3" | ||
static_configs: | ||
- targets: ["172.31.55.48:8090"] | ||
- job_name: "cpp_client4" | ||
static_configs: | ||
- targets: ["172.31.53.140:8090"] | ||
- job_name: "cpp_client5" | ||
static_configs: | ||
- targets: ["172.31.57.186:8090"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
iplist=( | ||
172.31.14.56 | ||
172.31.5.62 | ||
172.31.8.207 | ||
172.31.12.105 | ||
172.31.3.13 | ||
172.31.52.247 | ||
172.31.54.193 | ||
172.31.55.48 | ||
172.31.53.140 | ||
172.31.57.186 | ||
) | ||
|
||
key=~/.ssh/your_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
service/tools/kv/server_tools/start_kv_service_monitoring.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
killall -9 kv_service | ||
|
||
SERVER_PATH=./bazel-bin/service/kv/kv_service | ||
SERVER_CONFIG=service/tools/config/server/server.config | ||
WORK_PATH=$PWD | ||
CERT_PATH=${WORK_PATH}/service/tools/data/cert/ | ||
GRAFANA_PORT=8090 | ||
|
||
bazel build //service/kv:kv_service $@ | ||
nohup $SERVER_PATH $SERVER_CONFIG $CERT_PATH/node1.key.pri $CERT_PATH/cert_1.cert 8090 > server0.log & | ||
nohup $SERVER_PATH $SERVER_CONFIG $CERT_PATH/node2.key.pri $CERT_PATH/cert_2.cert 8091 > server1.log & | ||
nohup $SERVER_PATH $SERVER_CONFIG $CERT_PATH/node3.key.pri $CERT_PATH/cert_3.cert 8092 > server2.log & | ||
nohup $SERVER_PATH $SERVER_CONFIG $CERT_PATH/node4.key.pri $CERT_PATH/cert_4.cert 8093 > server3.log & | ||
|
||
nohup $SERVER_PATH $SERVER_CONFIG $CERT_PATH/node5.key.pri $CERT_PATH/cert_5.cert 8094 > client.log & |