Match the meter names for network services

The meter names for network services in notifications and
pollsters dont currently match. Adding the prefix so the
meter names match and have more clarity.

Change-Id: Id6ca77eade1ab72cdbb45063d2b2b262644b467d
Closes-Bug: #1408690
This commit is contained in:
Pradeep Kilambi 2015-01-08 14:46:01 -08:00
parent daa32cdae8
commit 370d2cd47c
4 changed files with 86 additions and 83 deletions

View File

@ -181,6 +181,7 @@ class Pool(NetworkNotificationBase):
Handle pool.{create.end|update.*|exists} notifications from neutron.
"""
resource_name = 'pool'
counter_name = 'network.services.lb.pool'
class Vip(NetworkNotificationBase):
@ -189,6 +190,7 @@ class Vip(NetworkNotificationBase):
Handle vip.{create.end|update.*|exists} notifications from neutron.
"""
resource_name = 'vip'
counter_name = 'network.services.lb.vip'
class Member(NetworkNotificationBase):
@ -197,6 +199,7 @@ class Member(NetworkNotificationBase):
Handle member.{create.end|update.*|exists} notifications from neutron.
"""
resource_name = 'member'
counter_name = 'network.services.lb.member'
class HealthMonitor(NetworkNotificationBase):
@ -206,6 +209,7 @@ class HealthMonitor(NetworkNotificationBase):
from neutron.
"""
resource_name = 'health_monitor'
counter_name = 'network.services.lb.health_monitor'
class Firewall(NetworkNotificationBase):
@ -214,6 +218,7 @@ class Firewall(NetworkNotificationBase):
Handle firewall.{create.end|update.*|exists} notifications from neutron.
"""
resource_name = 'firewall'
counter_name = 'network.services.firewall'
class FirewallPolicy(NetworkNotificationBase):
@ -223,6 +228,7 @@ class FirewallPolicy(NetworkNotificationBase):
from neutron.
"""
resource_name = 'firewall_policy'
counter_name = 'network.services.firewall.policy'
class FirewallRule(NetworkNotificationBase):
@ -232,6 +238,7 @@ class FirewallRule(NetworkNotificationBase):
from neutron.
"""
resource_name = 'firewall_rule'
counter_name = 'network.services.firewall.rule'
class VPNService(NetworkNotificationBase):
@ -240,6 +247,7 @@ class VPNService(NetworkNotificationBase):
Handle vpnservice.{create.end|update.*|exists} notifications from neutron.
"""
resource_name = 'vpnservice'
counter_name = 'network.services.vpn'
class IPSecPolicy(NetworkNotificationBase):
@ -248,6 +256,7 @@ class IPSecPolicy(NetworkNotificationBase):
Handle pool.{create.end|update.*|exists} notifications from neutron.
"""
resource_name = 'ipsecpolicy'
counter_name = 'network.services.vpn.ipsecpolicy'
class IKEPolicy(NetworkNotificationBase):
@ -256,6 +265,7 @@ class IKEPolicy(NetworkNotificationBase):
Handle ikepolicy.{create.end|update.*|exists} notifications from neutron.
"""
resource_name = 'ikepolicy'
counter_name = 'network.services.vpn.ikepolicy'
class IPSecSiteConnection(NetworkNotificationBase):
@ -265,3 +275,4 @@ class IPSecSiteConnection(NetworkNotificationBase):
notifications from neutron.
"""
resource_name = 'ipsec_site_connection'
counter_name = 'network.services.vpn.connections'

View File

@ -1283,145 +1283,145 @@ class TestNotifications(test.BaseTestCase):
v = notifications.Pool(mock.Mock())
samples = list(v.process_notification(NOTIFICATION_POOL_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("pool", samples[0].name)
self.assertEqual("network.services.lb.pool", samples[0].name)
def test_vip_create(self):
v = notifications.Vip(mock.Mock())
samples = list(v.process_notification(NOTIFICATION_VIP_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("vip", samples[0].name)
self.assertEqual("network.services.lb.vip", samples[0].name)
def test_member_create(self):
v = notifications.Member(mock.Mock())
samples = list(v.process_notification(NOTIFICATION_MEMBERS_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("member", samples[0].name)
self.assertEqual("network.services.lb.member", samples[0].name)
def test_health_monitor_create(self):
v = notifications.HealthMonitor(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_HEALTH_MONITORS_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("health_monitor", samples[0].name)
self.assertEqual("network.services.lb.health_monitor", samples[0].name)
def test_firewall_create(self):
v = notifications.Firewall(mock.Mock())
samples = list(v.process_notification(NOTIFICATION_FIREWALL_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("firewall", samples[0].name)
self.assertEqual("network.services.firewall", samples[0].name)
def test_vpnservice_create(self):
v = notifications.VPNService(mock.Mock())
samples = list(v.process_notification(NOTIFICATION_VPNSERVICE_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("vpnservice", samples[0].name)
self.assertEqual("network.services.vpn", samples[0].name)
def test_ipsec_connection_create(self):
v = notifications.IPSecSiteConnection(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_IPSEC_SITE_CONN_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("ipsec_site_connection", samples[0].name)
self.assertEqual("network.services.vpn.connections", samples[0].name)
def test_firewall_policy_create(self):
v = notifications.FirewallPolicy(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_FIREWALL_POLICY_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("firewall_policy", samples[0].name)
self.assertEqual("network.services.firewall.policy", samples[0].name)
def test_firewall_rule_create(self):
v = notifications.FirewallRule(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_FIREWALL_RULE_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("firewall_rule", samples[0].name)
self.assertEqual("network.services.firewall.rule", samples[0].name)
def test_ipsec_policy_create(self):
v = notifications.IPSecPolicy(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_IPSEC_POLICY_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("ipsecpolicy", samples[0].name)
self.assertEqual("network.services.vpn.ipsecpolicy", samples[0].name)
def test_ike_policy_create(self):
v = notifications.IKEPolicy(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_IKE_POLICY_CREATE))
self.assertEqual(2, len(samples))
self.assertEqual("ikepolicy", samples[0].name)
self.assertEqual("network.services.vpn.ikepolicy", samples[0].name)
def test_pool_update(self):
v = notifications.Pool(mock.Mock())
samples = list(v.process_notification(NOTIFICATION_POOL_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("pool", samples[0].name)
self.assertEqual("network.services.lb.pool", samples[0].name)
def test_vip_update(self):
v = notifications.Vip(mock.Mock())
samples = list(v.process_notification(NOTIFICATION_VIP_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("vip", samples[0].name)
self.assertEqual("network.services.lb.vip", samples[0].name)
def test_member_update(self):
v = notifications.Member(mock.Mock())
samples = list(v.process_notification(NOTIFICATION_MEMBERS_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("member", samples[0].name)
self.assertEqual("network.services.lb.member", samples[0].name)
def test_health_monitor_update(self):
v = notifications.HealthMonitor(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_HEALTH_MONITORS_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("health_monitor", samples[0].name)
self.assertEqual("network.services.lb.health_monitor", samples[0].name)
def test_firewall_update(self):
v = notifications.Firewall(mock.Mock())
samples = list(v.process_notification(NOTIFICATION_FIREWALL_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("firewall", samples[0].name)
self.assertEqual("network.services.firewall", samples[0].name)
def test_vpnservice_update(self):
v = notifications.VPNService(mock.Mock())
samples = list(v.process_notification(NOTIFICATION_VPNSERVICE_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("vpnservice", samples[0].name)
self.assertEqual("network.services.vpn", samples[0].name)
def test_ipsec_connection_update(self):
v = notifications.IPSecSiteConnection(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_IPSEC_SITE_CONN_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("ipsec_site_connection", samples[0].name)
self.assertEqual("network.services.vpn.connections", samples[0].name)
def test_firewall_policy_update(self):
v = notifications.FirewallPolicy(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_FIREWALL_POLICY_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("firewall_policy", samples[0].name)
self.assertEqual("network.services.firewall.policy", samples[0].name)
def test_firewall_rule_update(self):
v = notifications.FirewallRule(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_FIREWALL_RULE_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("firewall_rule", samples[0].name)
self.assertEqual("network.services.firewall.rule", samples[0].name)
def test_ipsec_policy_update(self):
v = notifications.IPSecPolicy(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_IPSEC_POLICY_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("ipsecpolicy", samples[0].name)
self.assertEqual("network.services.vpn.ipsecpolicy", samples[0].name)
def test_ike_policy_update(self):
v = notifications.IKEPolicy(mock.Mock())
samples = list(v.process_notification(
NOTIFICATION_IKE_POLICY_UPDATE))
self.assertEqual(2, len(samples))
self.assertEqual("ikepolicy", samples[0].name)
self.assertEqual("network.services.vpn.ikepolicy", samples[0].name)
class TestEventTypes(test.BaseTestCase):

View File

@ -352,72 +352,64 @@ switch.flow.bytes Cumulative B switch ID pollster Rece
LoadBalancer as a Service (LBaaS)
=================================
====================================== ========== ========== ========== ============ ==============================
========================================= ========== ========== ========== ============ ==============================
Meter Type Unit Resource Origin Note
====================================== ========== ========== ========== ============ ==============================
network.services.lb.pool Gauge pool pool ID pollster Existence of a LB Pool
pool Gauge pool pool ID notification Existence of a LB Pool
pool.create Delta pool pool ID notification Creation of a LB Pool
pool.update Delta pool pool ID notification Update of a LB Pool
network.services.lb.vip Gauge vip vip ID pollster Existence of a LB Vip
vip Gauge vip vip ID notification Existence of a LB Vip
vip.create Delta vip vip ID notification Creation of a LB Vip
vip.update Delta vip vip ID notification Update of a LB Vip
network.services.lb.member Gauge member member ID pollster Existence of a LB Member
member Gauge member member ID notification Existence of a LB Member
member.create Delta member member ID notification Creation of a LB Member
member.update Delta member member ID notification Update of a LB Member
network.services.lb.health_monitor Gauge monitor monitor ID pollster Existence of a LB Health Probe
health_monitor Gauge monitor monitor ID notification Existence of a LB Health Probe
health_monitor.create Delta monitor monitor ID notification Creation of a LB Health Probe
health_monitor.update Delta monitor monitor ID notification Update of a LB Health Probe
========================================= ========== ========== ========== ============ ==============================
network.services.lb.pool Gauge pool pool ID both Existence of a LB Pool
network.services.lb.pool.create Delta pool pool ID notification Creation of a LB Pool
network.services.lb.pool.update Delta pool pool ID notification Update of a LB Pool
network.services.lb.vip Gauge vip vip ID both Existence of a LB Vip
network.services.lb.vip.create Delta vip vip ID notification Creation of a LB Vip
network.services.lb.vip.update Delta vip vip ID notification Update of a LB Vip
network.services.lb.member Gauge member member ID both Existence of a LB Member
network.services.lb.member.create Delta member member ID notification Creation of a LB Member
network.services.lb.member.update Delta member member ID notification Update of a LB Member
network.services.lb.health_monitor Gauge monitor monitor ID both Existence of a LB Health Probe
network.services.lb.health_monitor.create Delta monitor monitor ID notification Creation of a LB Health Probe
network.services.lb.health_monitor.update Delta monitor monitor ID notification Update of a LB Health Probe
network.services.lb.total.connections Cumulative connection pool ID pollster Total connections on a LB
network.services.lb.active.connections Gauge connection pool ID pollster Active connections on a LB
network.services.lb.incoming.bytes Cumulative B pool ID pollster Number of incoming Bytes
network.services.lb.outgoing.bytes Cumulative B pool ID pollster Number of outgoing Bytes
====================================== ========== ========== ========== ============ ==============================
========================================= ========== ========== ========== ============ ==============================
VPN as a Service (VPNaaS)
=========================
================================ ===== =========== ============== ============ ===============================
======================================= ===== =========== ============== ============ ===============================
Meter Type Unit Resource Origin Note
================================ ===== =========== ============== ============ ===============================
network.services.vpn Gauge vpn vpn ID pollster Existence of a VPN service
vpnservice Gauge vpn vpn ID notification Existence of a VPN service
vpnservice.create Delta vpn vpn ID notification Creation of a VPN service
vpnservice.update Delta vpn vpn ID notification Update of a VPN service
network.services.vpn.connections Gauge connection connection ID pollster Existence of a IPSec Connection
ipsec_site_connection Gauge connection connection ID notification Existence of a IPSec Connection
ipsec_site_connection.create Delta connection connection ID notification Creation of a IPSec Connection
ipsec_site_connection.update Delta connection connection ID notification Update of a IPSec Connection
ipsecpolicy Gauge ipsecpolicy ipsecpolicy ID notification Existence of a IPSec Policy
ipsecpolicy.create Delta ipsecpolicy ipsecpolicy ID notification Creation of a IPSec Policy
ipsecpolicy.update Delta ipsecpolicy ipsecpolicy ID notification Update of a IPSec Policy
ikepolicy Gauge ikepolicy ikepolicy ID notification Existence of a Ike Policy
ikepolicy.create Delta ikepolicy ikepolicy ID notification Creation of a Ike Policy
ikepolicy.update Delta ikepolicy ikepolicy ID notification Update of a Ike Policy
================================ ===== =========== ============== ============ ===============================
======================================= ===== =========== ============== ============ ===============================
network.services.vpn Gauge vpn vpn ID both Existence of a VPN service
network.services.vpn.create Delta vpn vpn ID notification Creation of a VPN service
network.services.vpn.update Delta vpn vpn ID notification Update of a VPN service
network.services.vpn.connections Gauge connection connection ID both Existence of a IPSec Connection
network.services.vpn.connections.create Delta connection connection ID notification Creation of a IPSec Connection
network.services.vpn.connections.update Delta connection connection ID notification Update of a IPSec Connection
network.services.vpn.ipsecpolicy Gauge ipsecpolicy ipsecpolicy ID notification Existence of a IPSec Policy
network.services.vpn.ipsecpolicy.create Delta ipsecpolicy ipsecpolicy ID notification Creation of a IPSec Policy
network.services.vpn.ipsecpolicy.update Delta ipsecpolicy ipsecpolicy ID notification Update of a IPSec Policy
network.services.vpn.ikepolicy Gauge ikepolicy ikepolicy ID notification Existence of a Ike Policy
network.services.vpn.ikepolicy.create Delta ikepolicy ikepolicy ID notification Creation of a Ike Policy
network.services.vpn.ikepolicy.update Delta ikepolicy ikepolicy ID notification Update of a Ike Policy
======================================= ===== =========== ============== ============ ===============================
Firewall as a Service (FWaaS)
=============================
================================ ===== ======== =========== ============ ===============================
======================================= ===== ======== =========== ============ ===============================
Meter Type Unit Resource Origin Note
================================ ===== ======== =========== ============ ===============================
network.services.firewall Gauge firewall firewall ID pollster Existence of a Firewall service
firewall Gauge firewall firewall ID notification Existence of a Firewall service
firewall.create Delta firewall firewall ID notification Creation of a Firewall service
firewall.update Delta firewall firewall ID notification Update of a Firewall service
network.services.firewall.policy Gauge policy policy ID pollster Existence of a Firewall Policy
firewall_policy Gauge policy policy ID notification Existence of a Firewall Policy
firewall_policy.create Delta policy policy ID notification Creation of a Firewall Policy
firewall_policy.update Delta policy policy ID notification Update of a Firewall Policy
firewall_rule Gauge rule rule ID notification Existence of a Firewall Rule
firewall_rule.create Delta rule rule ID notification Creation of a Firewall Rule
firewall_rule.update Delta rule rule ID notification Update of a Firewall Rule
================================ ===== ======== =========== ============ ===============================
======================================= ===== ======== =========== ============ ===============================
network.services.firewall Gauge firewall firewall ID both Existence of a Firewall service
network.services.firewall.create Delta firewall firewall ID notification Creation of a Firewall service
network.services.firewall.update Delta firewall firewall ID notification Update of a Firewall service
network.services.firewall.policy Gauge policy policy ID both Existence of a Firewall Policy
network.services.firewall.policy.create Delta policy policy ID notification Creation of a Firewall Policy
network.services.firewall.policy.update Delta policy policy ID notification Update of a Firewall Policy
network.services.firewall.rule Gauge rule rule ID notification Existence of a Firewall Rule
network.services.firewall.rule.create Delta rule rule ID notification Creation of a Firewall Rule
network.services.firewall.rule.update Delta rule rule ID notification Update of a Firewall Rule
======================================= ===== ======== =========== ============ ===============================
Ironic Hardware IPMI Sensor Data

View File

@ -79,17 +79,17 @@ ceilometer.notification =
hardware.ipmi.voltage = ceilometer.ipmi.notifications.ironic:VoltageSensorNotification
hardware.ipmi.current = ceilometer.ipmi.notifications.ironic:CurrentSensorNotification
hardware.ipmi.fan = ceilometer.ipmi.notifications.ironic:FanSensorNotification
pool = ceilometer.network.notifications:Pool
vip = ceilometer.network.notifications:Vip
member = ceilometer.network.notifications:Member
health_monitor = ceilometer.network.notifications:HealthMonitor
firewall = ceilometer.network.notifications:Firewall
firewall_policy = ceilometer.network.notifications:FirewallPolicy
firewall_rule = ceilometer.network.notifications:FirewallRule
vpnservice = ceilometer.network.notifications:VPNService
ipsecpolicy = ceilometer.network.notifications:IPSecPolicy
ikepolicy = ceilometer.network.notifications:IKEPolicy
ipsec_site_connection = ceilometer.network.notifications:IPSecSiteConnection
network.services.lb.pool = ceilometer.network.notifications:Pool
network.services.lb.vip = ceilometer.network.notifications:Vip
network.services.lb.member = ceilometer.network.notifications:Member
network.services.lb.health_monitor = ceilometer.network.notifications:HealthMonitor
network.services.firewall = ceilometer.network.notifications:Firewall
network.services.firewall.policy = ceilometer.network.notifications:FirewallPolicy
network.services.firewall.rule = ceilometer.network.notifications:FirewallRule
network.services.vpn = ceilometer.network.notifications:VPNService
network.services.vpn.ipsecpolicy = ceilometer.network.notifications:IPSecPolicy
network.services.vpn.ikepolicy = ceilometer.network.notifications:IKEPolicy
network.services.vpn.connections = ceilometer.network.notifications:IPSecSiteConnection
ceilometer.discover =
local_instances = ceilometer.compute.discovery:InstanceDiscovery