Prometheus

ASP.NET Core 集成Prometheus+grafana

≯℡__Kan透↙ 提交于 2020-03-30 12:19:13
相关主页 Prometheus https://prometheus.io/ grafana https://grafana.com/ 安装Prometheus Linux 可以参考 https://www.cnblogs.com/linkanyway/p/Configure-a-Prometheus-Monitoring-Server-with-a-Gr.html windows: 下载地址: https://prometheus.io/download/ 下载对应windows版本 解压后在命令行运行 prometheus.exe 然后访问 http://localhost:9090/ 出现以下页面说明启动成功: 如果要添加监视服务器可以配置:prometheus.yml global: scrape_interval: 15s evaluation_interval: 15s scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['localhost:9090'] - job_name: 'node_exporter' scrape_interval: 5s static_configs: - targets: ['localhost:9100'] node-exporter node

prometheus监控方案

荒凉一梦 提交于 2020-03-25 22:35:17
3 月,跳不动了?>>> 简介 prometheus 是一个开源的系统监控和告警的工具包,其采用pull方式采集时间序列,通过http协议传输。 架构 每个应用都通过javaagent向外提供一个http服务暴露出自己的JMX信息。当应用启动的时候就会向consul注册服务,注册成功后,prometheus就能把这个应用加入监控对象列表,进行数据收集并跟踪服务的状态。 部署 prometheus 官网下载 prometheus-1.2.1.linux-amd64.tar.gz , 解压到 /services/apps/ 目录下,修改配置文件 prometheus.yml,在 scrape_config节点下增加以下内容: - job_name: 'consul-node' consul_sd_configs: - server: 'localhost:8500' services: ['scorer','file-proxy','....'] services如果不配置默认会显示出所有的服务,包含了consul agent服务。 运行,默认端口9090 ./prometheus -config.file=prometheus.yml & prometheus jmx exporter jmx exporter是prometheus和JMX的桥梁。 在我们的工程里面,它是以Java

prometheus服务发现-不同场景下的service注册参数

情到浓时终转凉″ 提交于 2020-03-25 22:33:06
3 月,跳不动了?>>> 普通场景 { "ID": "2", "Name": "exporter-vcenter-ping", "Tags": [ "vcenter" ], "Address": "10.60.82.168", "Port": 3871, "Meta": { "component": "vcenter_ping", } } 此service注册到prometheus后,抓取的链接为 http://10.60.82.168:3871/metrics 重写metric path prometheus中的metric path主要是靠label中__metrics_path__来确定,默认为/metrics { "ID": "2", "Name": "exporter-vcenter-ping", "Tags": [ "normal" ], "Address": "10.60.82.168", "Port": 3871, "Meta": { "component": "vcenter_ping", "__metrics_path__":"/metrics/vcenter_ping" } } 此service注册到prometheus后,抓取的链接为 http://10.60.82.168:3871/metrics/vcenter_ping blackbox { "ID":

Label replace over a range vector in Prometheus

一个人想着一个人 提交于 2020-03-25 16:11:20
问题 I want to find the sum number of alerts for all the pods starting with "sendsms" over 10minutes. I am able to do use label_replace() to do this on the instant vector. But when i want to do this for over 10 minutes data, it cannot work as label_replace only works on instant vector. Explaining the problem with an example: ALERTS{alertname="CPUThrottlingHigh",pod="sendsms-dbed"} 10 ALERTS{alertname="CPUThrottlingHigh",pod="sendsms-ebed"} 20 ALERTS{alertname="CPUThrottlingHigh",pod="sendsms-fbed"

Label replace over a range vector in Prometheus

走远了吗. 提交于 2020-03-25 16:11:06
问题 I want to find the sum number of alerts for all the pods starting with "sendsms" over 10minutes. I am able to do use label_replace() to do this on the instant vector. But when i want to do this for over 10 minutes data, it cannot work as label_replace only works on instant vector. Explaining the problem with an example: ALERTS{alertname="CPUThrottlingHigh",pod="sendsms-dbed"} 10 ALERTS{alertname="CPUThrottlingHigh",pod="sendsms-ebed"} 20 ALERTS{alertname="CPUThrottlingHigh",pod="sendsms-fbed"

Label replace over a range vector in Prometheus

孤人 提交于 2020-03-25 16:10:48
问题 I want to find the sum number of alerts for all the pods starting with "sendsms" over 10minutes. I am able to do use label_replace() to do this on the instant vector. But when i want to do this for over 10 minutes data, it cannot work as label_replace only works on instant vector. Explaining the problem with an example: ALERTS{alertname="CPUThrottlingHigh",pod="sendsms-dbed"} 10 ALERTS{alertname="CPUThrottlingHigh",pod="sendsms-ebed"} 20 ALERTS{alertname="CPUThrottlingHigh",pod="sendsms-fbed"

实用干货丨如何使用Prometheus配置自定义告警规则

你说的曾经没有我的故事 提交于 2020-03-24 12:24:09
3 月,跳不动了?>>> 前 言 Prometheus是一个用于监控和告警的开源系统。一开始由Soundcloud开发,后来在2016年,它迁移到CNCF并且称为Kubernetes之后最流行的项目之一。从整个Linux服务器到stand-alone web服务器、数据库服务或一个单独的进程,它都能监控。在Prometheus术语中,它所监控的事物称为目标(Target)。每个目标单元被称为指标(metric)。它以设置好的时间间隔通过http抓取目标,以收集指标并将数据放置在其时序数据库(Time Series Database)中。你可以使用PromQL查询语言查询相关target的指标。 本文中,我们将一步一步展示如何: 安装Prometheus(使用prometheus-operator Helm chart)以基于自定义事件进行监控/告警 创建和配置自定义告警规则,它将会在满足条件时发出告警 集成Alertmanager以处理由客户端应用程序(在本例中为Prometheus server)发送的告警 将Alertmanager与发送告警通知的邮件账户集成。 理解Prometheus及其抽象概念 从下图我们将看到所有组成Prometheus生态的组件: 以下是与本文相关的术语,大家可以快速了解: Prometheus Server:在时序数据库中抓取和存储指标的主要组件

Docker整合Prometheus、Grafana监控Mysql

那年仲夏 提交于 2020-03-24 08:46:37
3 月,跳不动了?>>> 前言:接着上一篇文章整合Redis搭建Mysql监控,参考 https://my.oschina.net/wubiaowpBlogShare/blog/3036427 一、下载镜像 docker pull prom/mysqld-exporter 二、启动监控的数据库连接,容器创建的时候需要指定 docker run -d -p 9104:9104 -e DATA_SOURCE_NAME="root:password@(127.0.0.1:3306)/ databaseName " prom/mysqld-exporter 三、在prometheus.yml文件末尾追加( 也可以单独新建一个文件添加,Prometheus重启的时候要重新指定文件 ) - job_name: 'mysql' scrape_interval: 5s static_configs: - targets: ['服务器ip:9104'] labels: instance: mysql 四、重新启动Prometheus镜像,查看是否创建完成http://服务器ip:9090 五、导入Prometheus模板,参考上一篇文章,添加Mysql.json格式模板,下载地址:git clone https://github.com/percona/grafana-dashboards.git

Docker整合Prometheus、Grafana监控Redis

半世苍凉 提交于 2020-03-24 08:43:25
3 月,跳不动了?>>> 前沿:Docker环境下整合Prometheus和Grafana监控Redis性能 环境:Centos、Docker 一、下载镜像版本 docker pull prom/node-exporter ocker run -d -p 9100:9100 prom/node-exporter docker pull grafana/grafana docker run -d --name=grafana -p 3000:3000 grafana/grafana docker pull prom/prometheus 1、在/usr/local/src新建touch prometheus.yml文件,文件夹可自定义 2、编辑vim prometheus.yml global: scrape_interval: 15s evaluation_interval: 15s alerting: alertmanagers: - static_configs: - targets: rule_files: scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['localhost:9090'] - job_name: 'redis' static_configs: - targets: [

zeebe prometheus 监控配置

梦想与她 提交于 2020-03-24 02:30:50
zeebe 默认已经集成了prometheus,以下是一个简单的配置,关于grafana 的集成需要调整下 dashboard,目前网上的已经太老了 docker-compose 文件 version: "3" services: worker: build: ./ operate: image: camunda/operate:1.1.0 ports: - "8080:8080" volumes: - "./application.yml:/usr/local/operate/config/application.yml" grafana: image: grafana/grafana ports: - "3000:3000" prometheus: image: prom/prometheus volumes: - "./prometheus.yml:/etc/prometheus/prometheus.yml" ports: - "9090:9090" broker-1: image: camunda/zeebe:${ZEEBE_VERSION:-latest} ports: - 26500:26500 - 26501:26501 - 5701:5701 - 9600:9600 environment: - ZEEBE_LOG_LEVEL=${ZEEBE_LOG_LEVEL: