zoukankan      html  css  js  c++  java
  • 神坑!为什么prometheus的pushgateway不能对上报的counter进行累加?

    部署了一个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类型的数据了。

  • 相关阅读:
    操作系统
    C++流类库(11)
    C++运算符重载(10)
    C++虚函数(09)
    C++向量(08)
    C++继承(07)
    ResNet实战
    ResNet,DenseNet
    经典卷积网络VGG,GoodLeNet,Inception
    CIFAR100与VGG13实战
  • 原文地址:https://www.cnblogs.com/ahfuzhang/p/15125390.html
Copyright © 2011-2022 走看看