Skip to main content

OpenStack Monitoring as a Service

Project description

Team and repository tags
========================

[![Team and repository tags](https://governance.openstack.org/tc/badges/monasca-api.svg)](https://governance.openstack.org/tc/reference/tags/index.html)

<!-- Change things from this point on -->

# Overview

`monasca-api` is a RESTful API server that is designed with a [layered architecture](https://en.wikipedia.org/wiki/Multilayered_architecture).


## Documentation

The full API Specification can be found in [docs/monasca-api-spec.md](docs/monasca-api-spec.md)


### Python Monasca API Implementation


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

$ sudo python setup.py 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::

/etc/monasca/api-config.ini
/etc/monasca/api-config.conf
/etc/monasca/api-logging.conf

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:

```apache
Listen 8070

<VirtualHost *:8070>

WSGIDaemonProcess monasca-api processes=4 threads=1 socket-timeout=120 user=mon-api group=monasca python-path=/usr/local/lib/python2.7/site-packages
WSGIProcessGroup monasca-api
WSGIApplicationGroup monasca-api
WSGIScriptAlias / /usr/local/lib/python2.7/site-packages/monasca_api/api/wsgi/monasca_api.py

WSGIPassAuthorization On

LogLevel info
ErrorLog /var/log/monasca-api/wsgi.log
CustomLog /var/log/monasca-api/wsgi-access.log combined

<Directory /usr/local/lib/python2.7/site-packages/monasca_api>
Require all granted
</Directory>

SetEnv no-gzip 1

</VirtualHost>

```

The wsgi file may look something like this:

```py

from monasca_api.api import server

application = server.get_wsgi_app(config_base_path='/etc/monasca')

```
### Java Implementation

Details on usage can be found [here](/docs/java.md)

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

# License

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

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

monasca-api-2.6.0.tar.gz (348.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monasca_api-2.6.0-py2.py3-none-any.whl (157.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file monasca-api-2.6.0.tar.gz.

File metadata

  • Download URL: monasca-api-2.6.0.tar.gz
  • Upload date:
  • Size: 348.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for monasca-api-2.6.0.tar.gz
Algorithm Hash digest
SHA256 a1525776adf6f5c587624c6ae7faf395439366e8af5b03e66d8b94fc1a7fe851
MD5 8b468388763b3e880aa22bcadbdc1546
BLAKE2b-256 7ef5509299ac86e1ba53831556df037fed69cbea02b60fedd73d360fe21ef3c5

See more details on using hashes here.

File details

Details for the file monasca_api-2.6.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for monasca_api-2.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1ab2f01ba5c3f8fbf6383dae08591d2df812b55cbf33c74f20f2828c9a667cfc
MD5 e68876b91203b472547424826bec7908
BLAKE2b-256 776ccf8350c3545b12ea645143a5b9e0b2d36edc167cc3b6174457231b98bf39

See more details on using hashes here.

Supported by

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