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 a88d34ac5c Merge "Remove redundant `install_nodejs` function" 2 days ago
api-ref Switch to newer openstackdocstheme and reno versions 1 week ago
common Restore user condition but with zuul 2 years ago
config-generator Add keystonemiddleware to oslo-config-generator conf 1 year ago
contrib Remove bundled intree monasca-api tempest plugin 2 years ago
devstack Merge "Remove redundant `install_nodejs` function" 2 days ago
doc Merge "Move DB migrations documentation to its own file" 1 week ago
docker Update hacking for Python3 1 month ago
docs Allow users to set periodic notifications on all notification types 4 months ago
etc Update devstack plugin to support new api 6 months ago
java [Trivial Fix] change the unicode of some higher numbered characters 1 year ago
monasca_api Merge "Use unittest.mock instead of third party mock" 1 month ago
perf Add read performance testing to monasca-api 2 years ago
playbooks Fix docker hub login variable 1 year ago
releasenotes Switch to newer openstackdocstheme and reno versions 1 week ago
tools Avoid for constraints support 2 years ago
.coveragerc Migrate test run to ostestr 3 years ago
.gitignore Merge log-api and api 8 months ago
.gitreview OpenDev Migration Patch 1 year ago
.stestr.conf Add .stestr.conf . 2 years ago
.zuul.yaml Fix incorrect old log-api tempest test configuration 2 weeks ago
CONTRIBUTING.rst Update Monasca contribution documentation 2 weeks ago
LICENSE Added license file 6 years ago
README.rst [ussuri][goal] Drop python 2.7 support and testing 5 months ago
babel.cfg initial python implementation 5 years ago
bindep.txt Add libssl to fix pep8 3 years ago
lower-constraints.txt Switch to newer openstackdocstheme and reno versions 1 week ago
pom.xml Update links in pom.xml 2 years ago
requirements.txt Migrate from ujson to simplejson 1 month ago Ensure the same branch is used for common build 4 years ago
setup.cfg Add py38 package metadata 1 month ago Cleanup py27 support 1 month ago
test-requirements.txt Switch to newer openstackdocstheme and reno versions 1 week ago
tox.ini Fix and unify cover environment 6 days 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 py36

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.