Monasca REST API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zuul 3ee8332e44 Merge "Fix python3 compatibility issue" 6 days ago
api-ref Bump the openstackdocstheme extension to 1.20 3 months ago
common Restore user condition but with zuul 2 years ago
config-generator Add keystonemiddleware to oslo-config-generator conf 9 months ago
contrib Remove bundled intree monasca-api tempest plugin 1 year ago
devstack Fix python3 compatibility issue 1 week ago
doc Merge "Add Reviews Prioritisation section" 1 month ago
docker Support cassandra connection timeout option 2 months ago
docs Merge "Merge log-api and api" 1 month ago
etc Enable uWSGI support in devstack 1 year ago
java [Trivial Fix] change the unicode of some higher numbered characters 1 year ago
monasca_api Merge "Fix for editing an Alarm Definition" 6 days ago
perf Add read performance testing to monasca-api 1 year ago
playbooks Fix docker hub login variable 9 months ago
releasenotes Update master for stable/train 1 month ago
tools Avoid for constraints support 1 year ago
.coveragerc Migrate test run to ostestr 2 years ago
.gitignore Merge log-api and api 1 month ago
.gitreview OpenDev Migration Patch 7 months ago
.stestr.conf Add .stestr.conf . 2 years ago
.testr.conf Migrate test run to ostestr 2 years ago
.zuul.yaml Merge "Support time range to query dimension names/values" 1 month ago
LICENSE Added license file 5 years ago
README.rst README.rst: make it us-ascii 8 months ago
babel.cfg initial python implementation 5 years ago
bindep.txt Add libssl to fix pep8 2 years ago
lower-constraints.txt Merge log-api and api 1 month ago
pom.xml Update links in pom.xml 1 year ago
requirements.txt Merge log-api and api 1 month ago Ensure the same branch is used for common build 3 years ago
setup.cfg Exclude influxdb 5.2.3 for python 2 months ago Updated from global requirements 2 years ago
test-requirements.txt Blacklist sphinx 2.1.0 (autodoc bug) 1 month ago
tox.ini Update the constraints url 1 month ago


Team and repository tags



monasca-api is a RESTful API server that is designed with a layered architecture.


The full API Specification can be found in docs/

Python Monasca API Implementation

To install the python api implementation, git clone the source and run the following command:

$ sudo python install

If it installs successfully, you will need to make changes to the following two files to reflect your system settings, especially where kafka server is located:


Once the configuration files are modified to match your environment, you can start up the server by following the following instructions.

To start the server, run the following command:

Running the server in foreground mode
$ gunicorn -k eventlet --worker-connections=2000 --backlog=1000 --paste /etc/monasca/api-config.ini

Running the server as daemons
$ gunicorn -k eventlet --worker-connections=2000 --backlog=1000 --paste /etc/monasca/api-config.ini -D

To check if the code follows python coding style, run the following command from the root directory of this project

$ tox -e pep8

To run all the unit test cases, run the following command from the root directory of this project

$ tox -e py27

Start the Server - for Apache

To start the server using Apache: create a modwsgi file, create a modwsgi configuration file, and enable the wsgi module in Apache.

The modwsgi configuration file may look something like this, and the site will need to be enabled:

The wsgi file may look something like this:

Java Implementation

Details on usage can be found here

WARNING: The Java implementation of Monasca API is DEPRECATED and will be removed in future release.


Copyright (c) 2014 Hewlett-Packard Development Company, L.P.

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

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.