]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/seastar/src/core/scollectd.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / seastar / src / core / scollectd.cc
index 5d90a5c861fdd347aeafd74275fd5d928f7072ce..b06785a07eb07c2c2748bc2ca54f8af7f3cb1dce 100644 (file)
@@ -121,7 +121,7 @@ struct cpwriter {
     typedef buffer_type::iterator mark_type;
     typedef buffer_type::const_iterator const_mark_type;
 
-    buffer_type _buf;
+    buffer_type _buf = {};
     mark_type _pos;
     bool _overflow = false;
 
@@ -214,11 +214,8 @@ struct cpwriter {
                 write_le(tmpi);
                 break;
             }
-            case data_type::DERIVE:
-                write(v.i()); // signed int 64, big endian
-                break;
             case data_type::COUNTER:
-            case data_type::ABSOLUTE:
+            case data_type::REAL_COUNTER:
                 write(v.ui()); // unsigned int 64, big endian
                 break;
             default:
@@ -368,13 +365,13 @@ void impl::start(const sstring & host, const ipv4_addr & addr, const duration pe
 
     _metrics.add_group("scollectd", {
         // total_bytes      value:DERIVE:0:U
-        sm::make_derive("total_bytes_sent", sm::description("total bytes sent"), _bytes),
+        sm::make_counter("total_bytes_sent", sm::description("total bytes sent"), _bytes),
         // total_requests      value:DERIVE:0:U
-        sm::make_derive("total_requests", sm::description("total requests"), _num_packets),
+        sm::make_counter("total_requests", sm::description("total requests"), _num_packets),
         // latency          value:GAUGE:0:U
         sm::make_gauge("latency", sm::description("avrage latency"), _avg),
         // total_time_in_ms    value:DERIVE:0:U
-        sm::make_derive("total_time_in_ms", sm::description("total time in milliseconds"), _millis),
+        sm::make_counter("total_time_in_ms", sm::description("total time in milliseconds"), _millis),
         // total_values     value:DERIVE:0:U
         sm::make_gauge("total_values", sm::description("current number of values reported"), [this] {return values().size();}),
         // records          value:GAUGE:0:U