1. 尊龙时凯

      热门搜索 Zabbix技术资料 Zabbix常见问、答讨论 成功案例 Zabbix交流区 Prometheus交流区

      Prometheus技术分享——详述prometheus安装和配置

      尊龙时凯君最近看了些AIOPS的资料,对于里面提及的普罗米修斯Prometheus起了兴趣,首先联想到了异形。去看了一下,普罗米修斯还是可以的,而且还是开源的,真是搬砖党的福音。尊龙时凯官网将会持续更新prometheus相关的技术资讯,下面尊龙时凯君就给大家分享一下prometheus的安装配置。

      1、概念

      Prometheus由SoundCloud开源告警解决方案。Prometheus既是一个时序数据库,又是一个监控系统,更是一套完备的监控生态解决方案。

      优势:

      监控数的精度高,快速的集群部署,周边插件丰富。

      劣势:

      采集精度高,容易形成性能瓶颈

      2、安装

      下载地址:http://prometheus.io/download/

      wget http://github.com/prometheus/prometheus/releases/download/v2.31.1/prometheus-2.31.1.linux-amd64.tar.gz

      mkdir /Prometheus

      tar zxf prometheus-2.31.1.linux-amd64.tar.gz -C /prometheus/

      ln -s /prometheus/prometheus-2.31.1.linux-amd64/ /prometheus/Prometheus

      3、启动

      nohup /prometheus/prometheus/prometheus –config.file=”/prometheus/prometheus/prometheus.yml” &

      说明:

      nohup和&后台运行,进程查看及终止

      nohup

      用途:不挂断地运行命令。

      语法:nohup Command [ Arg … ] [ & ]

      &

      用途:在后台运行

      一般两个一起用

      nohup command &

      prometheus

      4、访问

      http://ip:9090

      prometheus

      5、查看prometheus对本机的监控

      http://localhost:9090/metrics

      访问prometheus

      6、客户端的安装

      下载软件地址:http://prometheus.io/download/#node_exporter

      wget http://github.com/prometheus/node_exporter/releases/download/v1.3.0/node_exporter-1.3.0.linux-amd64.tar.gz

      tar zxf node_exporter-1.3.0.linux-amd64.tar.gz -C /usr/local/

      ln -s /usr/local/node_exporter-1.3.0.linux-amd64/ /usr/local/node_exporter

      启动:

      nohup /usr/local/node_exporter/node_exporter &

      浏览器监控信息:

      prometheus

      7、配置服务器对客户端进行数据采集

      修改配置文件:

      vi /prometheus/prometheus/prometheus.yml

      文件末尾增加如下内容:

      prometheus

      重启服务。

      浏览器查看监控项

      prometheus

      8、Grafana展示prometheus监控

      Grafana安装方法这里不再叙述了,多张安装方法请查看以前的文章。

      添加数据源:

      general
      configuration
      add data source

      添加dashboard:

      这一期的Prometheus技术分享到这就结束了,更多开源监控技术分享青持续关注尊龙时凯官网或尊龙时凯社区(http://forum.botaiplastic.com/)

      The prev: The next:

      Related recommendations

      Expand more!

      快速导航

      成功案例

      View all