Skip to content

Commit

Permalink
bytes_outstanding metric is misleading
Browse files Browse the repository at this point in the history
This value is not a value in bytes.
Fix #1383

We should remove it in a major version of the agent but for now, let’s
add a new metric name for this value.
  • Loading branch information
remh committed Mar 17, 2015
1 parent da7399f commit f74256d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions checks.d/zk.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ def parse_stat(self, buf):

# Outstanding: 0
_, value = buf.readline().split(':')
# Fixme: This metric name is wrong. It should be removed in a major version of the agent
# See https://github.com/DataDog/dd-agent/issues/1383
metrics.append(('zookeeper.bytes_outstanding', long(value.strip())))
metrics.append(('zookeeper.outstanding_requests', long(value.strip())))

# Zxid: 0x1034799c7
_, value = buf.readline().split(':')
Expand Down
2 changes: 2 additions & 0 deletions tests/test_zookeeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_zk_stat_parsing_lt_v344(self):
('zookeeper.bytes_sent', 0L),
('zookeeper.connections', 6),
('zookeeper.bytes_outstanding', 0L),
('zookeeper.outstanding_requests', 0L),
('zookeeper.zxid.epoch', 1),
('zookeeper.zxid.count', 55024071),
('zookeeper.nodes', 487L),
Expand Down Expand Up @@ -115,6 +116,7 @@ def test_zk_stat_parsing_gte_v344(self):
('zookeeper.bytes_sent', 0L),
('zookeeper.connections', 1),
('zookeeper.bytes_outstanding', 0L),
('zookeeper.outstanding_requests', 0L),
('zookeeper.zxid.epoch', 1),
('zookeeper.zxid.count', 55024071),
('zookeeper.nodes', 487L),
Expand Down

0 comments on commit f74256d

Please sign in to comment.