]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: sync counters: drop spaces from counter names 27921/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Tue, 23 Apr 2019 15:27:08 +0000 (17:27 +0200)
committerCasey Bodley <cbodley@redhat.com>
Thu, 2 May 2019 12:46:04 +0000 (08:46 -0400)
Since this might break modules like prometheus and general json processing tools
aren't too happy with spaces.

Fixes: https://tracker.ceph.com/issues/39434
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 97fb4eeae0e69ad4778ca6d38221a776cad39f6f)

src/rgw/rgw_sync_counters.cc

index 2a63d2c1e9a22942cfe295a984923c444d14cf02..b4130068ad9dca2649ea470a1d3cc8539c44e6c7 100644 (file)
@@ -13,12 +13,12 @@ PerfCountersRef build(CephContext *cct, const std::string& name)
   // share these counters with ceph-mgr
   b.set_prio_default(PerfCountersBuilder::PRIO_USEFUL);
 
-  b.add_u64_avg(l_fetch, "fetch bytes", "Number of object bytes replicated");
-  b.add_u64_counter(l_fetch_not_modified, "fetch not modified", "Number of objects already replicated");
-  b.add_u64_counter(l_fetch_err, "fetch errors", "Number of object replication errors");
+  b.add_u64_avg(l_fetch, "fetch_bytes", "Number of object bytes replicated");
+  b.add_u64_counter(l_fetch_not_modified, "fetch_not_modified", "Number of objects already replicated");
+  b.add_u64_counter(l_fetch_err, "fetch_errors", "Number of object replication errors");
 
-  b.add_time_avg(l_poll, "poll latency", "Average latency of replication log requests");
-  b.add_u64_counter(l_poll_err, "poll errors", "Number of replication log request errors");
+  b.add_time_avg(l_poll, "poll_latency", "Average latency of replication log requests");
+  b.add_u64_counter(l_poll_err, "poll_errors", "Number of replication log request errors");
 
   auto logger = PerfCountersRef{ b.create_perf_counters(), cct };
   cct->get_perfcounters_collection()->add(logger.get());