prometheus安装配置

版权声明:皆为本人原创,复制必究 https://blog.csdn.net/m493096871/article/details/88768080

prometheus的特点

和其他监控系统相比,普罗米修斯的特点包括:

  • 多维数据模型(时序列数据由度量名和一组键/值组成)
  • 在多维度上灵活的查询语言(PromQl)
  • 不依赖分布式存储,单主节点工作。
  • 通过基于HTTP的拉方式采集时序数据
  • 可以通过中间网关进行时序列数据推送(推压)
  • 目标服务器可以通过发现服务或者静态配置实现
  • 多种可视化和仪表盘支持

prometheus相关组件

普罗米修斯生态系统由多个组件组成,其中许多是可选的:

  • Prometheus主服务,用来抓取和存储时序数据
  • 客户端库用来构造应用程序或出口代码(go,java,python,ruby)
  • 推网络可用来支持短连接任务
  • 可视化的仪表板(两种选择,promdash和grafana。目前主流选择是grafana。)
  • 一些特殊需求的数据出口(用于HAProxy,StatsD,Graphite等服务)
  • 实验性的报警管理端(alartmanager,单独进行报警汇总,分发,屏蔽等)

prometheus的各个组件基本都是用golang编写,对编译和部署十分友好。并且没有特殊依赖。基本都是独立工作。

https://prometheus.io/download/

prometheus-2.8.0.linux-amd64.tar.gz

参考文档

https://prometheus.io/docs/prometheus/latest/querying/basics/

[root@server1 ~]# tar zxf prometheus-2.3.2.linux-amd64.tar.gz
[root@server1 ~]# cd prometheus-2.3.2.linux-amd64
[root@server1 prometheus-2.3.2.linux-amd64]# ls
console_libraries  LICENSE  prometheus      promtool
consoles           NOTICE   prometheus.yml

[root@server1 prometheus-2.3.2.linux-amd64]# cp prometheus promtool /usr/local/bin/

[root@server1 prometheus-2.3.2.linux-amd64]# prometheus --version
prometheus, version 2.3.2 (branch: HEAD, revision: 71af5e29e815795e9dd14742ee7725682fa14b7b)
  build user:       root@5258e0bd9cc1
  build date:       20180712-14:02:52
  go version:       go1.10.3

[root@server1 prometheus-2.3.2.linux-amd64]# promtool check config prometheus.yml
Checking prometheus.yml
  SUCCESS: 0 rule files found

[root@server1 prometheus-2.3.2.linux-amd64]# ./prometheus --config.file "prometheus.yml" --web.enable-lifecycle

http://172.25.11.1:9090/graph

[root@server1 prometheus-2.3.2.linux-amd64]# ps -aux | grep prom
root      1217  0.0  0.0 112648   960 pts/0    R+   22:16   0:00 grep --color=auto prom

猜你喜欢

转载自blog.csdn.net/m493096871/article/details/88768080