部署了一个prometheus的pushgateway,然后两次对其发送counter类型的数据:

#第一次发送
curl -X POST -d '# TYPE my_first_metric_ahfu counter
my_first_metric_ahfu{container="xx1",IP="192.168.31.2"} 1904
' "http://pushgateway-test.ahfuzhang.com/metrics/job/test_job/instance/test_inst" -v

在pushgateway中查到,值为1904,符合预期。

#第二次发送
curl -X POST -d '# TYPE my_first_metric_ahfu counter
my_first_metric_ahfu{container="xx1",IP="192.168.31.2"} 2
' "http://pushgateway-test.ahfuzhang.com/metrics/job/test_job/instance/test_inst" -v

预期值为 1904 + 2 = 1906,但查看值为2.

坑死了!看来没法用pushgateway来上报counter类型的数据了。

神坑!为什么prometheus的pushgateway不能对上报的counter进行累加?的更多相关文章

  1. 基于Prometheus的Pushgateway实战

    一.Pushgateway 简介 Pushgateway 是 Prometheus 生态中一个重要工具,使用它的原因主要是: Prometheus 采用 pull 模式,可能由于不在一个子网或者防火墙 ...

  2. 使用 PushGateway 进行数据上报采集

    转载自:https://cloud.tencent.com/developer/article/1531821 1.PushGateway 介绍 Prometheus 是一套开源的系统监控.报警.时间 ...

  3. prometheus配置pushgateway功能测试

    一.环境: 1.prometheus服务器ip:192.168.0.208 2.node-exporter客户机ip:192.168.0.202 二.测试设计考虑: pushgateway类似一台信息 ...

  4. prometheus数据上报方式-pushgateway

    pushgateway 客户端使用push的方式上报监控数据到pushgateway,prometheus会定期从pushgateway拉取数据.使用它的原因主要是: Prometheus 采用 pu ...

  5. prometheus学习系列十一: Prometheus pushgateway的使用

    由于网络问题或者安全问题,可能我们的数据无法直接暴露出一个entrypoint 给prometheus采集. 这个时候可能就需要一个pushgateway来作为中间者完成中转工作.  promethe ...

  6. .Net Core服务监控报警指标上报Prometheus+Grafana

    前言 简单集成Prometheus+Grafana,指标的上报收集可视化. Prometheus Prometheus是一个监控平台,监控从HTTP端口收集受监控目标的指标.在微服务的架构里Prome ...

  7. Prometheus介绍

    Prometheus的主要特点 Prometheus 属于一站式监控告警平台,依赖少,功能齐全.Prometheus 支持对云的或容器的监控,其他系统主要对主机监控.Prometheus 数据查询语句 ...

  8. 《为什么说 Prometheus 是足以取代 Zabbix 的监控神器?》

    为什么说 Prometheus 是足以取代 Zabbix 的监控神器?   Kuberneteschina 致力于提供最权威的 Kubernetes 技术.案例与Meetup! ​关注他 12 人赞同 ...

  9. 1-什么是 Prometheus

    什么是 Prometheus Prometheus 是由 SoundCloud 开源监控告警解决方案,从 2012 年开始编写代码,再到 2015 年 github 上开源以来,已经吸引了 9k+ 关 ...

随机推荐

  1. SPQuery ViewAttributes Sharepoint列表查询范围

    SPSite site=new SPSite(SPContext.Current.Web.Url); SPWeb web=site.OpenWeb(); SPList splist=web.Lists ...

  2. 8-1yum私有云仓库

    针对centos8的BaseOS.AppStream源 yum -y install httpd systemctl enable --now httpd mkdir -pv /var/www/htm ...

  3. SpringBoot项目bootstrap.yml配置文件不加载

    bootstrap.yml需要引入springcloud的包才会加载 <dependency> <groupId>org.springframework.cloud</g ...

  4. Xshell连接Ubuntu服务器连接不上 显示拒绝了密码

    确保下方两个都安装了 sudo apt-get install openssh-server sudo apt-get install ssh 修改 vim /etc/ssh/sshd_config ...

  5. SpringBoot整合openoffice实现word文档的读取和导入及报错处理

    先安装openoffice4 Linux系统安装参考:https://www.cnblogs.com/pxblog/p/11622969.html Windows系统安装参考:https://www. ...

  6. 鱼书_第一章_Python入门

    Python版本 Python有Python 2.x和Python 3.x两个版本.两个版本不兼容,可能出现用Python 3.x编的代码不能被Python 2.x执行的情况. Python安装 An ...

  7. 【LeetCode】114. Flatten Binary Tree to Linked List 解题报告(Python & C++ & Java)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 先序遍历 递归 日期 题目地址:https://le ...

  8. 【LeetCode】590. N-ary Tree Postorder Traversal 解题报告 (C++&Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 递归 迭代 相似题目 参考资料 日期 题目地址:htt ...

  9. GCD - Extreme (II)(UVA11426)

    思路:欧拉函数: 欧拉函数,然后用下等差数列公式就行了. 1 #include<stdio.h> 2 #include<algorithm> 3 #include<ios ...

  10. codeforce 597C-Subsequences(dp+树状数组)

    题目和南阳那道题一样链接http://www.cnblogs.com/zzuli2sjy/p/4943774.html 代码: 1 #include<stdio.h> 2 #include ...