Skip to main content

Monasca API Client Library

Project description

https://governance.openstack.org/tc/badges/python-monascaclient.svg

Python bindings to the Monasca API

This is a client library for Monasca built to interface with the Monasca API. It provides a Python API (the monascaclient module) and a command-line tool (monasca).

The Monasca Client was written using the OpenStack Heat Python client as a framework.

Ubuntu Install

Requires:

pip - version >= 1.4.  python get-pip.py
See versions on PYPI:

https://pypi-hypernode.com/project/python-monascaclient/

Install It:

sudo pip install python-monascaclient

Alternative Manual Install Steps:

cd <path to your python-monascaclient repo>

sudo pip install -r requirements.txt

python setup.py install

Building and Packaging

Install the tool dependencies:

sudo apt-get install python-pip python-virtualenv

In the python-monascaclient source directory:

virtualenv --no-site-packages .venv

source ./.venv/bin/activate

pip install wheel

python setup.py bdist_wheel

pip install $(ls -1rt dist/*.whl | tail -1) --upgrade

Command-line API

Installing this distribution gets you a shell command, monasca, that you can use to interact with the Monitoring API server.

Usage:

monasca

monasca help

monasca help <command>

  This outputs the results in json format.  Normally output is in table format.

The monascaclient CLI needs the Monasca API endpoint url and the OS_AUTH_TOKEN to pass to the Monasca API RESTful interface. This is provided through environment or CLI parameters.

Environmental Variables

Environmental variables can be sourced, or optionally passed in as CLI arguments. It is easiest to source them first and then use the CLI.

When token and endpoint are known:

export OS_AUTH_TOKEN=XXX
export MONASCA_API_URL=http://192.168.10.4:8070/v2.0/

When using Keystone to obtain the token and endpoint:

export OS_USERNAME=
export OS_PASSWORD=
export OS_USER_DOMAIN_NAME=
export OS_PROJECT_NAME=
export OS_AUTH_URL=
export OS_REGION_NAME=
# Optional(specific version added to OS_AUTH_URL if (v2.0 or v3) not present already)
export OS_AUTH_VERSION=

When OS_USER_DOMAIN_NAME is not set, then ‘Default’ is assumed. Alternatively IDs can be used instead of names. Although deprecated, but OS_TENANT_NAME and OS_TENANT_ID can be used for OS_PROEJCT_NAME and OS_PROJECT_ID respectively.

When using Vagrant Environment with middleware disabled:

export OS_AUTH_TOKEN=82510970543135
export OS_NO_CLIENT_AUTH=1
export MONASCA_API_URL=http://192.168.10.4:8070/v2.0/

The Monasca API will treat the auth token as the tenant ID when Keystone is not enabled.

License

(C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP Copyright 2017 Fujitsu LIMITED

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-monascaclient-1.12.0.tar.gz (47.2 kB view details)

Uploaded Source

Built Distribution

python_monascaclient-1.12.0-py2.py3-none-any.whl (37.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file python-monascaclient-1.12.0.tar.gz.

File metadata

File hashes

Hashes for python-monascaclient-1.12.0.tar.gz
Algorithm Hash digest
SHA256 59b4d2ce89fa0f126e97c92462984631d75b7cf020932c6caea3b233c607f3b4
MD5 63266317491dab523a60392d6f6a6e95
BLAKE2b-256 7fe0d801272cfd814f03c4b17ba0875ed0ecb5f93e245072fdc30f457c9c0fb1

See more details on using hashes here.

Provenance

File details

Details for the file python_monascaclient-1.12.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for python_monascaclient-1.12.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a53aa4e83d81a3482f23d972ce80a6c8b8c5b2f43ea480e87673e050e58424a1
MD5 2069682cc82d314078b7591932f5abe4
BLAKE2b-256 4d6ed76a1dd8c15fbf8080c98a519819924640f7d97f5b6285066a0504693447

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page