From: Abhishek Lekshmanan Date: Tue, 23 Apr 2019 15:27:08 +0000 (+0200) Subject: rgw: sync counters: drop spaces from counter names X-Git-Tag: v14.2.2~129^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dc2dcaf9ce7320f2ae9641394c3e5f2e28e18c20;p=ceph.git rgw: sync counters: drop spaces from counter names 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 (cherry picked from commit 97fb4eeae0e69ad4778ca6d38221a776cad39f6f) --- diff --git a/src/rgw/rgw_sync_counters.cc b/src/rgw/rgw_sync_counters.cc index 2a63d2c1e9a2..b4130068ad9d 100644 --- a/src/rgw/rgw_sync_counters.cc +++ b/src/rgw/rgw_sync_counters.cc @@ -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());