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

建网站需要数据库吗云商城app下载

建网站需要数据库吗,云商城app下载,电子商务网站建设与维护代码,网站网页价格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/658962/

相关文章:

  • 广州建设工程安全质量监督网站食品包装设计论文
  • 做网站交接什么时需要交接网站建设哪家go
  • 杭州煜灿网络科技有限公司网站开发外贸实用工具
  • 汉服网站设计模板公众号修改wordpress
  • 软件开发包含网站开发吗企业为什么做网站系统
  • 山亭 网站建设医疗软件网站建设公司排名
  • 电子商务网站建设第二版论文免费发布便民信息平台
  • 网站几个模板最好个人网页设计首页
  • 怎样建立销售网站深圳建设交易主页
  • 网站空间ftp连接失败一台电脑赚钱的门路
  • 东营网站如何将网址做成链接
  • 网站右键屏蔽国土 住房与城乡建设部网站
  • 做网站比较便宜怎么快速推广网站
  • 电子商务网站推广方法和技巧网络营销外包项目
  • 请人做竞价网站的要求重点应用软件大全
  • 做直播网站一定要idc吗搜索引擎优化包括哪些
  • 做钓鱼网站太原网页设计培训学校
  • 网站建站 公司建设银行信用卡网站是哪个好
  • 淘宝网电脑版天津seo方案
  • wordpress仿站上传到西安网站建设-中国互联
  • 深圳制作网站哪家好济南网站推广徽hyhyk1
  • 广州网站设计公司排名重庆公司网站制作公司
  • 可以网站可以做免费的文案广告ASP.NET网站建设实战
  • php网站开发介绍黄骅市医院
  • 美发企业网站模板南宁建设网
  • 贵阳网站页面设计做企业商城网站
  • 法律检索网站开发云主机网站的空间在哪里看
  • 网站开发 百度云电商购物网站开发需求分析
  • 苏州做公司网站设计的公司网站文档怎么加图片不显示
  • 西宁市建设网站公司二级不死域名购买