ceilometer with userdefined data: missing argument counter_volume

asked 2014-07-09 06:57:29 -0500

svisser_cg gravatar image

updated 2014-07-09 07:07:39 -0500

Please assist in the following: I'm running into an issue with Havana Ceilometer (v1.0.9) on RHEL 6.5 with an API call that worked against 1.0.8 in another (similar) install. I send the following sample to the api:

'[{"counter_name": "zarafa-user", "user_id": "86322aa6-7f6e-1033-9adf-cb4a0482bbec", "resource_id": "95c24230-7f6e-1033-9b17-cb4a0482bbec", "counter_unit": "#", "counter_volume": "1.0", "project_id": "d0eeb51cb49a422ab4a50bad8c84cd60", "resource_metadata": {"mail": "cr7.ua4@example.com"}, "counter_type": "gauge"}]'

and get notification with message "Missing argument: \"counter_volume\" even though this argument is actually present in the json request body.

I have been able to reproduce this issue on the CLI with below command and same error msg:

ceilometer --debug sample-create --project-id d0eeb51cb49a422ab4a50bad8c84cd60 --user-id 86322aa6-7f6e-1033-9adf-cb4a0482bbec -r 95c24230-7f6e-1033-9b17-cb4a0482bbec -m zarafa-user --meter-type gauge --meter-unit "#" --sample-volume "1.0" --resource-metadata '{"mail":"cr7.ua4@example.com"}'

the full error in the debug msg:

DEBUG (http:121)
HTTP/1.0 400 Bad Request
date: Wed, 09 Jul 2014 11:53:01 GMT
content-length: 116
content-type: application/json
server: WSGIServer/0.1 Python/2.6.6

{"error_message": {"debuginfo": null, "faultcode": "Client", "faultstring": "Missing argument: \"counter_volume\""}}

WARNING (http:172) Request returned failure status.
Traceback (most recent call last):
  File "/usr/bin/ceilometer", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.6/site-packages/ceilometerclient/shell.py", line 335, in main
    CeilometerShell().main(args)
  File "/usr/lib/python2.6/site-packages/ceilometerclient/shell.py", line 289, in main
    args.func(client, args)
  File "/usr/lib/python2.6/site-packages/ceilometerclient/v2/shell.py", line 129, in do_sample_create
    sample = cc.samples.create(**fields)
  File "/usr/lib/python2.6/site-packages/ceilometerclient/v2/samples.py", line 52, in create
    body=[new])
  File "/usr/lib/python2.6/site-packages/ceilometerclient/common/http.py", line 190, in json_request
    resp, body_iter = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.6/site-packages/ceilometerclient/common/http.py", line 173, in _http_request
    raise exc.from_response(resp, ''.join(body_iter))
ceilometerclient.exc.HTTPBadRequest: HTTPBadRequest (HTTP 400) ERROR Missing argument: "counter_volume"
edit retag flag offensive close merge delete