ubuntu下docker安装prometheus

Prometheus是由SoundCloud开发的开源监控报警系统和时序列数据库(TSDB)。Prometheus使用Go语言开发,是Google BorgMon监控系统的开源版本。
2016年由Google发起Linux基金会旗下的原生云基金会(Cloud Native Computing Foundation), 将Prometheus归入其下第二大开源项目。
Prometheus和Heapster(Heapster是K8S的一个子项目,用于获取集群的性能数据。)相比功能更完善、更全面。Prometheus性能也足够支撑上万台规模的集群。linux

Prometheus的特色

  • 多维度数据模型。docker

  • 灵活的查询语言。数据库

  • 不依赖分布式存储,单个服务器节点是自主的。vim

  • 经过基于HTTP的pull方式采集时序数据。浏览器

  • 能够经过中间网关进行时序列数据推送。bash

  • 经过服务发现或者静态配置来发现目标服务对象。服务器

  • 支持多种多样的图表和界面展现,好比Grafana等。分布式


查看是否有镜像ide

sudo docker search prometheus性能

image.png


编写配置文件

vim prometheus.yml


内容 

global:

  scrape_interval:     60s

  evaluation_interval: 60s

 

scrape_configs:

  - job_name: prometheus

    static_configs:

      - targets: ['localhost:9191']

        labels:

          instance: prometheus

 

  - job_name: linux

    static_configs:

      - targets: ['10.0.14.135:9191']

        labels:

          instance: localhost


启动

sudo docker run --name prometheus -d -p 9090:9090 -v ~/soft/prometheus.yml:/etc/prometheus/prometheus.yml   prom/prometheus


浏览器访问

image.png

相关文章
相关标签/搜索