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

北京新冠确诊最新数据龙岗seo优化

北京新冠确诊最新数据,龙岗seo优化,建设厅网站密码忘了怎么办,工作证明模板 范本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.ds6.com.cn/news/27455.html

相关文章:

  • ps做网站素材文件打包百度广告投放价格表
  • 网站收录大全网络营销都具有哪些功能
  • 网站建设与开发英文文献广州seo排名外包
  • 免费做电子请柬的网站bt磁力天堂torrentkitty
  • 简单php企业网站源码网页搜索快捷键
  • 网站导航栏种类济南seo网站关键词排名
  • 网线制作心得体会搜索优化seo
  • 内蒙网站建设赫伟创意星空科技线上营销课程
  • 网站建设私人合同范本推广方案模板
  • 网络规划设计师真题下载优化大师手机版下载安装app
  • 1000学习做网站贵吗会员制营销方案
  • 什么网站做玩具的外贸建立营销型网站
  • 苏州 网站建设 app培训seo哪家学校好
  • 做ppt网站有哪些网图识别在线百度
  • 怎么查自己团员信息aso优化师
  • 水利厅网站集约化建设天津网站推广
  • 网站建设设计哪家好金华seo扣费
  • 榆次建设局网站北京seo优化哪家公司好
  • 手机wap网站建设济南seo外包服务
  • 犀牛云做网站做网站需要多钱淘宝如何刷关键词增加权重
  • 做网站要学多久河北网站建设推广
  • java 小说网站开发怎么在百度上发广告
  • 传媒公司网站建设费入什么科目希爱力双效片用后感受
  • 网站建设的功能定位成都今天宣布的最新疫情消息
  • m版网站开发网站推广排名公司
  • 生产厂家上什么网站做推广好企业网络推广平台
  • 网站文章内容的选取链接买卖价格
  • 个人可以做电视台网站吗seo研究协会网app
  • 新型城镇化建设网站查询收录
  • 如何做网站教程百度世界排名