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

Methods of using Grafana to monitor Doris

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article focuses on "how to use Grafana to monitor Doris". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use Grafana to monitor Doris.

Prometheus server installation

Prometheus is an open monitoring solution, users can easily install and use Prometheus and can easily expand it. In order to understand Prometheus Server more intuitively, we will deploy and run a Prometheus Server instance locally to collect the system resource usage of the current host through Node Exporter. And create a simple visual dashboard through Grafana.

Prometheus is based on Golang and compiles software packages that do not depend on any third-party dependencies. Users only need to download the binary package of the corresponding platform, decompress it and add basic configurations to start Prometheus Server normally. For the specific installation process, please refer to the following.

Install and configure Prometheus Server

This time we choose to install prometheus on CentOS7. The installation process of other systems is similar, so I won't repeat them here.

For security, we don't need root users to start related services here. Instead, we use our self-built prometheus users to start services. First, we need to create a user:

➜groupadd prometheus➜ useradd-g prometheus-M-s / sbin/nologin prometheus

We need to download the version we need to install from the prometheus download page, and here we choose to install the latest version of prometheus v2.7.1.

➜wget https://github.com/prometheus/prometheus/releases/download/v2.7.1/prometheus-2.7.1.linux-amd64.tar.gz

Extract and install the prometheus service:

➜tar xf prometheus-2.22.2.linux-amd64.tar-C / srv/➜ cd / soft/ ➜mv prometheus-2.22.2.linux-amd64/ prometheus➜ mkdir-pv / soft/prometheus/data ➜chown-R prometheus.prometheus / soft/prometheus

Create the prometheus system service startup file / usr/lib/systemd/system/prometheus.service:

[Unit] Description=Prometheus Server Documentation= https://prometheus.io/docs/introduction/overview/ After=network-online.target [Service] User=prometheus Restart=on-failure ExecStart=/soft/prometheus/prometheus\-- config.file=/soft/prometheus/prometheus.yml\-- storage.tsdb.path=/srv/prometheus/data ExecReload=/bin/kill-HUP $MAINPID [Install] WantedBy=multi-user.target

Modify the prometheus configuration file / srv/prometheus/prometheus.yml:

➜grep-v'^ #'/ srv/prometheus/prometheus.yml global: scrape_interval: 15s evaluation_interval: 15s alerting: alertmanagers:-static_configs:-targets: ["localhost:9093"] rule_files: #-"alert.rules" scrape_configs: # The job name is added as a label `job= `to any timeseries scraped from this config. -job_name: 'DORIS_CLUSTER' # every Doris cluster, we call it a job. Here you can give job a name as the name of the Doris cluster in the monitoring system. Metrics_path:'/ metrics' # here specifies the restful api to get the monitoring item. With the host:port,Prometheus in the targets below, the monitoring items will eventually be collected through host:port/metrics_path. Static_configs: # configure the destination addresses of FE and BE respectively. All FE and BE are written to their respective group. -targets: ['doris01:8030'] labels: group: fe # fe's group is configured here, and the group contains three Frontends-targets: [' doris02:8040', 'doris03:8040',' doris04:8040', 'doris05:8040',' doris06:8040', 'doris07:8040'] labels: group: be # be's group is configured here The group contains three Backends-job_name: 'prometheus' # metrics_path defaults to' / metrics' # scheme defaults to 'http'. Static_configs:-targets: ['localhost:9090']

Start the service:

➜systemctl daemon-reload➜ systemctl start prometheus.service ➜systemctl enable prometheus.service➜ systemctl status prometheus.service

The Prometheus service supports hot load configurations:

➜systemctl reload prometheus.service

After the Prometheus service is started, you can access the UI interface of Prometheus through http://localhost:9090.

Install the Grafana display tool

Grafana we mainly use it to display the monitoring metrics of Prometheus, so that we can directly view the status of each node or service. We can install grafana directly with yum this time. For specific operations, you can also refer to the official documentation.

Write in the rpm installation package

Wget https://dl.grafana.com/oss/release/grafana-7.3.3-1.x86_64.rpm starts grafana

Set the grafana service to boot and start the service

# systemctl daemon-reload # systemctl enable grafana-server.service # systemctl start grafana-server.service access grafana

The browser accesses http://192.168.56.200:3000 (IP:3000 port) to open the grafana page. The default user name and password is admin. The default login password will be changed for the first login.

Then define the data source, define the Dashboard, or import the Dashboard json file

At this point, I believe you have a deeper understanding of the method of using Grafana to monitor Doris. You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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

Internet Technology

Wechat

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

12
Report