Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

(12) use prometheus+Grafana to monitor ceph clusters

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

In previous versions of Ceph Luminous, third-party Prometheus exporterceph_exporter could be used. The mgr of Ceph Luminous 12.2.1 comes with the Prometheus plug-in and built-in Prometheus ceph exporter, and you can use Ceph mgr's built-in exporter as the target of Prometheus.

(1) introduction to the environment

Shell > ceph-v

Ceph version 14.2.4 nautilus (stable)

(2) Environmental preparation

① grafana deployment

Shell > yum-y install grafana

Shell > rpm-qa | grep grafana

Grafana-6.3.6-1.x86_64

Shell > netstat-tunlp | grep grafana # listens on port 3000

Http://10.10.204.38:3000 default password admin admin

② prometheus server deployment

View the link to deploy https://blog.51cto.com/7603402/2444837

(3) use the ceph mgr prometheus plug-in

① found the mgr active host.

Shell > ceph-s

Mgr: admin (active, since 107m), standbys: node140

② starts the plug-in on the ceph mgr admin node

Shell > ceph mgr module enable prometheus

③ to see if the plug-in starts

Shell > netstat-nltp | grep mgr

Tcp6 0 0: 9283: * LISTEN 59954/ceph-mgr

④ checks whether the data has been obtained

Shell > curl 127.0.0.1:9283/metrics # can see a large number of return values

(4) configure prometheus server to add ceph cluster job

Shell > vim prometheus.yml

# add spaces under scrape_configs: configuration item. Note that spaces follow the rule of yml 2 4 6 8 spaces.

-job_name: 'ceph_cluster' honor_labels: true scrape_interval: 5s static_configs:-targets: [' 10.10.202.142 static_configs 9283'] labels: instance: ceph

① restarts the prometheus service

Shell > systemctl restart prometheus

② checks whether the prometheus server has been added successfully.

Browser-"http://x.x.x.x:9090 -" status-"Targets"

(5) grafana add display

① browser logs in to the grafana management interface

To add data sources to ②, click configuration-- "data sources"

③ add dashboard

Click HOME-- "find dashboard on grafana.com"

④ searches ceph's dashboard

⑤ selects the appropriate dashboard, record number

⑥ Import dashboard re-select the import template and enter the number

⑦ 's beautiful dashboard can be shown:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report