顯示具有 Graphite 標籤的文章。 顯示所有文章
顯示具有 Graphite 標籤的文章。 顯示所有文章

2024/06/06

Graphite APT安裝心得

最近嘗試監控Proxmox VE Node所以花了一點時間去弄Graphite的安裝方式,結果Graphite官方文件的安裝說明簡略到不行。最終總算成功了。

安裝流程可以參考 https://luppeng.wordpress.com/2023/04/15/install-and-setup-graphite-on-ubuntu-server-22-04-via-apt-repository/ 的說明。

安裝環境

OS: Ubuntu 22.04

Web Server: Nginx

Python: 3.10


1. 系統更新到最新

apt update -y && apt upgrade -y


2. 安裝相關套件

apt install nano wget curl unzip -y

3. Graphite , Nginx, uWSGI安裝

apt install graphite-web graphite-carbon graphite-api nginx-full uwsgi uwsgi-plugins-all -y 

4. 設定Carbon-Cache

     這部份參照上方說明網站的Step 3即可

5. 建立Graphite Web的database

     這部份同樣參照說明網站的Step 5即可 

6. Graphite Web的設定檔

    這邊是參造說明網站的Step 6,可以用下面的指令產生SECRET_KEY

python3 -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'

    免得啟用後會一直跳WARNING洗LOG,所以還是把KEY加上比較好。

    接著是依據Step 7做一個symbol link放到Graphie Web Python Application的實際位置

ln -s /etc/graphite/local_settings.py /usr/lib/python3/dist-packages/graphite/local_settings.py

  7. nginx的設定

      這邊直接參考 graphite官方的即可