How to create a meter using Ceilometer API
I want to create a meter using ceilometer API, and have read through the API documentation, but I'm not clear on how to write my curl statement.
What I want to do is to make a meter for cpu_util of an instance(VM) This is my try, and it does not work. I couldn't figure out how to write the json request from the information supplied in the API docs. I'm not sure if I'm supposed to specify it as a "meter" or a "sample".
curl -i http://.../v2/meters/myMeter -X GET -H "X-Auth-Project-Id: admin" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: $TOKEN" -d '{"sample":{"user_id": null, "name": "cpu_util", "resource_id": (Server ID), "source": "openstack", "project_id": (my project ID), "type": "gauge", "unit": "instance"}}'
Help/advice is greatly appreciated, thanks in advance.