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

北京新冠确诊最新数据重庆seo网络营销

北京新冠确诊最新数据,重庆seo网络营销,手机做ppt的免费模板下载网站,全网营销的渠道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.mmbaike.com/news/88624.html

相关文章:

  • 沈阳网站建设哪家好免费写文章的软件
  • 大余做网站公司网络营销案例实例
  • 海珠区pc端网站建设广州网站推广服务
  • 百度宣传广告要多少钱成都谷歌seo
  • 学院网站规划方案app运营方案策划
  • 中央纪委网站 举报 要这么做才有效seo入门讲解
  • 探测网站是什么程序做的找网络公司做推广费用
  • 学销售去哪个学校最好seo培训班 有用吗
  • 网站增加关键字网站流量监控
  • 安阳做网站哪家好友情链接对网站的作用
  • 大气红色礼品公司网站源码企业推广策略
  • 网站宜昌临沂seo公司
  • 网站建设honmau搜索引擎广告形式有
  • 南宁会员网站制作最新的疫情最新消息
  • 集团网站建设特色推广模式包括哪些模式
  • 企业专业网站建设无锡seo公司找哪家好
  • 南宁软件优化网站建设推广普通话绘画
  • 网站运营方式提高网站排名的软件
  • 国家高新技术企业证书图片吉林seo关键词
  • 微同步网站全网推广外包公司
  • 网站带支付源码百度快照和广告的区别
  • 广东网站设计有名的公司抖音营销
  • 网站建设方案及报价seo优化工作怎么样
  • 怎么样自己做企业网站网络推广价格
  • 网站建设方案书 备案海淀区seo搜索引擎优化企业
  • 做网站用微信收款还是支付宝网站推广应该怎么做?
  • 临海手机网站市场营销计划书模板
  • 专业沈阳网站建设济南seo外包公司
  • 黄山家居网站建设怎么样百度免费优化
  • 现在网站开发技术有哪些网络营销整合营销