grafana监控oceanbase-obagent部署

1.Install ob-deploy in obd server(obdserver can be a ocp server)

(1)download newest version of ob-deploy and obagent,upload them to /soft directory

oceanbase-community-stable-el-7-x86_64安装包下载_开源镜像站-阿里云

(2) install obdeploy

rpm -ivh ob-deploy-1.6.2-10.el7.x86_64.rpm

2.Install obagent on all observers

su - admin

(1)prepare mirror

su - admin

obd mirror disable remote

cd /soft

obd mirror clone *.rpm

obd mirror list

(2)configure admin user ssh passwordless between obd server and observers,and ensure 8088 and 8089 of observers are not occupied

netstat -an|grep 8088

netstat -an|grep 8089

(3) prepare obagent-only.yaml

download obagent-only-example.yaml from github

obdeploy/obagent-only-example.yaml at master · oceanbase/obdeploy · GitHub

You need modify [servers]/[monitor_password]/[cluster_name]/[cluster_id] and [zone ips]

(4)install obagent

obd cluster deploy only-obagent -c obagent-only.yaml

obd cluster list

obd cluster start only-obagent

obd cluster list

(5)check if obagent started successfully

ssh {observerip}

ps -ef|grep obagent

(6)check monitoring details

host related:

curl --user admin:root http://{observerip}:8088/metrics/node/host

ob related:

curl --user admin:root http://{observerip}:8088/metrics/ob/basic

(7)if you need reinstall obagent,following commmands below and reinstall(optional)

obd cluster stop only-obagent

obd cluster destroy only-obagent

3.Install and start prometheus(choose the obd server)

(1)download prometheus

Download | Prometheus

(2) install and configure prometheus

groupadd prometheus

useradd -g prometheus prometheus

cd /usr/local

tar -xvf /soft/prometheus-2.35.0.linux-amd64.tar.gz

mv prometheus-2.35.0.linux-amd64 prometheus

cd prometheus/

mv prometheus.yml prometheus.yml.bk

scp root@{observerip}:/home/admin/obagent/conf/prometheus_config/prometheus.yaml .

scp -r root@{observerip}:/home/admin/obagent/conf/prometheus_config/rules .

vi prometheus.yaml

modify localhost:9090 to {your ip}:9090

chown -R prometheus.prometheus /usr/local/prometheus

mkdir -p /home/prometheus/data

chown -R prometheus.prometheus /home/prometheus/data

vi /etc/systemd/system/prometheus.service

[Unit]

Description=prometheus

After=network.target

[Service]

Type=simple

User=prometheus

ExecStart=/usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml --storage.tsdb.path=/home/prometheus/data

Restart=on-failure

[Install]

WantedBy=multi-user.target

(3)start prometheus

systemctl enable prometheus.service

systemctl start prometheus.service

(4)check prometheus

http://{your ip}:9090/

4.configure grafana

(1)download json of ob for grafana

Oceanbase Metrics | Grafana Labs

Host Metrics | Grafana Labs

Obproxy Metrics | Grafana Labs

(2) add new prometheus data source as prometheus and configure url as http://{your ip}:9090/

(3)import json files to grafana and choose data source - prometheus

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值