Fix the meter type for LB Bytes
This fixes the type on bytes in/out to cumulative. Eventually when connections are fixed in LBaaS side, those would be cumulative too. Also update the measurement docs to reflect the newest changes. Closes-Bug: 1328573 Change-Id: Iab221829702ab36a844d0ae65c6a3312a311a92b
This commit is contained in:
parent
97748958b6
commit
1cf7101637
@ -308,7 +308,7 @@ class LBBytesInPollster(_LBStatsPollster):
|
|||||||
return make_sample_from_pool(
|
return make_sample_from_pool(
|
||||||
pool,
|
pool,
|
||||||
name='network.services.lb.incoming.bytes',
|
name='network.services.lb.incoming.bytes',
|
||||||
type=sample.TYPE_GAUGE,
|
type=sample.TYPE_CUMULATIVE,
|
||||||
unit='B',
|
unit='B',
|
||||||
volume=data.bytes_in,
|
volume=data.bytes_in,
|
||||||
)
|
)
|
||||||
@ -323,7 +323,7 @@ class LBBytesOutPollster(_LBStatsPollster):
|
|||||||
return make_sample_from_pool(
|
return make_sample_from_pool(
|
||||||
pool,
|
pool,
|
||||||
name='network.services.lb.outgoing.bytes',
|
name='network.services.lb.outgoing.bytes',
|
||||||
type=sample.TYPE_GAUGE,
|
type=sample.TYPE_CUMULATIVE,
|
||||||
unit='B',
|
unit='B',
|
||||||
volume=data.bytes_out,
|
volume=data.bytes_out,
|
||||||
)
|
)
|
||||||
|
@ -367,7 +367,8 @@ class TestLBStatsPollster(_BaseTestLBPollster):
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mock.patch('ceilometer.pipeline.setup_pipeline', mock.MagicMock())
|
@mock.patch('ceilometer.pipeline.setup_pipeline', mock.MagicMock())
|
||||||
def _check_get_samples(self, factory, sample_name, expected_volume):
|
def _check_get_samples(self, factory, sample_name, expected_volume,
|
||||||
|
expected_type):
|
||||||
pollster = factory()
|
pollster = factory()
|
||||||
|
|
||||||
cache = {}
|
cache = {}
|
||||||
@ -380,20 +381,24 @@ class TestLBStatsPollster(_BaseTestLBPollster):
|
|||||||
match = [s for s in samples if s.name == sample_name]
|
match = [s for s in samples if s.name == sample_name]
|
||||||
self.assertEqual(1, len(match), 'missing counter %s' % sample_name)
|
self.assertEqual(1, len(match), 'missing counter %s' % sample_name)
|
||||||
self.assertEqual(expected_volume, match[0].volume)
|
self.assertEqual(expected_volume, match[0].volume)
|
||||||
self.assertEqual('gauge', match[0].type)
|
self.assertEqual(expected_type, match[0].type)
|
||||||
|
|
||||||
def test_lb_total_connections(self):
|
def test_lb_total_connections(self):
|
||||||
self._check_get_samples(lbaas.LBTotalConnectionsPollster,
|
self._check_get_samples(lbaas.LBTotalConnectionsPollster,
|
||||||
'network.services.lb.total.connections', 4L)
|
'network.services.lb.total.connections',
|
||||||
|
4L, 'gauge')
|
||||||
|
|
||||||
def test_lb_active_connections(self):
|
def test_lb_active_connections(self):
|
||||||
self._check_get_samples(lbaas.LBActiveConnectionsPollster,
|
self._check_get_samples(lbaas.LBActiveConnectionsPollster,
|
||||||
'network.services.lb.active.connections', 2L)
|
'network.services.lb.active.connections',
|
||||||
|
2L, 'gauge')
|
||||||
|
|
||||||
def test_lb_incoming_bytes(self):
|
def test_lb_incoming_bytes(self):
|
||||||
self._check_get_samples(lbaas.LBBytesInPollster,
|
self._check_get_samples(lbaas.LBBytesInPollster,
|
||||||
'network.services.lb.incoming.bytes', 1L)
|
'network.services.lb.incoming.bytes',
|
||||||
|
1L, 'cumulative')
|
||||||
|
|
||||||
def test_lb_outgoing_bytes(self):
|
def test_lb_outgoing_bytes(self):
|
||||||
self._check_get_samples(lbaas.LBBytesOutPollster,
|
self._check_get_samples(lbaas.LBBytesOutPollster,
|
||||||
'network.services.lb.outgoing.bytes', 3L)
|
'network.services.lb.outgoing.bytes',
|
||||||
|
3L, 'cumulative')
|
||||||
|
@ -268,18 +268,18 @@ switch.flow.bytes Cumulative B switch ID pollster Rece
|
|||||||
LoadBalancer as a Service (LBaaS)
|
LoadBalancer as a Service (LBaaS)
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
======================================= ======= ========== ========== ========= ==============================
|
======================================= ========== ========== ========== ========= ==============================
|
||||||
Meter Type Unit Resource Origin Note
|
Meter Type Unit Resource Origin Note
|
||||||
======================================= ======= ========== ========== ========= ==============================
|
======================================= ========== ========== ========== ========= ==============================
|
||||||
network.services.lb.pool Gauge pool pool ID pollster Existence of a LB Pool
|
network.services.lb.pool Gauge pool pool ID pollster Existence of a LB Pool
|
||||||
network.services.lb.vip Gauge vip vip ID pollster Existence of a LB Vip
|
network.services.lb.vip Gauge vip vip ID pollster Existence of a LB Vip
|
||||||
network.services.lb.member Gauge member member ID pollster Existence of a LB Member
|
network.services.lb.member Gauge member member ID pollster Existence of a LB Member
|
||||||
network.services.lb.health_monitor Gauge monitor monitor ID pollster Existence of a LB Health Probe
|
network.services.lb.health_monitor Gauge monitor monitor ID pollster Existence of a LB Health Probe
|
||||||
network.services.lb.total_connections Delta connection pool ID pollster Total connections on a LB
|
network.services.lb.total_connections Delta connection pool ID pollster Total connections on a LB
|
||||||
network.services.lb.active_connections Delta connection pool ID pollster Active connections on a LB
|
network.services.lb.active_connections Delta connection pool ID pollster Active connections on a LB
|
||||||
network.services.lb.incoming.bytes Delta B pool ID pollster Number of incoming Bytes
|
network.services.lb.incoming.bytes Cumulative B pool ID pollster Number of incoming Bytes
|
||||||
network.services.lb.outgoing.bytes Delta B pool ID pollster Number of outgoing Bytes
|
network.services.lb.outgoing.bytes Cumulative B pool ID pollster Number of outgoing Bytes
|
||||||
======================================= ======= ========== ========== ========= ==============================
|
======================================= ========== ========== ========== ========= ==============================
|
||||||
|
|
||||||
|
|
||||||
Dynamically retrieving the Meters via ceilometer client
|
Dynamically retrieving the Meters via ceilometer client
|
||||||
|
Loading…
x
Reference in New Issue
Block a user