<div dir="ltr"><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">Hello.
I'm very newby on openstack-<strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong> and today I once installed monas
ca api on a server as i learned the way through devstack page(http:/
/<a href="http://docs.openstack.org/developer/devstack/">docs.openstack.org/developer/devstack/</a>) and vagrant file (<a class="exlink gmail-mklink" href="https://g/" rel="nofollow" style="color:rgb(0,0,153)">https://g</a>
<a href="http://ithub.com/openstack/">ithub.com/openstack/</a><strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong>-api/blob/master/devstack/Vagrantfile).
Then test <strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong> client just like the following.

</p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">1. generated user teampfmon and associate the role '<strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong>-user' in
the project mini-mon
2. Once I tested <strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong> client with some options such as
    "<strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong> --os-username teampfmon --os-password solbox --os-user-
domain-name default --os-project-name mini-mon --os-auth-url http://
<a href="http://192.168.120.21:35357/v3">192.168.120.21:35357/v3</a> --os-service-type monitoring -d alarm-list"
   I got error result. It seemed that the version of keystone change
d in the progress from v3 to <strong style="background-color:rgb(221,255,118);padding:2px">v2.0</strong>. could you, any one let me know ho
w to solve this problem? for your thought I'm posting the result of
<strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong> client and the api log.</p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre"><br></p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre"><br></p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">-----------< here is the command result >--------------------------

</p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">    DEBUG (base:189) Making authentication request to
<a class="exlink gmail-mklink" href="http://192.168.120.21:35357/v3/auth/tokens" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:35357/v3/auth/tokens</a>
INFO (connectionpool:214) Starting new HTTP connection (1):
192.168.120.21
DEBUG (connectionpool:401) "POST /v3/auth/<strong style="background-color:rgb(221,255,118);padding:2px">tokens</strong> HTTP/1.1" 201 1844
DEBUG (base:194) {"<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>": {"is_domain": false, "methods":
["password"], "roles": [{"id": "f649abe5389645c4a4ad52486cdc944b",
"name": "<strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong>-read-only-user"}, {"id":
"803be4a6fff44737bfba8d5bb786103a", "name": "service"},
{"id": "5bd32dadddd04863b00135a538bd7dfe", "name": "<strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong>-user"}],
"expires_at": "2016-11-29T12:36:07.000000Z", "project": {"domain":
{"id": "default", "name": "Default"}, "id":
"6a25a8121ac443129046ac66e9ec04fa", "name": "mini-mon"}, "catalog":
 [{"endpoints": [{"url": "<a class="exlink gmail-mklink" href="http://192.168.120.21:8070/v2.0" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:8070/v2.0</a>",
"interface": "internal", "region": "RegionOne",
"region_id": "RegionOne", "id": "0e70450c17584a0bb2b19aa6ac6a2877"},
 {"url": "<a class="exlink gmail-mklink" href="http://192.168.120.21:8070/v2.0" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:8070/v2.0</a>", "interface": "admin",
"region": "RegionOne", "region_id": "RegionOne", "id":
"89f121cafca94651857d58e8b77137bd"}, {"url":
"<a class="exlink gmail-mklink" href="http://192.168.120.21:8070/v2.0" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:8070/v2.0</a>", "interface": "public", "region":
"RegionOne", "region_id": "RegionOne", "id":
"8b292832b28e4dce94db8a2609cf602c"}], "type": "monitoring", "id":
"08d47fcce8ce4fcdb6d3440c501ce91c", "name": "<strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong>"},</p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">{"endpoints": [{"url": "<a class="exlink gmail-mklink" href="http://192.168.120.21/identity_admin" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21/identity_admin</a>",
"interface": "admin", "region": "RegionOne", "region_id":
"RegionOne", "id": "365aa10fd06c4714a30105ba9ecd1ec3"}, {"url":
"<a class="exlink gmail-mklink" href="http://192.168.120.21/identity" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21/identity</a>", "interface": "public", "region":
"RegionOne", "region_id": "RegionOne", "id":
"53151f8c14bf4877a1edeb9c59ce8ac6"}, {"url":
"<a class="exlink gmail-mklink" href="http://192.168.120.21/identity" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21/identity</a>", "interface": "internal",
"region": "RegionOne", "region_id": "RegionOne", "id":
"da0ed154dcda4a74bd365327f4deeadd"}], "type": "identity", "id":
"b8a91feb1e5b4c51b46f27f908789ed8", "name": "keystone"}], "user":
{"domain": {"id": "default", "name": "Default"},
"password_expires_at": null, "name": "teampfmon", "id":
"e4c428013d144091b95edcd768144588"}, "audit_ids":
["DyI6cfgNSPeT8Fe-2LX1rw"], "issued_at":
"2016-11-29T11:36:07.000000Z"}}
curl -i -X GET -H 'X-Auth-User: teampfmon'
-H 'X-Auth-<strong style="background-color:rgb(221,255,118);padding:2px">Token</strong>: *****' -H 'X-Auth-Key: *****'
-H 'Accept: application/json'
-H 'User-Agent: python-monascaclient'
-H 'Content-Type: application/json'
-H 'X-Auth-Url: <a class="exlink gmail-mklink" href="http://192.168.120.21:35357/v3" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:35357/v3</a>'
<a class="exlink gmail-mklink" href="http://192.168.120.21:8070/v2.0/alarms" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:8070/v2.0/alarms</a>
DEBUG (http:156) curl -i -X GET -H 'X-Auth-User: teampfmon'
-H 'X-Auth-<strong style="background-color:rgb(221,255,118);padding:2px">Token</strong>: *****' -H 'X-Auth-Key: *****'
-H 'Accept: application/json' -H 'User-Agent: python-monascaclient'
-H 'Content-Type: application/json'
-H 'X-Auth-Url: <a class="exlink gmail-mklink" href="http://192.168.120.21:35357/v3" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:35357/v3</a>'
<a class="exlink gmail-mklink" href="http://192.168.120.21:8070/v2.0/alarms" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:8070/v2.0/alarms</a>
INFO (connectionpool:214) Starting new HTTP connection (1):
192.168.120.21
DEBUG (connectionpool:401) "GET /<strong style="background-color:rgb(221,255,118);padding:2px">v2.0</strong>/alarms HTTP/1.1" 503 170

</p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">HTTP/1.1 503 Service Unavailable
Server: gunicorn/19.6.0
Date: Tue, 29 Nov 2016 11:36:07 GMT
Connection: keep-alive
Content-Length: 170
Content-Type: application/json; charset=UTF-8

</p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">{"message": "The server is currently unavailable. Please try again
at a later time.<br /><br />\n\n\n", "code": "503 Service
Unavailable", "title": "Service Unavailable"}

</p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">DEBUG (http:169)
HTTP/1.1 503 Service Unavailable
Server: gunicorn/19.6.0
Date: Tue, 29 Nov 2016 11:36:07 GMT
Connection: keep-alive
Content-Length: 170
Content-Type: application/json; charset=UTF-8

</p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">{"message": "The server is currently unavailable. Please try again
at a later time.<br /><br />\n\n\n", "code": "503 Service
Unavailable", "title": "Service Unavailable"}

</p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">ERROR (exc:80) exception: {"message": "The server is currently
unavailable. Please try again at a later time.<br /><br />\n\n\n",
"code": "503 Service Unavailable", "title": "Service Unavailable"}
Traceback (most recent call last):
  File "/usr/local/bin/<strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong>", line 11, in <module>
    sys.exit(main())
  File
"/usr/local/lib/python2.7/dist-packages/monascaclient/shell.py",
line 443, in main
    MonascaShell().main(args)
  File
"/usr/local/lib/python2.7/dist-packages/monascaclient/shell.py",
line 398, in main
    args.func(client, args)
  File
"/usr/local/lib/python2.7/dist-packages/monascaclient/v2_0/sh
ell.py", line 1058, in do_alarm_list
    (he.code, he.message))
monascaclient.exc.CommandError: HTTPException code=503
message={"message": "The server is currently unavailable.
Please try again at a later time.<br /><br />\n\n\n",
"code": "503 Service Unavailable", "title": "Service Unavailable"}

</p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre">--------------------------------------------------------------------
---------------------------------<here is the log>----------------------
[[D2016-11-29 20:36:07,762 DEBUG [gunicorn.error][GreenThread-1] GET
/<strong style="background-color:rgb(221,255,118);padding:2px">v2.0</strong>/alarms
2016-11-29 20:36:07,763 WARNING
[keystonemiddleware.auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>][GreenThread-1] Using the in-process
<strong style="background-color:rgb(221,255,118);padding:2px">token</strong> cache is deprecated as of the 4.2.0 release and may be
removed in the 5.0.0 release or the 'O' development cycle. The
in-process cache causes inconsistent results and high memory usage.
When the feature is removed the auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong> middleware will not cache
 <strong style="background-color:rgb(221,255,118);padding:2px">tokens</strong> by default which may result in performance issues. It is rec
ommended to use  memcache for the auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong> <strong style="background-color:rgb(221,255,118);padding:2px">token</strong> cache by setting
the memcached_servers option.
2016-11-29 20:36:07,763 DEBUG [keystonemiddleware.auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>][
GreenThread-1] Authenticating user <strong style="background-color:rgb(221,255,118);padding:2px">token</strong>
2016-11-29 20:36:07,764 DEBUG [keystoneauth.session][GreenThread-1]
REQ: curl -g -i -X GET <a class="exlink gmail-mklink" href="http://192.168.120.21:35357/" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:35357</a>
-H "Accept: application/json" -H "User-Agent: <strong style="background-color:rgb(221,255,118);padding:2px">monasca</strong>_api/0.0.0
keystonemiddleware.auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>/4.10.0 keystoneauth1/2.15.0
python-requests/2.11.1 CPython/2.7.12"
2016-11-29 20:36:07,769 INFO [
requests.packages.urllib3.connectionpool][GreenThread-1]
Starting new HTTP connection (1): 192.168.120.21
2016-11-29 20:36:07,774 DEBUG [
requests.packages.urllib3.connectionpool][GreenThread-1]
"GET / HTTP/1.1" 300 621
2016-11-29 20:36:07,798 DEBUG [keystoneauth.session][GreenThread-1]
RESP: [300] Date: Tue, 29 Nov 2016 11:36:07 GMT Server:
Apache/2.4.18 (Ubuntu) Vary: X-Auth-<strong style="background-color:rgb(221,255,118);padding:2px">Token</strong> Content-Length: 621
Keep-Alive: timeout=5, max=100 Connection: Keep-Alive
Content-Type: application/json
RESP BODY: {"versions": {"values": [{"status": "stable", "updated":
 "2016-10-06T00:00:00Z", "media-types": [{"base": "application/json"
"type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.7"
, "links": [{"href": "<a class="exlink gmail-mklink" href="http://192.168.120.21/identity_admin/v3/" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21/identity_admin/v3/</a>",
"rel": "self"}]}, {"status": "deprecated", "updated":
"2016-08-04T00:00:00Z", "media-types": [{"base": "application/json",
 "type": "application/vnd.openstack.identity-<strong style="background-color:rgb(221,255,118);padding:2px">v2.0</strong>+json"}], "id":
"<strong style="background-color:rgb(221,255,118);padding:2px">v2.0</strong>", "links":
[{"href": "<a class="exlink gmail-mklink" href="http://192.168.120.21/identity_admin/v2.0/" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21/identity_admin/v2.0/</a>", "rel":
"self"}, {"href": "<a class="exlink gmail-mklink" href="http://docs.openstack.org/" rel="nofollow" style="color:rgb(0,0,153)">http://docs.openstack.org/</a>", "type": "text/html",
 "rel": "describedby"}]}]}}

</p><div class="gmail-footer gmail-legalese" style="font-family:arial,helvetica,"luxi sans",sans-serif;font-style:italic;white-space:pre;color:rgb(153,153,153);font-size:14.4px"><p style="padding:0px;margin:0px">2016-11-29 20:36:07,799 DEBUG [keystonemiddleware.auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>]
[GreenThread-1] Auth <strong style="background-color:rgb(221,255,118);padding:2px">Token</strong> confirmed use of None apis
2016-11-29 20:36:07,802 DEBUG [keystoneauth.identity.v2]
[GreenThread-1] Making authentication request to
<a class="exlink gmail-mklink" href="http://192.168.120.21:35357/v2.0/tokens" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:35357/v2.0/tokens</a>
2016-11-29 20:36:07,886 DEBUG
[requests.packages.urllib3.connectionpool][GreenThread-1]
"POST /<strong style="background-color:rgb(221,255,118);padding:2px">v2.0</strong>/<strong style="background-color:rgb(221,255,118);padding:2px">tokens</strong> HTTP/1.1" 401 114
2016-11-29 20:36:07,888 DEBUG [keystoneauth.session][GreenThread-1]
 Request returned failure status: 401
2016-11-29 20:36:07,888 INFO [keystonemiddleware.auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>]
[GreenThread-1] Identity server rejected authorization
2016-11-29 20:36:07,889 WARNING [keystonemiddleware.auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>]
[GreenThread-1] Identity response: {"error": {"message":
"The request you have made requires authentication.", "code": 401,
"title": "Unauthorized"}}
2016-11-29 20:36:07,889 INFO [keystonemiddleware.auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>]
[GreenThread-1] Retrying validation
2016-11-29 20:36:07,890 DEBUG [keystoneauth.identity.v2]
[GreenThread-1] Making authentication request to
<a class="exlink gmail-mklink" href="http://192.168.120.21:35357/v2.0/tokens" rel="nofollow" style="color:rgb(0,0,153)">http://192.168.120.21:35357/v2.0/tokens</a>
2016-11-29 20:36:07,964 DEBUG
[requests.packages.urllib3.connectionpool][GreenThread-1]
"POST /<strong style="background-color:rgb(221,255,118);padding:2px">v2.0</strong>/<strong style="background-color:rgb(221,255,118);padding:2px">tokens</strong> HTTP/1.1" 401 114
2016-11-29 20:36:07,966 DEBUG [keystoneauth.session][GreenThread-1]
Request returned failure status: 401
2016-11-29 20:36:07,966 INFO [keystonemiddleware.auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>]
[GreenThread-1] Identity server rejected authorization
2016-11-29 20:36:07,967 WARNING [keystonemiddleware.auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>]
[GreenThread-1] Identity response: {"error": {"message":
"The request you have made requires authentication.", "code": 401,
"title": "Unauthorized"}}
2016-11-29 20:36:07,967 CRITICAL [keystonemiddleware.auth_<strong style="background-color:rgb(221,255,118);padding:2px">token</strong>]
[GreenThread-1] Unable to validate <strong style="background-color:rgb(221,255,118);padding:2px">token</strong>: Identity server
rejected authorization necessary to fetch <strong style="background-color:rgb(221,255,118);padding:2px">token</strong> data
2016-11-29 20:36:07,971 DEBUG [gunicorn.error][GreenThread-1]
Closing connection.

</p></div><div class="gmail-footer gmail-noise" style="font-family:arial,helvetica,"luxi sans",sans-serif;font-style:italic;white-space:pre;color:rgb(0,0,0);font-size:14.4px"><p style="padding:0px;margin:0px">--------------------------------------------------------------------

</p></div><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;white-space:pre"></p><div class="gmail-footer gmail-list-management" style="font-family:arial,helvetica,"luxi sans",sans-serif;font-style:italic;color:rgb(153,153,153);font-size:14.4px"></div><p></p><p style="padding:0px;margin:0px;color:rgb(0,0,0);font-family:arial,helvetica,"luxi sans",sans-serif;font-size:14.4px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:pre;word-spacing:0px;background-color:rgb(255,255,255)">Thanks.
</p></div>