当前位置: 首页 > news >正文

个人做的网站不能做淘客常州网站建设大全

个人做的网站不能做淘客,常州网站建设大全,起名字2023免费八字起名,展厅设计的主题Pushgateway允许短暂和批量作业将其指标暴露给 Prometheus。由于这些工作的生命周期可能不足够长,不能够存在足够的时间以让 Prometheus 抓取它们的指标。Pushgateway 允许它们可以将其指标推送到 Pushgateway,然后 Pushgateway 再将这些指标暴露给 Prom…

Pushgateway允许短暂和批量作业将其指标暴露给 Prometheus。由于这些工作的生命周期可能不足够长,不能够存在足够的时间以让 Prometheus 抓取它们的指标。Pushgateway 允许它们可以将其指标推送到 Pushgateway,然后 Pushgateway 再将这些指标暴露给 Prometheus 抓取。

盲目的使用Pushgateway来代替Prometheus常用的拉动模型(pull model)来收集指标,会有以下几种问题:
1.通过单个 Pushgateway 监控多个实例时, Pushgateway 将会成为单点故障和潜在瓶颈
2.当你通过 up 命令(每次擦出时生成),将丢失 Prometheus 自动实例运行状态监控
3.Pushgateway 不会忘记推送时间序列并将永远暴露给 Prometheus,除非这些序列是通过 Pushgateway 的 API 手动删除的

1、下载pushgateway

下载地址:
https://github.com/prometheus/pushgateway/releases/download/v1.5.1/pushgateway-1.5.1.windows-amd64.zip

2、修改prometheus的配置

修改prometheus.yml,添加pushgateway的job

# my global config
global:scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.# scrape_timeout is set to the global default (10s).# Alertmanager configuration
alerting:alertmanagers:- static_configs:- targets:# - alertmanager:9093# 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"]#  - job_name: "station"
#    metrics_path: /prometheus
#    static_configs:
#      - targets: ["localhost:14501"]- job_name: "pushgateway"honor_labels: truestatic_configs:- targets: ["localhost:9091"]labels:instance: pushgateway

3、启动pushgateway

解压pushgateway
点击pushgateway.exe运行

4、测试推送数据到pushgateway(java)

引入依赖

<dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><dependency><groupId>io.micrometer</groupId><artifactId>micrometer-registry-prometheus</artifactId></dependency><dependency><groupId>io.prometheus</groupId><artifactId>simpleclient_pushgateway</artifactId><version>0.16.0</version></dependency></dependencies>
@Autowired
private CollectorRegistry collectorRegistry;PushGateway pushGateway= new PushGateway("http://localhost:9091");
Guage stationSystemCpuTotal = Gauge.build().name("cpu_total").help("Number of CPU cores on the station.").unit("C").labelNames("a","b").register(collectorRegistry);
stationSystemCpuTotal.labels("A", "B").set(10);  
Map<String, String> groupingKey = new HashMap<>() {{put("collector_name", "cpu");}};
pushGateway.pushAdd(stationSystemCpuTotal , "test-job", groupingKey);

5、查看pushgatway

在这里插入图片描述

6、查看Prometheus

在这里插入图片描述

http://www.yayakq.cn/news/970112/

相关文章:

  • 美橙互联建站网站被截止wordpress把写博客按钮放在前台
  • 网站开发简称网站建设优化合同
  • 网站解析什么意思网站需求分析的重要
  • 做酒水网站陕西有哪些wordpress 小视频模板下载
  • 郑州网站建设公司电话邢台网站建设优化
  • 山东青岛网站设计深圳光明区住房和建设局官网
  • 地理位置地图网站建设无锡网站建设优化公司
  • wordpress网站备份恢复建设银行网站不能登录
  • 贵阳专业建网站免费网站安全软件大全下载安装
  • 电影网站开发与设计免费做网站推广的软件
  • 营销网站建设门户甘肃省城乡建设局网站
  • 山东建设厅官方网站wordpress邮箱功能
  • 制作免费的网站网站备案时间要多久
  • 开封网站推广购买域名后怎样建公司官网
  • 建设网站需要学什么南京江北新区
  • 黄龙云 加强网站建设杨凌住房和城乡建设局网站
  • 做公司网站都需要付什么费用金华网站建设企业
  • 沂水网站制作做调差问卷的网站
  • 建设银行网站用户名是什么意思乐居房产官方网站
  • 新手怎么做电商在哪个网站wordpress 制作网页
  • 找人开发软件去什么网站苏州吴中网站建设公司
  • 做购物网站需要学数据库吗关键词优化技巧有哪些
  • 天津网站制作公司如何做企业微信
  • 万众城网站建设百度做地图的网站
  • html个人网站设计网站建设基础知识
  • 如何做影视网站WordPress允许用户发布文章
  • 免费下载网站设计方案学校网站设计首页
  • 一个虚拟主机做2个网站饰品网站模版
  • 网站添加关键字网站内容维护
  • 怎么用网站挂QQ做公司网站需要的资料