Bug 988362
Summary: | [RFE] POST API for metering samples | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Eoghan Glynn <eglynn> |
Component: | openstack-ceilometer | Assignee: | Eoghan Glynn <eglynn> |
Status: | CLOSED ERRATA | QA Contact: | Kevin Whitney <kwhitney> |
Severity: | high | Docs Contact: | |
Priority: | low | ||
Version: | 4.0 | CC: | ajeain, breeler, eglynn, hateya, jruzicka, mlopes, pbrady, sgordon, srevivo, yeylon |
Target Milestone: | Upstream M1 | Keywords: | FutureFeature, OtherQA |
Target Release: | 4.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://blueprints.launchpad.net/ceilometer/+spec/meter-post-api | ||
Whiteboard: | |||
Fixed In Version: | openstack-ceilometer-2013.2-0.2.b1.el6ost | Doc Type: | Enhancement |
Doc Text: |
A public RESTful API to accept incoming sample datapoints has been added to OpenStack Metering. This was required because it is often more convenient for user-level agents to emit statistics to Ceilometer via a public API, than to gain access to the AMQP bus.
Now, samples may be POSTed to the "/v2/meters/<meter_name>" endpoint.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2013-12-20 00:15:34 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 973191, 975499, 1055813 |
Description
Eoghan Glynn
2013-07-25 12:02:47 UTC
Heat and Ceilometer tests will be performed mainly by Dev How To Test =========== 0. Install packstack allinone in the usual way. 1. Submit a sequence of samples for a fabricated meter: for i in $(seq 5) do ceilometer sample-create -r foobar -m instance_likes \ --meter-type delta --meter-unit thumbs_up --sample-volume $i \ --resource-metadata '{"image_id": "cirros", "vcpus": "1", "display_name": "test_server", "ram": "512"}' \ --timestamp $(date -u +"%Y-%m-%dT%H:%M:%SZ") sleep 1 done 2. Ensure that the samples are all reported correctly: ceilometer sample-list -m instance_likes The correct number of samples should be reported, with the volumes in descending order. 3. Ensure that samples are aggregated as expected: ceilometer statistics ceilometer sample-list -m instance_likes Check that the aggregates reported are sane: count: 5 min: 1 max: 5 sum: sigma n (n <= 5) avg: 3 4. Ensure that the project and user IDs for the submitted samples can only be set to another indentity by admin: export OS_USERNAME=demo export OS_TENANT_NAME=demo export OS_PASSWORD=<DEMO_PASSWORD> ceilometer --debug sample-create -r foobar -m instance_likes \ --meter-type delta --meter-unit thumbs_up --sample-volume 6 \ --resource-metadata '{"image_id": "cirros", "vcpus": "1", "display_name": "test_server", "ram": "512"}' \ --timestamp $(date -u +"%Y-%m-%dT%H:%M:%SZ") \ --project-id foo --user-id bar Should fail with: ... {"error_message": {"debuginfo": null, "faultcode": "Client", "faultstring": "Invalid input for field/attribute project_id. Value: 'project_id'. can not post samples to other projects"}} WARNING (http:172) Request returned failure status. HTTPBadRequest (HTTP 400) Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2013-1859.html |