← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1945560] Re: Neutron-metering doesnt get "bandwidth" metric

 

[Expired for neutron because there has been no activity for 60 days.]

** Changed in: neutron
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1945560

Title:
  Neutron-metering doesnt get "bandwidth" metric

Status in neutron:
  Expired

Bug description:
  Hello everyone!

  I'm trying to get the "bandwidth" metric from all of the instances.
  I've already installed the neutron-metering agent using Kolla-Ansible.

  Also, I've created two meters for neutron:
  +--------------------------------------+-----------+-------------+--------+
  | ID | Name | Description | Shared |
  +--------------------------------------+-----------+-------------+--------+
  | 64d3ca0d-30c3-4159-8a8c-c011e54be83a | name1-out | | |
  | 6927ce7d-413c-4749-9e74-6725c59c2de2 | name1-in | | |
  +--------------------------------------+-----------+-------------+--------+

  I've already also created the rules for the ingress and egress:
  +--------------------------------------+----------+-----------+------------------+------------------+-----------------------+
  | ID | Excluded | Direction | Remote IP Prefix | Source IP Prefix | Destination IP Prefix |
  +--------------------------------------+----------+-----------+------------------+------------------+-----------------------+
  | 0f11b59d-3e94-4886-a30f-348ce9cacfa7 | | ingress | 192.168.0.0/24 | None | None |
  | 7f88e16f-a58c-42c8-9447-82843a41591e | | egress | 192.168.0.0/24 | None | None |
  +--------------------------------------+----------+-----------+------------------+------------------+-----------------------+

  And this is the detail of one of my VMs, where I want to measure the bandwidth:
  +-------------------------------------+----------------------------------------------------------+
  | Field | Value |
  +-------------------------------------+----------------------------------------------------------+
  | OS-DCF:diskConfig | MANUAL |
  | OS-EXT-AZ:availability_zone | nova |
  | OS-EXT-SRV-ATTR:host | urimeba |
  | OS-EXT-SRV-ATTR:hypervisor_hostname | urimeba |
  | OS-EXT-SRV-ATTR:instance_name | instance-00000006 |
  | OS-EXT-STS:power_state | Running |
  | OS-EXT-STS:task_state | None |
  | OS-EXT-STS:vm_state | active |
  | OS-SRV-USG:launched_at | 2021-09-28T01:13:10.000000 |
  | OS-SRV-USG:terminated_at | None |
  | accessIPv4 | |
  | accessIPv6 | |
  | addresses | public1=192.168.0.30 |
  | config_drive | |
  | created | 2021-09-28T01:13:04Z |
  | flavor | m1.tiny (1) |
  | hostId | 81e8f4bc7aca4da99189723a66c4ceb656973850ce68737f28c14023 |
  | id | a42a2905-1fe4-45e2-90e1-f3071e039a15 |
  | image | cirros (d65726f0-ae15-48cf-b5ee-645695f685fe) |
  | key_name | None |
  | name | test_image_cirros |
  | progress | 0 |
  | project_id | 8c9e007415c745feb315a11e7f410c0d |
  | properties | |
  | security_groups | name='default' |
  | status | ACTIVE |
  | updated | 2021-09-29T22:53:15Z |
  | user_id | fad13a6f51794a6b8e91d6f863078b84 |
  | volumes_attached | |
  +-------------------------------------+----------------------------------------------------------+

  As far as I can see, everything is well configured.
  I took a look at ceilometer measurements and saw that this metric "bandwidth" needed a "notification" origin, which make me wonder If I had ceilometer configured well to get this metric.

  The trouble is that I have 3 docker containers: ceilometer-compute, ceilometer-central and ceilometer-notification.
  By default, Kolla-Ansible deploys ceilometer based on events (I think), but only inside the "ceilometer-notification" container I have two differents files, which are:
  *event_definitons.yaml
  *event_pipeline.yaml

  The content of "event_definitions.yaml" is the same found in the repo (I dont put the content here, because is a lot of text):
  https://github.com/openstack/ceilometer/blob/master/ceilometer/pipeline/data/event_definitions.yaml

  And the content of "event_pipeline.yaml" is this:
  ---
  sources:
      - name: event_source
        events:
            - "*"
        sinks:
            - event_sink
  sinks:
      - name: event_sink
        publishers:
            - gnocchi://

  
  Also, I have 2 polling files:
  *polling_all.yaml
  *polling.yaml

  The content of "polling_all.yaml" is:
  ---
  sources:
      - name: all_pollsters
        interval: 300
        meters:
          - "*"

  And the content of "polling.yaml" is:
  ---
  sources:
      - name: some_pollsters
        interval: 300
        meters:
          - cpu
          - cpu_l3_cache
          - memory.usage
          - network.incoming.bytes
          - network.incoming.packets
          - network.outgoing.bytes
          - network.outgoing.packets
          - disk.device.read.bytes
          - disk.device.read.requests
          - disk.device.write.bytes
          - disk.device.write.requests
          - hardware.cpu.util
          - hardware.cpu.user
          - hardware.cpu.nice
          - hardware.cpu.system
          - hardware.cpu.idle
          - hardware.cpu.wait
          - hardware.cpu.kernel
          - hardware.cpu.interrupt
          - hardware.memory.used
          - hardware.memory.total
          - hardware.memory.buffer
          - hardware.memory.cached
          - hardware.memory.swap.avail
          - hardware.memory.swap.total
          - hardware.system_stats.io.outgoing.blocks
          - hardware.system_stats.io.incoming.blocks
          - hardware.network.ip.incoming.datagrams
          - hardware.network.ip.outgoing.datagrams

  When I try to get the metric with "openstack metric list | grep
  bandwidth", nothing shows up.

  The neutron-metering log shows effectively how no bandwidth is getting found:
  2021-09-29 23:36:31.409 7 DEBUG neutron.services.metering.agents.metering_agent [-] Traffic counters [{}] retrieved for routers [{'52100624-471d-4e7e-a19f-ff87e8161070': {'id': '52100624-471d-4e7e-a19f-ff87e8161070', 'name': 'demo-router', 'tenant_id': '8c9e007415c745feb315a11e7f410c0d', 'admin_state_up': True, 'status': 'ACTIVE', 'gw_port_id': '83161bcf-46ca-4b1d-931f-8794a5a5c9e9', 'distributed': False, '_metering_labels': [{'id': '64d3ca0d-30c3-4159-8a8c-c011e54be83a', 'rules': [{'id': '7f88e16f-a58c-42c8-9447-82843a41591e', 'metering_label_id': '64d3ca0d-30c3-4159-8a8c-c011e54be83a', 'direction': 'egress', 'remote_ip_prefix': '192.168.0.0/24', 'source_ip_prefix': None, 'destination_ip_prefix': None, 'excluded': True}], 'shared': True, 'name': 'name1-out'}, {'id': '6927ce7d-413c-4749-9e74-6725c59c2de2', 'rules': [{'id': '0f11b59d-3e94-4886-a30f-348ce9cacfa7', 'metering_label_id': '6927ce7d-413c-4749-9e74-6725c59c2de2', 'direction': 'ingress', 'remote_ip_prefix': '192.168.0.0/24', 'source_ip_prefix': None, 'destination_ip_prefix': None, 'excluded': True}], 'shared': True, 'name': 'name1-in'}]}}]. _add_metering_infos /var/lib/kolla/venv/lib/python3.6/site-packages/neutron/services/metering/agents/metering_agent.py:224

  I'll appreciate any help.
  Thanks and Greetings!

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1945560/+subscriptions



References