Prometheus对Windows有相关的支持  下载地址:https://prometheus.io/download/

wget https://github.com/prometheus/prometheus/releases/download/v2.5.0/prometheus-2.5.0.linux-amd64.tar.gz

如果需要也可以下载其他组件支持

解压安装:

tar -xvf prometheus-2.5..linux-amd64.tar.gz

查看配置:cd /目录查看配置

 cd prometheus-2.5..linux-amd64

配置如下:

# my global config
global:
scrape_interval: 15s # Set the scrape interval to every seconds. Default is every minute.
evaluation_interval: 15s # Evaluate rules every seconds. The default is every minute.
# scrape_timeout is set to the global default (10s). # Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager: # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml" # A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus' # metrics_path defaults to '/metrics'
# scheme defaults to 'http'. static_configs:
- targets: ['localhost:9090']
~
~
~
~
"prometheus.yml" 29L, 925C

scrape_interval:收集频率

evaluation_interval:分析评率

alerting:预警相关设置

scrape_configs:分析配置,static_configs中要特别说明下收集目标,targets:[localhost:9090] 这里是数组 可以配置多个

注意:这里跟前面的 InfluxDB+AppMetrics 不一样,AppMetrics是在应用程序中去主动推送分析数据到 InfluxDB,而Prometheus是通过targets配置的地址去获取,但是在应用程序端也需要使用客户端中间件处理下

这里默认收集localhost:9090

下面我们后台启动下Prometheus,可以指定配置启动

./prometheus --config.file=prometheus.yml &

在打开9090端口测试下:

firewall-cmd --zone=public --add-port=/tcp --permanent
firewall-cmd --reload

浏览下

可以选择指定的分析指标

选择一个指标查询看下

我们也可以通过图表看查看分析情况,并添加添加多个图表分析

当然还有一些额外的处理,比如监控节点展示、服务发现等其他细节用法参考官方文档

  


 
												

.NetCore下使用Prometheus实现系统监控和警报 (二)Linux安装的更多相关文章

  1. .NetCore下使用Prometheus实现系统监控和警报 (一)介绍【译】

    [译]原文https://prometheus.io/docs/introduction/overview 什么是Prometheus? Prometheus是一个开源系统监控和警报工具包,最初起源于 ...

  2. .NetCore下使用Prometheus实现系统监控和警报 (六)进阶Grafana集成自定义收集指标

    Prometheus中包含了很多收集指标,那么我们怎来在Grafana中来使用呢? 接下来我们还是以之前自定义的来演示如图:我们在Prometheus中已经可以看到这个之前我们自定义的类型了 关于Gr ...

  3. .NetCore下使用Prometheus实现系统监控和警报 (五)进阶自定义收集指标 之 Counter

    Prometheus下面定了四种类型的收集方式,下面我们主要来来说下Counter的使用 Nuget导入Prometheus.AspNetCore包 下面先来看下我的Prometheus配置,这里我没 ...

  4. .NetCore下使用Prometheus实现系统监控和警报 (四)客户端代码处理

    在代码中使用就比较简单了 Nuget包获取下 prometheus-net prometheus-net.AspNetCore 然后添加中间件就行了 app.UseMetricServer(); 默认 ...

  5. .NetCore下使用Prometheus实现系统监控和警报 (三)集成Grafana

    有了前面InfluxDB的经验,这里就很好处理了,数据类型选择Prometheus选地址等,填好保存 同样通过导入数据处理,我们在https://grafana.com/dashboards上选择Da ...

  6. VMware系统运维(二)安装Microsoft .NET 3.5

    1.安装vmware vSphere 5.5 之前先安装Microsoft .NET 3.5. 2.安装Microsoft .NET3.5,添加角色和功能. 3.勾选.NET Framework 3. ...

  7. java系统监控分析Jprofile下载及安装配置【转】

    JProfiler是一个全功能的Java剖析工具(profiler),专用於分析J2SE和J2EE应用程式.它把CPU.线程和记忆体的剖析组合在一个强大的应用中.JProfiler可提供许多IDE整合 ...

  8. Linux系统运维笔记(二),Linux文件编辑命令

    Linux系统运维笔记 Linux文件编辑命令 首先我们使用命令 vi filename 打开一个文件,这个时候进入到的是命令模式 接下来我们按i,然后键盘随便输入写内容. 然后按ESC重新进入到命令 ...

  9. go-zero docker-compose 搭建课件服务(七):prometheus+grafana服务监控

    0.转载 go-zero docker-compose 搭建课件服务(七):prometheus+grafana服务监控 0.1源码地址 https://github.com/liuyuede123/ ...

随机推荐

  1. Java 8新特性之接口改善(八恶人-1)

    Daisy Donergue 多莫歌·黛西 “By woman, you mean her?” 她也能叫女人? Java 8在13年9月发布,写这篇博文的时间已经是17年12月份了.来的有点晚,但是有 ...

  2. 棋盘游戏 HDU - 1281 (删点 二分匹配)

    小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决 ...

  3. 《Migrating to Cloud-Native Application Architectures》学习笔记之Chapter 2. Changes Needed 原

    Cultural Change 文化变革 A great deal of the changes necessary for enterprise IT shops to adopt cloud-na ...

  4. SpringBoot整合Swagger-ui

    SpringBoot整合Swagger-ui 引入依赖 <dependency> <groupId>org.springframework.boot</groupId&g ...

  5. Easyui的DateBox日期格式化

    http://www.cnblogs.com/wintalen/archive/2011/06/10/2077171.html DateBox 日期显示默认的格式为“dd/mm/yyyy”,如果想自定 ...

  6. Eclipse 报 "The builder launch configuration could not be found" 错误

    Eclipse 报 "The builder launch configuration could not be found" 错误的解决办法 标签: eclipseEclipse ...

  7. ubuntu ssh root登陆

    原文:https://blog.csdn.net/wy_97/article/details/78294562 1.默认使用ubuntu用户登录,密码为服务器配置时设置的密码,可在重置密码中修改 2. ...

  8. Flink入门训练--以New York City Taxi为例

    最近在学Flink,准备用Flink搭建一个实时的推荐系统.找到一个好的网站(也算作是flink创始者的官方网站),上面有关于Flink的上手教程,用来练练手,熟悉熟悉,下文仅仅是我的笔记. 1. 数 ...

  9. idea2017破解方法

    破解方法 切换license server然后 输入网址:http://idea.iteblog.com/key.php即可

  10. bzoj千题计划184:bzoj1261: [SCOI2006]zh_tree

    http://www.lydsy.com/JudgeOnline/problem.php?id=1261 dp[l][r][dep]  区间[l,r]内的节点,根在dep层的最小代价 枚举根i,dp[ ...