「Prometheus」修訂間的差異

出自 Gea-Suan Lin's Wiki
跳至導覽 跳至搜尋
(创建页面,内容为“'''Prometheus'''是一個TSDB。 == 外部連結 == * {{Official|https://prometheus.io/}} {{en}} Category:軟體”)
 
安裝
(未顯示同一使用者於中間所作的 5 次修訂)
行 1: 行 1:
 
'''Prometheus'''是一個[[TSDB]]。
 
'''Prometheus'''是一個[[TSDB]]。
 +
 +
== 安裝 ==
 +
 +
[[Ubuntu]] 18.04系統內的Prometheus太舊(2.1),加上沒有適合的PPA可以用,這邊使用官方的binary安裝:
 +
 +
<syntaxhighlight lang="bash">
 +
cd /tmp; wget https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.16.0.linux-amd64.tar.gz; tar zxvf prometheus-2.16.0.linux-amd64.tar.gz; cd prometheus-2.16.0.linux-amd64; sudo cp prometheus promtool tsdb /usr/bin; sudo mkdir /etc/prometheus; sudo cp prometheus.yml /etc/prometheus/; sudo cp -R consoles/ console_libraries/ /etc/prometheus/; sudo useradd -r -U prometheus; sudo mkdir /var/lib/prometheus; sudo chown prometheus:prometheus /var/lib/prometheus; echo -n "[Unit]\nDescription=Prometheus Time Series Collection and Processing Server\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=prometheus\nGroup=prometheus\n\nType=simple\n
 +
ExecStart=/usr/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/prometheus/ --web.console.templates=/etc/prometheus/consoles --web.console.libraries=/etc/prometheus/console_libraries\n\n[Install]\nWantedBy=multi-user.target" | sudo tee /lib/systemd/system/prometheus.service; sudo systemctl daemon-reload; sudo systemctl enable prometheus; sudo service prometheus start
 +
</syntaxhighlight>
  
 
== 外部連結 ==
 
== 外部連結 ==

於 2020年3月23日 (一) 11:00 的修訂

Prometheus是一個TSDB

安裝

Ubuntu 18.04系統內的Prometheus太舊(2.1),加上沒有適合的PPA可以用,這邊使用官方的binary安裝:

cd /tmp; wget https://github.com/prometheus/prometheus/releases/download/v2.16.0/prometheus-2.16.0.linux-amd64.tar.gz; tar zxvf prometheus-2.16.0.linux-amd64.tar.gz; cd prometheus-2.16.0.linux-amd64; sudo cp prometheus promtool tsdb /usr/bin; sudo mkdir /etc/prometheus; sudo cp prometheus.yml /etc/prometheus/; sudo cp -R consoles/ console_libraries/ /etc/prometheus/; sudo useradd -r -U prometheus; sudo mkdir /var/lib/prometheus; sudo chown prometheus:prometheus /var/lib/prometheus; echo -n "[Unit]\nDescription=Prometheus Time Series Collection and Processing Server\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=prometheus\nGroup=prometheus\n\nType=simple\n
ExecStart=/usr/bin/prometheus --config.file /etc/prometheus/prometheus.yml --storage.tsdb.path /var/lib/prometheus/ --web.console.templates=/etc/prometheus/consoles --web.console.libraries=/etc/prometheus/console_libraries\n\n[Install]\nWantedBy=multi-user.target" | sudo tee /lib/systemd/system/prometheus.service; sudo systemctl daemon-reload; sudo systemctl enable prometheus; sudo service prometheus start

外部連結