2.3 KiB
The gnocchi
shell utility
gnocchi
The gnocchi
shell utility interacts with Gnocchi from the command line. It supports
the entirety of the Gnocchi API.
Authentication method
You'll need to provide the authentication method and your credentials
to gnocchi
.
No authentication
If you're using Gnocchi with no authentication, export the following variables in your environment:
export OS_AUTH_TYPE=gnocchi-noauth
export GNOCCHI_USER_ID=<youruserid>
export GNOCCHI_PROJECT_ID=<yourprojectid>
export GNOCCHI_ENDPOINT=http://urlofgnocchi
Note
OS_AUTH_TYPE is used globally by all clients supporting Keystone.
Provide --os-auth-plugin
gnocchi-noauth to the client
instead if other clients are used in session.
Basic authentication
If you're using Gnocchi with basic authentication, export the following variables in your environment:
export OS_AUTH_TYPE=gnocchi-basic
export GNOCCHI_USER=<youruserid>
export GNOCCHI_ENDPOINT=http://urlofgnocchi
Note
OS_AUTH_TYPE is used globally by all clients supporting Keystone.
Provide --os-auth-plugin
gnocchi-basic to the client
instead if other clients are used in session.
OpenStack Keystone authentication
If you're using Gnocchi with Keystone authentication, export the following variables in your environment with the appropriate values:
export OS_AUTH_TYPE=password
export OS_USERNAME=user
export OS_PASSWORD=pass
export OS_TENANT_NAME=myproject
export OS_AUTH_URL=http://auth.example.com:5000/v2.0
The command line tool will attempt to reauthenticate using your
provided credentials for every request. You can override this behavior
by manually supplying an auth token using --endpoint
and --os-auth-token
. You can alternatively set these
environment variables:
export GNOCCHI_ENDPOINT=http://gnocchi.example.org:8041
export OS_AUTH_PLUGIN=token
export OS_AUTH_TOKEN=3bcc3d3a03f44e3d8377f9247b0ad155
For more details, check the keystoneauth documentation.