Skip to main content

OpenStack Monitoring as a Service

Project description

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 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:

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.

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-3.0.1.tar.gz (492.6 kB view details)

Uploaded Source

Built Distribution

monasca_api-3.0.1-py2.py3-none-any.whl (202.6 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: monasca-api-3.0.1.tar.gz
  • Upload date:
  • Size: 492.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

File hashes

Hashes for monasca-api-3.0.1.tar.gz
Algorithm Hash digest
SHA256 f94f9deaa544b58950a9325c8b6d00da632198e16f6a1f560967e994c72c09dc
MD5 004f92b0d03c8c8407920e478700a558
BLAKE2b-256 d7938f3af4aa432cc2a9cc26f47a1c12691a90b0a67387a6d73d5945f1510d8f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: monasca_api-3.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 202.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8

File hashes

Hashes for monasca_api-3.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b0dc064bfbfe4c8ea72a182374ab435a8af0faa47449f4d1e3f71b9a63755e54
MD5 d8a29cffc7f64e71a49b0de73eca6019
BLAKE2b-256 d1c0cea221253569828ed8c0a5435275a0f3fddf428858a8f4a59e7a75e0f2ff

See more details on using hashes here.

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