Prometheus介紹
Prometheus是由SoundCloud開發(fā)的開源監(jiān)控報(bào)警系統(tǒng)和時(shí)序列數(shù)據(jù)庫(kù)(TSDB)罕模。Prometheus使用Go語(yǔ)言開發(fā),是Google BorgMon監(jiān)控系統(tǒng)的開源版本嘶伟。
Prometheus架構(gòu)
image.png
下載頁(yè)面
https://prometheus.io/download/
解壓
tar -zxvf prometheus-2.33.3.linux-amd64.tar.gz
修改配置參數(shù)
vim prometheus.yml
global:
scrape_interval: 15s
evaluation_interval: 15s
rule_files:
# - "first.rules"
# - "second.rules"
scrape_configs:
- job_name: prometheus
static_configs:
- targets: ['localhost:9090']
啟動(dòng)服務(wù)(默認(rèn)9090端口)
./prometheus --config.file=prometheus.yml
指定端口啟動(dòng)命令
nohup ./prometheus --config.file=prometheus.yml --web.listen-address=:9090 &
訪問(wèn)服務(wù)
查看UI界面prometheus狀態(tài)為up可婶,說(shuō)明配置成功芍阎。
image.png
退出服務(wù)
查找出pid
ps -ef | grep prometheus