Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to generate a token from Keystone for ceilometer

Hi, I am trying to generate a token from keystone in order to use it for ceilometer. The token I got from keystone does not work. the curl command always returns 401. any one can provide me with correct way to get the token. I used the following curl command to get the token

curl -k -X 'POST' -v http://host:5000/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "admin", "password":"password"}, "tenantName":"admin"}}' -H 'Content-type: application/json'

and then I use the following curl command to access the ceilometer

curl -k -X 'GET' -v http://host:8777/v2.0/resources -H 'X-Auth-Token":TokenFromPreviousCall'' -H 'Content-type: application/json' -H 'Accept: application/json'

the command returns "Authentication required"

Thanks