Skip to main content

Team and repository tags

https://governance.openstack.org/tc/badges/monasca-api.svg

Overview

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

Documentation

The full API Specification can be found in 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/monasca-api.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 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:

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:

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

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.

Metadata

Release files for monasca-api 11.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for monasca-api 11.0.0
File Size Uploaded Provenance
monasca-api-11.0.0.tar.gz 548.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for monasca-api 11.0.0
File Interpreter ABI Platform
monasca_api-11.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 794.6 kB

Release files / monasca-api-11.0.0.tar.gz

Download URL monasca-api-11.0.0.tar.gz
Size 548.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e5071f7392aa9fad6d4f5dd9add5b0e09cb663a63532e1effa783107d29690f3
BLAKE2b-256 checksum
How to use checksums
aa72ae07741bae1cb49e7b317129c23dc82a9cd5fc3e9b88cde58643639db686
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / monasca_api-11.0.0-py3-none-any.whl

Download URL monasca_api-11.0.0-py3-none-any.whl
Size 246.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f9bd1ced28ad7cfba02d993bf9575fda3c7ae07393469da396264e8be0231d4
BLAKE2b-256 checksum
How to use checksums
b0307d0be3418f0b855834710d155e6b1122c15f0a4bce107cf56094f23fd63a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for monasca-api 11.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

11.0.0 This release

2 release files No provenance

0.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page