no user_metadata added in network samples data

Bug #1369500 reported by Hang Liu
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Hang Liu
Juno
Fix Released
Medium
Eoghan Glynn

Bug Description

For other meter samples such as cpu_util or disk.*, "user_metadata" is included in sample data

{
    "counter_name": "disk.read.bytes",
    "counter_type": "cumulative",
    "counter_unit": "B",

     ... ...

    "resource_metadata": {
        "OS-EXT-AZ:availability_zone": "nova",
        "disk_gb": 20,
        "display_name": "te-ServerGroup-4j577oohiuli-gpbzcdrp7ymx-dd2k2dtivusr",
        "ephemeral_gb": 0,

         ... ...

        "root_gb": 20,
        "status": "active",
        "user_metadata": {
            "stack": "bcb16239-c7ae-4ccc-b686-5f2a35878e28"
        },
        "vcpus": 1
    },
    "source": "openstack",
    "timestamp": "2014-09-15T07:56:11Z",
    "user_id": "311ef8f58df7478fb1cf680f86c51e37"
}

while for network.* meters, "user_metadata" is missing

{
    "counter_name": "network.incoming.bytes.rate",
    "counter_type": "gauge",
    "counter_unit": "B/s",

      ... ...

    "resource_metadata": {
        "fref": null,
        "instance_id": "b0da23a1-e0a8-495b-bf14-2629654162a5",
        "instance_type": "2",
        "mac": "fa:16:3e:f1:ee:10",
        "name": "tap6cb98968-ab",
        "parameters": {}
    },
    "source": "openstack",
    "timestamp": "2014-09-15T07:56:11Z",
    "user_id": "311ef8f58df7478fb1cf680f86c51e37"
}

In the heat template, "use_metadata" is using to match the sample to the stack ID. If it is missing,
alarm would not be raised.

Hang Liu (hangliu)
Changed in ceilometer:
assignee: nobody → Hang Liu (hangliu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/123646

Changed in ceilometer:
status: New → In Progress
Dina Belova (dbelova)
Changed in ceilometer:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/123646
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=cca6fcd89e0044f310f6b05c62665302582e14e1
Submitter: Jenkins
Branch: master

commit cca6fcd89e0044f310f6b05c62665302582e14e1
Author: Hang Liu <email address hidden>
Date: Wed Sep 24 01:59:53 2014 -0500

    Add user_metadata to network samples

    Previously 'user_metadata' is not included in ceilometer network samples,
    while it is in other samples. This causes network samples not triggering
    alarms heat created.

    Change-Id: Iafb4c42955fceaaf20fef1f9580ddb1331a0c724
    Closes-Bug: 1369500

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → kilo-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/137359

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/juno)

Reviewed: https://review.openstack.org/137359
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=48a2957c5c06d1fd43c86486345cb0784f5a700b
Submitter: Jenkins
Branch: stable/juno

commit 48a2957c5c06d1fd43c86486345cb0784f5a700b
Author: Hang Liu <email address hidden>
Date: Wed Sep 24 01:59:53 2014 -0500

    Add user_metadata to network samples

    Previously 'user_metadata' is not included in ceilometer network samples,
    while it is in other samples. This causes network samples not triggering
    alarms heat created.

    Change-Id: Iafb4c42955fceaaf20fef1f9580ddb1331a0c724
    Closes-Bug: 1369500
    (cherry picked from commit cca6fcd89e0044f310f6b05c62665302582e14e1)

Revision history for this message
Marcus (mga0) wrote :

Sure you want a format like that? Thats a huuuuuuge resource_ID

foo@bar~# ceilometer sample-list -m 'network.outgoing.bytes.rate' | less
+-----------------------------------------------------------------------+-----------------------------+-------+-----------------+------+---------------------+
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+-----------------------------------------------------------------------+-----------------------------+-------+-----------------+------+---------------------+
| instance-00000074-1360f8a6-94a7-4bd7-8667-deca6e33ecad-tapb81a824b-d3 | network.outgoing.bytes.rate | gauge | 182.262295082 | B/s | 2014-11-28T07:21:55 |
| instance-00000073-6a10f983-834f-4175-906c-dbc6d99642a8-tap2aeb5e1c-d1 | network.outgoing.bytes.rate | gauge | 1541.67213115 | B/s | 2014-11-28T07:21:55 |

Revision history for this message
Hang Liu (hangliu) wrote :

The resource_ID is formatted as "instance_name - instance.id - vnic.name". The network samples are associated with
a specific port of a VM instance. So the vnic.name should be there. But instance_name might be not necessary if only for a unique
resource ID. I also don't know why it is included, it looks this way long before this bug.

Revision history for this message
Eoghan Glynn (eglynn) wrote :

Marcus - the resource ID is orthogonal to the current bug, but I agree that it seems needlessly lenthy. The instance UUID provides sufficient global uniqueness in itself to identify the VM unambiguously, without also prepending the libvirt domain ID (which is only unique per-host)

Revision history for this message
Marcus (mga0) wrote :

Thats also my opinion.
The problem was, that I did querying on the CLR for debugging reasons and didn't get any results for
ceilometer sample-list -m 'network.outgoing.bytes.rate' --query resources_id=<InstanceID> while the same command with -m 'cpu_util' works fine.
Would be great to have a 'corporate design' for every meter (like the normal instance id). Otherwise we need an extra screen especially for displaying the resource_id :)

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

@Marcus

There is a patch which fix the long resource-id issue for NIC releated sample, it is still reviewing in progress: https://review.openstack.org/132148

Revision history for this message
Hang Liu (hangliu) wrote :

Hi, Eoghan Glynn, ZhiQiang

Can network meters also report combining data of vnics, just like disk meters do?

For per vnic port data, use deeper meters to query, refer to this change

https://review.openstack.org/#/c/132040

Maybe those meters looks like these,

 - network.port.incoming.bytes
 - network.port.incoming.packets
 - network.port.outgoing.bytes
 - network.port.outgoing.packets

Then UUID can be used for keys of both the combined and per port network meter samples.
What do you think about it?

Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

@Hang Liu

Agree, I'm trying to work on this

Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.