- vừa được xem lúc

[P1] Cài đặt Prometheus + Grafana trên Ubuntu 20.04

0 0 35

Người đăng: Chien Tran

Theo Viblo Asia

Cài đặt Prometheus

wget https://github.com/prometheus/prometheus/releases/download/v2.33.3/prometheus-2.33.3.linux-amd64.tar.gz
tar -xvzf prometheus-2.33.3.linux-amd64.tar.gz
mv prometheus-2.33.3.linux-amd64 /usr/local/prometheus/
  • Tạo service prometheus trong systemd
vi /etc/systemd/system/prometheus.service
  • Để nội dung file:
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target [Service]
User=root
Group=root
Type=simple
ExecStart=/usr/local/prometheus/prometheus \
--config.file /usr/local/prometheus/prometheus.yml \
--storage.tsdb.path /usr/local/prometheus/ \
--web.console.templates=/usr/local/prometheus/consoles \
--web.console.libraries=/usr/local/prometheus/console_libraries [Install]
WantedBy=multi-user.target
  • Restart và enable services.
systemctl daemon-reload
systemctl start prometheus
systemctl status prometheus

Cài đặt Grafana

sudo apt-get install -y adduser libfontconfig1
wget https://dl.grafana.com/enterprise/release/grafana-enterprise_8.4.1_amd64.deb
sudo dpkg -i grafana-enterprise_8.4.1_amd64.deb
service grafana-server start
systemctl daemon-reload
systemctl start grafana-server
systemctl status grafana-server
sudo systemctl enable grafana-server.service
  • Sau khi cài đặt xong truy cập vào Grfana: http://IP:3000 default password: admin/admin

Bình luận

Bài viết tương tự

- vừa được xem lúc

Chỉ bạn 5 tips với Prometheus và Prometheus Exporters để cải thiện hiệu năng hệ thống.

Dự án Prometheus của Cloud Native Computing Foundation (CNCF) là một giải pháp giám sát và cảnh báo mã nguồn mở phổ biến, được tối ưu hóa cho các môi trường bộ chứa (container). Prometheus hiện nay đa

0 0 39

- vừa được xem lúc

[K8S] Phần 8 - Monitoring trên Kubernetes Cluster dùng Prometheus và Grafana

Lời tựa. Chào các bạn, hôm nay chúng ta sẽ đến với một topic khá hot khi làm việc với Kubernetes đó là Monitoring, cụ thể hơn là Prometheus và Grafana - Cái mà hầu như ai làm với K8S sẽ đều phải va ch

0 0 120

- vừa được xem lúc

[K8S] Phần 9 - Tối ưu hóa cấu hình Prometheus dùng Service Monitor

Lời tựa. Chào các bạn, sau bài viết về Monitoring trên Kubernetes sử dụng Prometheus thì có rất nhiều bạn quan tâm tới chủ đề này.

0 0 27

- vừa được xem lúc

Giám sát mọi thứ với Python Exporter cho Prometheus

Python Exporter là gì. Nếu như các bạn đã quen với việc dựng các service database, web server, queue,.

0 0 33

- vừa được xem lúc

Sử dụng Prometheus, Blackbox Exporter, Alert Manager và Grafana để theo dõi trạng thái uptime website như updown.io

Uptime là gì? Tại sao cần theo dõi nó . Một trong những tính quan trọng nhất của trang web là tính khả dụng.

0 0 37

- vừa được xem lúc

Monitoring with Prometheus Series - What is Monitoring?

Monitoring with Prometheus Series. Chào các bạn tới với Monitoring with Prometheus Series.

0 0 27