prometheus01-Prometheus安装-创新互联

创新互联长期为上千余家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为银州企业提供专业的网站建设、成都做网站,银州网站改版等技术服务。拥有十余年丰富建站经验和众多成功案例,为您定制开发。
下载prometheus
https://prometheus.io/download/
tar xvfz prometheus-*.tar.gz
cd prometheus-*
mv prometheus-* /usr/local/prometheus

添加开机自启动
vim  /usr/lib/systemd/system/prometheus

[Unit]
Description=https://prometheus.io
 
[Service]
Restart=on-failure
ExecStart=/usr/local/prometheus/prometheus --config.file=/usr/local/prometheus/prometheus.yml
 
[Install]
WantedBy=multi-user.target


chmod +x  /usr/lib/systemd/system/prometheus
systemctl  start  prometheus systemctl  enable  prometheus

浏览:

http://ip:9090

出现问题:时间不一致(如下类似)

Warning! Detected 457.83 seconds time difference between your browser and the server. Prometheus relies on accurate time and time drift might cause unexpected query results.

解决办法:

我自己吧服务器时间同步至  time1.aliyun.com

ntpdate time1.aliyun.com

然后把电脑的时间也同步至time1.aliyun.com  即可解决

prometheus01-Prometheus安装

l global:全局配置

l alerting:告警配置

l rule_files:告警规则

l scrape_configs:配置数据源,称为target,每个target用job_name命名。又分为静态配置和服务发现

prometheus01-Prometheus安装

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网页题目:prometheus01-Prometheus安装-创新互联
文章路径:http://pwwzsj.com/article/cecopc.html