raxmon - Malformed Response

From Github Issues Page

When using the latest version of raxmon (a.k.a. Rackspace Monitoring CLI) you might get the following error:

$ raxmon-entities-list
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/raxmon-entities-list", line 23, in <module>
    run_action(None, None, 'entities', 'list', callback)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/raxmon_cli/common.py", line 119, in run_action
    instance = get_instance(username, api_key, api_url, auth_url)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/raxmon_cli/common.py", line 136, in get_instance
    instance = driver(username, api_key, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rackspace_monitoring/drivers/rackspace.py", line 173, in __init__
    self._initialize_connection_base_url(constructor_kwargs=kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rackspace_monitoring/drivers/rackspace.py", line 187, in _initialize_connection_base_url
    self.connection._populate_hosts_and_request_paths()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/libcloud/common/openstack.py", line 602, in _populate_hosts_and_request_paths
    osa.authenticate()  # may throw InvalidCreds
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/libcloud/common/openstack.py", line 155, in authenticate
    return self.authenticate_2_0_with_apikey()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/libcloud/common/openstack.py", line 240, in authenticate_2_0_with_apikey
    return self.authenticate_2_0_with_body(reqbody)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/libcloud/common/openstack.py", line 264, in authenticate_2_0_with_body
    driver=self.driver)
libcloud.common.types.MalformedResponseError: <MalformedResponseException in None 'Malformed response'>: 'code: 405 body: {"methodNotAllowed":{"code":405}}'

The simple fix is to add '/tokens' to your auth_api section in your .raxrc file or on your command arguments:

[auth_api]
url=https://identity.api.rackspacecloud.com/v2.0/tokens