diff --git a/.coveragerc b/.coveragerc
deleted file mode 100644
index 595e00616..000000000
--- a/.coveragerc
+++ /dev/null
@@ -1,8 +0,0 @@
-[run]
-branch = True
-source = monasca_api
-omit = monasca_api/tests/*
-
-[report]
-ignore_errors = True
-
diff --git a/.stestr.conf b/.stestr.conf
deleted file mode 100644
index 7df73acb2..000000000
--- a/.stestr.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-test_path=$OS_TEST_PATH
-top_dir=./
-group_regex=monasca_api\.tests(?:\.|_)([^_]+)
diff --git a/.zuul.yaml b/.zuul.yaml
deleted file mode 100644
index 701ab2c96..000000000
--- a/.zuul.yaml
+++ /dev/null
@@ -1,262 +0,0 @@
-- job:
- name: monasca-tempest-base
- parent: devstack-tempest
- description: |
- Base job for running tempest tests with monasca-api devstack plugin.
- timeout: 7800
- required-projects:
- - openstack/monasca-agent
- - openstack/monasca-api
- - openstack/monasca-common
- - openstack/monasca-grafana-datasource
- - openstack/monasca-notification
- - openstack/monasca-persister
- - openstack/monasca-statsd
- - openstack/monasca-thresh
- - openstack/monasca-ui
- - openstack/python-monascaclient
- - openstack/tempest
- - openstack/monasca-tempest-plugin
- vars:
- devstack_services:
- # Disable unneeded services.
- etcd3: false
- g-api: false
- g-reg: false
- n-api: false
- n-api-meta: false
- n-cauth: false
- n-cond: false
- n-cpu: false
- n-novnc: false
- n-obj: false
- n-sch: false
- placement-api: false
- s-account: false
- s-container: false
- s-object: false
- s-proxy: false
- c-api: false
- c-bak: false
- c-sch: false
- c-vol: false
- cinder: false
- horizon: false
- monasca-log: false
- tox_envlist: all
- devstack_localrc:
- USE_PYTHON3: true
- tempest_test_regex: monasca_tempest_tests.tests.api
- devstack_plugins:
- monasca-api: https://opendev.org/openstack/monasca-api
- zuul_copy_output:
- /var/log/kafka: logs
- /var/log/storm: logs
- /var/log/zookeeper: logs
- /var/log/monasca/notification: logs
- /etc/kafka/server.properties: logs
- /etc/kafka/producer.properties: logs
- /etc/kafka/consumer.properties: logs
- /etc/monasca/monasca-notification.conf: logs
- irrelevant-files:
- - ^.*\.rst$
- - ^.*\.md$
- - ^doc/.*$
- - ^releasenotes/.*$
-
-- job:
- name: monasca-tempest-log-base
- parent: devstack-tempest
- description: |
- Base job for running tempest tests with monasca-log-api devstack plugin.
- timeout: 7800
- required-projects:
- - openstack/monasca-api
- - openstack/monasca-common
- - openstack/python-monascaclient
- - openstack/tempest
- - openstack/monasca-tempest-plugin
- - openstack/monasca-kibana-plugin
- vars:
- devstack_services:
- monasca-log: true
- monasca-log-api: true
- # Disable unneeded services.
- monasca-agent: false
- monasca-notification: false
- monasca-persister: false
- monasca-thresh: false
- monasca-storm: false
- etcd3: false
- g-api: false
- g-reg: false
- n-api: false
- n-api-meta: false
- n-cauth: false
- n-cond: false
- n-cpu: false
- n-novnc: false
- n-obj: false
- n-sch: false
- placement-api: false
- s-account: false
- s-container: false
- s-object: false
- s-proxy: false
- c-api: false
- c-bak: false
- c-sch: false
- c-vol: false
- cinder: false
- horizon: false
- tox_envlist: all
- devstack_localrc:
- USE_PYTHON3: true
- tempest_test_regex: monasca_tempest_tests.tests.log_api
- devstack_plugins:
- monasca-api: https://opendev.org/openstack/monasca-api
- zuul_copy_output:
- /var/log/kafka: logs
- /var/log/monasca/notification: logs
- /etc/kafka/server.properties: logs
- /etc/kafka/producer.properties: logs
- /etc/kafka/consumer.properties: logs
- /etc/monasca/monasca-notification.conf: logs
- irrelevant-files:
- - ^.*\.rst$
- - ^.*\.md$
- - ^doc/.*$
- - ^releasenotes/.*$
-
-- job:
- name: monasca-tempest-python3-influxdb
- parent: monasca-tempest-base
- vars:
- devstack_localrc:
- MONASCA_API_IMPLEMENTATION_LANG: python
- MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
- MONASCA_METRICS_DB: influxdb
- TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
-
-- job:
- name: monasca-tempest-java-influxdb
- parent: monasca-tempest-base
- voting: false
- vars:
- devstack_localrc:
- MONASCA_API_IMPLEMENTATION_LANG: python
- MONASCA_PERSISTER_IMPLEMENTATION_LANG: java
- MONASCA_METRICS_DB: influxdb
- TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
-
-- job:
- name: monasca-tempest-python3-cassandra
- parent: monasca-tempest-base
- voting: false
- vars:
- devstack_localrc:
- MONASCA_API_IMPLEMENTATION_LANG: python
- MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
- MONASCA_METRICS_DB: cassandra
- TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
- tempest_test_regex: (?!.*\[.*\btimerange\b.*\])(^monasca_tempest_tests.tests.api)
-
-- job:
- name: monasca-tempest-python3-java-cassandra
- parent: monasca-tempest-base
- voting: false
- vars:
- devstack_localrc:
- MONASCA_API_IMPLEMENTATION_LANG: python
- MONASCA_PERSISTER_IMPLEMENTATION_LANG: java
- MONASCA_METRICS_DB: cassandra
- TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
- tempest_test_regex: (?!.*\[.*\btimerange\b.*\])(^monasca_tempest_tests.tests.api)
-
-- job:
- name: monasca-tempest-log-python3-influxdb
- parent: monasca-tempest-log-base
- voting: false
- vars:
- devstack_localrc:
- USE_OLD_LOG_API: false
- MONASCA_API_IMPLEMENTATION_LANG: python
- MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
- MONASCA_METRICS_DB: influxdb
- TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
-
-- job:
- name: monasca-tempest-log-oldapi-python3-influxdb
- parent: monasca-tempest-log-base
- vars:
- devstack_localrc:
- USE_OLD_LOG_API: true
- MONASCA_API_IMPLEMENTATION_LANG: python
- MONASCA_PERSISTER_IMPLEMENTATION_LANG: python
- MONASCA_METRICS_DB: influxdb
- TEMPEST_PLUGINS: /opt/stack/monasca-tempest-plugin
-
-- project:
- queue: monasca
- templates:
- - check-requirements
- - openstack-cover-jobs
- - openstack-python3-jobs
- - publish-openstack-docs-pti
- - release-notes-jobs-python3
- check:
- jobs:
- - monasca-tempest-log-python3-influxdb
- - monasca-tempest-python3-influxdb
- - build-monasca-docker-image
- gate:
- jobs:
- - monasca-tempest-python3-influxdb
- - monasca-tempest-log-python3-influxdb
- post:
- jobs:
- - publish-monasca-api-docker-image
- periodic:
- jobs:
- - publish-monasca-api-docker-image
- release:
- jobs:
- - publish-monasca-api-docker-image
-
-- job:
- name: publish-monasca-api-docker-image
- parent: build-monasca-docker-image
- post-run: playbooks/docker-publish.yml
- required-projects:
- - openstack/monasca-common
- vars:
- publisher: true
- secrets:
- - doker_hub_login_api
-
-- secret:
- name: doker_hub_login_api
- data:
- user: !encrypted/pkcs1-oaep
- - JQCFFaHjbMstCHOxW9JxepuFbsdOKhs/swCkfbzgqiNDyL91e2AF6tazGf8EtMxX6brP4
- vCGWFEkMUGxBxVbpwRMUf4mSCOzs2+3/4S1NVr5+ppQEgYVDON4S5BbC2jnwawuB4DKLa
- tDYkmgTMIPqxK29giQN/W/wbo0uIAObpRJuCyHY/eNxfC4fzajpGisyu2D3b606Cw15uA
- KRw5GexwxN/D0pPvAgT/lwlVrm8Lz9NUziQANL+55gjo9Xs0OIu+OXwiUhZE45TmfpBLF
- VO9oOWT+Fhpv2LTA8M1m5vrDo5H03qbn/MNZaiqcPYnPJtnd4pQ0o7DewUk6OBZcPnnVB
- RGJm3aO0cs19s0LEwbXxe9URzWeilp/IQdRY42FySmz/OcBqicie0FEr+W0vkq+6lvkmZ
- Z9UTw7WDaF0kauhS/yy8wgcbdARmKemBQWWJLZg+2HuVLFqMLlo6bMMagtIN1x/bPj+SX
- 4VuPfqCJoynvroQTqY+QuDBJy9Q6IoRGlWUGyIW3kOskRZRsYpaAKZExgNkmkumJ7jJr9
- vI9DOTYxQMBlRptEAExy5OOkIypmpYqoPEF9PnutjIGEHN4gy+ZPHMwD7ht3aG+riDhHl
- P1BUBH4cRVOpkHcsqP46hw1uty3QEZMjlk2j8831bfr+opagsaGTqK1CVMM6zg=
-
- password: !encrypted/pkcs1-oaep
- - r5q4gVugtWsad/4/BeTmu6PFdlHkxe+q8R3TOnsitUrnnpQH4y0jq4edIgzQtfQUyk+bV
- 9Z4mr7UkI/Yd2Ia1IgzgyjSNLxABtm1JevzLD0XeQTtr/uurTXTMoQJqcveAWWfumrlVx
- sIxlr9uujByrmS1OLhFc3S0TBcpwk5hg786RNC6MJVnrQJwKy8MVZaGvh95OoGXuEGkIg
- z06afI+QGcJExV1n+zp1aCX1SKIOZlEG0Y70HJYUSfBjtXTCmpybsHk7exqL2Krwb/Oyo
- fsWuQbjbN1kdBh7tVg/w0KR2jSvNnh9tLDX97b3qB0iN14cqD45kApF/LclDUy4xryj6+
- ij6YbvBQLWDiMMy47FhVCZQ5sfM6MYvaDA3DpJe7DZXOQFxZp9KGB50zAlVm+PssCNY/g
- kBqBJA0qd0Nwixkku8trokwShUzVFAaWfPr9zj0/lAk5jFDz42NK5pfM0o0M84Duof+7u
- wxp5H4wnwPXauDbC+LhI12s3J0teDnaXNwCTTPd+NWi1w50N0JH8nDVkz+g3cZA7mAW83
- cvrC3If9SyQZi/9GNphNzVPfG6llOeAkNno5f4CXoGxuoMgw17Px7HnCO50XPYLUfORzo
- eLG2QHqbHIiMgIpy30YvVKRsvjLvKId6I2s51oj918U96mt/jef6Ct0Q5jybTs=
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
deleted file mode 100644
index 702d0ea6b..000000000
--- a/CONTRIBUTING.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-The source repository for this project can be found at:
-
- https://opendev.org/openstack/monasca-api.git
-
-Pull requests submitted through GitHub are not monitored.
-
-To start contributing to OpenStack, follow the steps in the contribution guide
-to set up and use Gerrit:
-
- https://docs.openstack.org/contributors/code-and-documentation/quick-start.html
-
-Bugs should be filed on Storyboard:
-
-https://storyboard.openstack.org/#!/project/863
-
-For more specific information about contributing to this repository, see the
-Monasca contributor guide:
-
- https://docs.openstack.org/monasca-api/latest/contributor/contributing.html
diff --git a/README.rst b/README.rst
index 338fc0946..650e3f61e 100644
--- a/README.rst
+++ b/README.rst
@@ -1,139 +1,9 @@
-Team and repository tags
-========================
+This project is no longer maintained.
-.. image:: https://governance.openstack.org/tc/badges/monasca-api.svg
- :target: https://governance.openstack.org/tc/reference/tags/index.html
+The contents of this repository are still available in the Git
+source code management system. To see the contents of this
+repository before it reached its end of life, please check out the
+previous commit with "git checkout HEAD^1".
-.. Change things from this point on
-
-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:
-
-.. code:: apache
-
- Listen 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
-
-
- Require all granted
-
-
- SetEnv no-gzip 1
-
-
-
-The wsgi file may look something like this:
-
-.. code:: 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`_
-
-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.
-
-.. _layered architecture: https://en.wikipedia.org/wiki/Multilayered_architecture
-.. _docs/monasca-api-spec.md: docs/monasca-api-spec.md
-.. _here: /docs/java.md
+For any further questions, please email openstack-discuss@lists.openstack.org
+or join #openstack-dev on OFTC.
\ No newline at end of file
diff --git a/api-ref/locale/.gitkeep b/api-ref/locale/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py
deleted file mode 100644
index 89db10cf1..000000000
--- a/api-ref/source/conf.py
+++ /dev/null
@@ -1,196 +0,0 @@
-# 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.
-#
-# Key Manager API documentation build configuration file
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-# -- General configuration ------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-needs_sphinx = '1.6'
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = [
- 'os_api_ref',
- 'openstackdocstheme'
-]
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-source_encoding = 'utf-8'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General details about project
-openstackdocs_repo_name = u'openstack/monasca-api'
-openstackdocs_use_storyboard = True
-copyright = u'2014-present, OpenStack Foundation'
-author = u'OpenStack Foundation'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-# language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-# today = ''
-# Else, today_fmt is used as the format for a strftime call.
-# today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = []
-
-# The reST default role (used for this markup: `text`) to use for all
-# documents.
-# default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-# add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-# add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-# show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'native'
-
-# A list of ignored prefixes for module index sorting.
-# modindex_common_prefix = []
-
-# If true, keep warnings as "system message" paragraphs in the built documents.
-# keep_warnings = False
-
-
-# -- Options for HTML output ----------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-html_theme = 'openstackdocs'
-
-# To use the API Reference sidebar dropdown menu,
-# uncomment the html_theme_options parameter. The theme
-# variable, sidebar_dropdown, should be set to `api_ref`.
-# Otherwise, the list of links for the User and Ops docs
-# appear in the sidebar dropdown menu.
-html_theme_options = {"sidebar_dropdown": "api_ref",
- "sidebar_mode": "toc"}
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-html_short_title = 'API Ref'
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-# html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-# html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-# html_static_path = []
-
-# Add any extra paths that contain custom files (such as robots.txt or
-# .htaccess) here, relative to this directory. These files are copied
-# directly to the root of the documentation.
-# html_extra_path = []
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-# html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-# html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-# html_additional_pages = {}
-
-# If false, no module index is generated.
-# html_domain_indices = True
-
-# If false, no index is generated.
-html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-# html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-# html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-# html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-# html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-# html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-# html_file_suffix = None
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'MonitoringApiRefDoc'
-
-# -- Options for LaTeX output ---------------------------------------------
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-# author, documentclass [howto, manual, or own class]).
-latex_documents = [
- (master_doc, 'MonitoringApiRef.tex', u'Monitoring Service API Reference',
- [author], 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-# latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-# latex_use_parts = False
-
-# If true, show page references after internal links.
-# latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-# latex_show_urls = False
-
-# Documents to append as an appendix to all manuals.
-# latex_appendices = []
-
-# If false, no module index is generated.
-# latex_domain_indices = True
-
-# -- Options for Internationalization output ------------------------------
-locale_dirs = ['locale/']
diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst
deleted file mode 100644
index bb7ae082b..000000000
--- a/api-ref/source/index.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-:tocdepth: 2
-
-..
- Copyright 2017 Fujitsu LIMITED
-
- 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.
-
-=======================
-Monitoring Service APIs
-=======================
-
-.. rest_expand_all::
diff --git a/babel.cfg b/babel.cfg
deleted file mode 100644
index 15cd6cb76..000000000
--- a/babel.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-[python: **.py]
-
diff --git a/bindep.txt b/bindep.txt
deleted file mode 100644
index 2d95ccc5d..000000000
--- a/bindep.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-# This is a cross-platform list tracking distribution packages needed for install and tests;
-# see http://docs.openstack.org/infra/bindep/ for additional information.
-
-maven
-openjdk-8-jdk
-libssl-dev [platform:dpkg]
diff --git a/common/build_common.sh b/common/build_common.sh
deleted file mode 100755
index 03d3a88e6..000000000
--- a/common/build_common.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-set -x
-ME=`whoami`
-echo "Running as user: $ME"
-MVN=$1
-VERSION=$2
-BRANCH=$3
-
-check_user() {
- ME=$1
- if [ "${ME}" != "zuul" ]; then
- echo "\nERROR: Download monasca-common and do a mvn install to install the monasca-commom jars\n" 1>&2
- exit 1
- fi
-}
-
-BUILD_COMMON=false
-POM_FILE=~/.m2/repository/monasca-common/monasca-common/${VERSION}/monasca-common-${VERSION}.pom
-if [ ! -r "${POM_FILE}" ]; then
- check_user "${ME}"
- BUILD_COMMON=true
-fi
-
-# This should only be done on the stack forge system
-if [ "${BUILD_COMMON}" = "true" ]; then
- git clone -b ${BRANCH} https://git.openstack.org/openstack/monasca-common --depth 1
- cd monasca-common
- ${MVN} clean
- ${MVN} install
-fi
diff --git a/config-generator/README.rst b/config-generator/README.rst
deleted file mode 100644
index 916496812..000000000
--- a/config-generator/README.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-================
-config-generator
-================
-
-To generate sample configuration file execute::
-
- tox -e genconfig
-
-To generate the sample policies execute::
-
- tox -e genpolicy
-
-After generation you will have sample available in
-``etc/api-policy.yaml.sample``. It contains default values for all policies.
-After you change it to suit your needs you will need to change monasca-api
-configuration to look for the new policy configuration with specific file name.
-Head to ``monasca-api.conf`` file and then you will need to replace
-in ``[oslo_policy]`` section ``policy_file`` to your desired file name
-(like ``api-policy.yaml``).
diff --git a/config-generator/__init__.py b/config-generator/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/config-generator/monasca-api.conf b/config-generator/monasca-api.conf
deleted file mode 100644
index cf185de94..000000000
--- a/config-generator/monasca-api.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-[DEFAULT]
-output_file = etc/monasca-api.conf.sample
-wrap_width = 79
-format = ini
-summarize = True
-namespace = monasca_api
-namespace = oslo.log
-namespace = oslo.db
-namespace = oslo.policy
-namespace = keystonemiddleware.auth_token
diff --git a/config-generator/policy.conf b/config-generator/policy.conf
deleted file mode 100644
index 699cb3d0f..000000000
--- a/config-generator/policy.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-output_file = etc/api-policy.yaml.sample
-format = yaml
-namespace = monasca_api
diff --git a/contrib/post_test_hook.sh b/contrib/post_test_hook.sh
deleted file mode 100755
index 106b8f0dd..000000000
--- a/contrib/post_test_hook.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
-# (C) Copyright 2017 FUJITSU LIMITED
-#
-# 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.
-#
-
-sleep 6
-
-function load_devstack_utilities {
- source $BASE/new/devstack/stackrc
- source $BASE/new/devstack/functions
- source $BASE/new/devstack/openrc admin admin
-}
-
-function setup_monasca_api {
-
- local constraints="-c /opt/stack/new/requirements/upper-constraints.txt"
-
- pushd $TEMPEST_DIR
- sudo -EH pip install $constraints -r requirements.txt -r test-requirements.txt
- popd;
-
- pushd $MONASCA_API_DIR
- sudo -EH pip install $constraints -r requirements.txt -r test-requirements.txt
- sudo -EH python setup.py install
- popd;
-}
-
-function set_tempest_conf {
-
- local conf_file=$TEMPEST_DIR/etc/tempest.conf
- pushd $TEMPEST_DIR
- oslo-config-generator \
- --config-file tempest/cmd/config-generator.tempest.conf \
- --output-file $conf_file
- popd
-
- cp -f $DEST/tempest/etc/logging.conf.sample $DEST/tempest/etc/logging.conf
-
- # set identity section
- iniset $conf_file identity admin_domain_scope True
- iniset $conf_file identity user_unique_last_password_count 2
- iniset $conf_file identity user_locakout_duration 5
- iniset $conf_file identity user_lockout_failure_attempts 2
- iniset $conf_file identity uri $OS_AUTH_URL/v2.0
- iniset $conf_file identity uri_v3 $OS_AUTH_URL/v3
- iniset $conf_file identity auth_version v$OS_IDENTITY_API_VERSION
- # set auth section
- iniset $conf_file auth use_dynamic_credentials True
- iniset $conf_file auth admin_username $OS_USERNAME
- iniset $conf_file auth admin_password $OS_PASSWORD
- iniset $conf_file auth admin_domain_name $OS_PROJECT_DOMAIN_ID
- iniset $conf_file auth admin_project_name $OS_PROJECT_NAME
-
-}
-
-function function_exists {
- declare -f -F $1 > /dev/null
-}
-
-if ! function_exists echo_summary; then
- function echo_summary {
- echo $@
- }
-fi
-
-XTRACE=$(set +o | grep xtrace)
-set -o xtrace
-
-echo_summary "monasca's post_test_hook.sh was called..."
-(set -o posix; set)
-
-# save ref to monasca-api dir
-export MONASCA_API_DIR="$BASE/new/monasca-api"
-export TEMPEST_DIR="$BASE/new/tempest"
-
-sudo chown -R $USER:stack $MONASCA_API_DIR
-sudo chown -R $USER:stack $TEMPEST_DIR
-
-load_devstack_utilities
-setup_monasca_api
-set_tempest_conf
\ No newline at end of file
diff --git a/devstack/README.md b/devstack/README.md
deleted file mode 100644
index e956a6d72..000000000
--- a/devstack/README.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# Monasca DevStack Plugin
-
-The Monasca DevStack plugin currently only works on Ubuntu 18.04 (Bionic).
-More Linux Distributions will be supported in the future.
-
-Running the Monasca DevStack plugin requires a machine with 10GB of RAM.
-
-Directions for installing and running Devstack can be found here:
-
- https://docs.openstack.org/devstack/latest/
-
-To run Monasca in DevStack, do the following three steps.
-
-1. Clone the DevStack repo.
-
-```
-git clone https://opendev.org/openstack/devstack
-```
-
-2. Add the following to the DevStack local.conf file in the root of the devstack directory. You may
- need to create the local.conf if it does not already exist.
-
-```
-# BEGIN DEVSTACK LOCAL.CONF CONTENTS
-
-[[local|localrc]]
-DATABASE_PASSWORD=secretdatabase
-RABBIT_PASSWORD=secretrabbit
-ADMIN_PASSWORD=secretadmin
-SERVICE_PASSWORD=secretservice
-
-LOGFILE=$DEST/logs/stack.sh.log
-LOGDIR=$DEST/logs
-LOG_COLOR=False
-
-# The following variable allow switching between Java and Python for
-# the implementations of the Monasca Persister. If this variable is not set,
-# then the default is to install the Python implementation of
-# the Monasca Persister.
-
-# Uncomment of the following two lines to choose Java or Python for
-# the Monasca Pesister.
-# MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-java}
-MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-python}
-
-# Uncomment one of the following two lines to choose either InfluxDB or
-# Apache Cassandra.
-# default "influxdb" is selected as metric DB.
-MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-influxdb}
-# MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-cassandra}
-
-# This line will enable all of Monasca.
-enable_plugin monasca-api https://opendev.org/openstack/monasca-api
-
-# END DEVSTACK LOCAL.CONF CONTENTS
-```
-
-3. Run './stack.sh' from the root of the devstack directory.
-
-If you want to run Monasca with the bare mininum of OpenStack components
-you can add the following two lines to the local.conf file.
-
-```
-disable_all_services
-enable_service rabbit mysql key
-```
-
-If you also want the Tempest tests to be installed then add `tempest` and
- `monasca-tempest-plugin`.
-
-```
-enable_service rabbit mysql key tempest
-enable_plugin monasca-tempest-plugin https://opendev.org/openstack/monasca-tempest-plugin
-```
-
-To enable Horizon and the Monasca UI add `horizon`
-
-```
-enable_service rabbit mysql key horizon tempest
-```
-
-# Using Vagrant
-
-Vagrant can be used to deploy a VM with Devstack and Monasca running in it using the Vagrantfile. After installing Vagrant, just run the command `vagrant up` as usual in the `../monasca-api/devstack` directory.
-
-To use local repositories in the devstack install, commit your changes to the master branch of the local repo, then modify the `_REPO` variable in the settings file that corresponds to the local repo to use ```file://my/local/repo/location```.
-To use a local instance of the monasca-api repo, change the ```enable_plugin monasca-api https://opendev.org/openstack/monasca-api``` to ```enable_plugin monasca-api file://my/repo/is/here```. Both of these settings will only take effect on a rebuild of the devstack VM.
-
-## Enforcing Apache mirror
-
-If, for any reason, ```APACHE_MIRROR``` that is picked is not working, you can
-enforce it in following way:
-
-```sh
-APACHE_MIRROR=http://www-us.apache.org/dist/
-```
-
-## Using WSGI
-
-Monasca-api can be deployed with Apache using uwsgi and gunicorn.
-By default monasca-api runs under uwsgi.
-If you wish to use gunicorn make sure that ```devstack/local.conf```
-contains:
-
-```sh
-MONASCA_API_USE_MOD_WSGI=False
-```
-
-# License
-
-(c) Copyright 2015-2016 Hewlett Packard Enterprise Development Company LP
-Copyright Fujitsu LIMITED 2017
-
-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.
diff --git a/devstack/Vagrantfile b/devstack/Vagrantfile
deleted file mode 100644
index a48eb4f92..000000000
--- a/devstack/Vagrantfile
+++ /dev/null
@@ -1,207 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-# All Vagrant configuration is done below. The "2" in Vagrant.configure
-# configures the configuration version (we support older styles for
-# backwards compatibility). Please don't change it unless you know what
-# you're doing.
-Vagrant.configure(2) do |config|
-
- if Vagrant.has_plugin?("vagrant-cachier")
- config.cache.scope = :box
- end
-
- # Handle local proxy settings
- if Vagrant.has_plugin?("vagrant-proxyconf")
- if ENV["http_proxy"]
- config.proxy.http = ENV["http_proxy"]
- end
- if ENV["https_proxy"]
- config.proxy.https = ENV["https_proxy"]
- end
- if ENV["no_proxy"]
- config.proxy.no_proxy = ENV["no_proxy"] + ',192.168.10.6,10.0.2.15,127.0.0.1'
- end
-
- end
-
- config.vm.hostname = "devstack"
- config.vm.box = "bento/ubuntu-22.04"
- config.vm.box_check_update = false
- config.vm.network "private_network",ip:"192.168.10.6"
- config.vm.synced_folder "~/", "/vagrant_home"
-
- config.vm.provider "virtualbox" do |vb|
- vb.gui = false
- vb.memory = "12800"
- vb.cpus = 4
- # vb.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
- end
-
- config.vm.provision "shell", privileged: false, inline: <<-SHELL
- sudo apt-get update
- sudo apt-get -y upgrade
- sudo apt-get -y install git lnav
-
- if [ $http_proxy ]; then
- git config --global url.https://git.openstack.org/.insteadOf https://git.openstack.org/
- sudo git config --global url.https://git.openstack.org/.insteadOf https://git.openstack.org/
-
- protocol=`echo $http_proxy | awk -F: '{print $1}'`
- host=`echo $http_proxy | awk -F/ '{print $3}' | awk -F: '{print $1}'`
- port=`echo $http_proxy | awk -F/ '{print $3}' | awk -F: '{print $2}'`
-
- echo "
-
-
- $host
- true
- $protocol
- $host
- $port
-
-
- " > ./maven_proxy_settings.xml
-
- mkdir -p ~/.m2
- cp ./maven_proxy_settings.xml ~/.m2/settings.xml
-
- sudo mkdir -p /root/.m2
- sudo cp ./maven_proxy_settings.xml /root/.m2/settings.xml
- fi
-
- git clone https://opendev.org/openstack/devstack.git -b master --depth 1
-
- # If using vagrant-cachier, restore cached downloads of 3rd-party dependencies
- if [ -d "/tmp/vagrant-cache" ]; then
- if [ -d "/tmp/vagrant-cache/downloads" ]; then
- echo "Restoring downloads"
- cp /tmp/vagrant-cache/downloads/* devstack/files
- fi
- if [ -f "/tmp/vagrant-cache/pip-cache.tar.gz" ]; then
- echo "Restoring ~/.cache"
- tar xzf /tmp/vagrant-cache/pip-cache.tar.gz -C ~
- fi
- if [ -f "/tmp/vagrant-cache/nvm-cache.tar.gz" ]; then
- echo "Restoring ~/.nvm/.cache"
- mkdir -p ~/.nvm
- tar xzf /tmp/vagrant-cache/nvm-cache.tar.gz -C ~/.nvm
- fi
- if [ -f "/tmp/vagrant-cache/npm-pkgs.tar.gz" ]; then
- echo "Restoring ~/.npm"
- tar xzf /tmp/vagrant-cache/npm-pkgs.tar.gz -C ~
- fi
- if [ -f "/tmp/vagrant-cache/root-pip-cache.tar.gz" ]; then
- echo "Restoring ~root/.cache"
- sudo tar xzf /tmp/vagrant-cache/root-pip-cache.tar.gz -C ~root
- fi
- if [ -f "/tmp/vagrant-cache/root-m2-cache.tar.gz" ]; then
- echo "Restoring ~root/.m2"
- sudo tar xzf /tmp/vagrant-cache/root-m2-cache.tar.gz -C ~root
- fi
- fi
-
- cd devstack
- echo '[[local|localrc]]
-
-GIT_DEPTH=1
-
-SERVICE_HOST=192.168.10.6
-HOST_IP=192.168.10.6
-HOST_IP_IFACE=eth1
-
-DATABASE_PASSWORD=secretdatabase
-RABBIT_PASSWORD=secretrabbit
-ADMIN_PASSWORD=secretadmin
-SERVICE_PASSWORD=secretservice
-
-LOGFILE=$DEST/logs/stack.sh.log
-LOGDIR=$DEST/logs
-LOG_COLOR=False
-
-DEST=/opt/stack
-
-disable_all_services
-enable_service rabbit key tempest horizon
-
-# Enable more OpenStack services if neccessary:
-# https://opendev.org/openstack/devstack/src/branch/master/stackrc#L56-L81
-# Nova - services to support libvirt based openstack clouds
-# enable_service n-api n-cpu n-cond n-sch n-novnc n-cauth n-api-meta
-# Placement and Glance services needed for Nova
-# enable_service placement-api placement-client
-# enable_service g-api g-reg
-# Cinder, Neutron
-# enable_service cinder c-api c-vol c-sch c-bak
-# enable_service neutron q-svc q-agt q-dhcp q-meta q-l3
-
-# Uncomment one of the following lines to use either MySQL or PostgreSQL
-# as RDB (relational database) backend for monasca.
-enable_service mysql
-#enable_service postgresql
-
-# Enable entire storm for the sake of local development mode
-enable_service monasca-storm-nimbus
-enable_service monasca-storm-supervisor
-enable_service monasca-storm-ui
-enable_service monasca-storm-logviewer
-enable_service monasca-log
-
-
-# Uncomment this line to disable log part
-# disable_service monasca-log
-
-# Enable/Disable ORM support for mysql/postgresql
-# HINT: If postgresql service is enabled, ORM is enforced
-MONASCA_DATABASE_USE_ORM=${MONASCA_DATABASE_USE_ORM:-false}
-
-# The following two variables allow switching between Java and Python for the implementations
-# of the Monasca API and the Monasca Persister. If these variables are not set, then the
-# default is to install the Python implementations of both the Monasca API and the Monasca Persister.
-
-# Uncomment one of the following two lines to choose Java or Python for the Monasca API.
-# MONASCA_API_IMPLEMENTATION_LANG=${MONASCA_API_IMPLEMENTATION_LANG:-java}
-MONASCA_API_IMPLEMENTATION_LANG=${MONASCA_API_IMPLEMENTATION_LANG:-python}
-
-# Uncomment one of the following two lines to choose Java or Python for the Monasca Pesister.
-# MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-java}
-MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-python}
-
-# Uncomment one of the following three lines to choose either InfluxDB, Vertica or Cassandra.
-# MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-vertica}
-# MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-cassandra}
-MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-influxdb}
-
-MONASCA_API_USE_MOD_WSGI=${MONASCA_API_USE_MOD_WSGI:-True}
-
-# Uncomment to stack devstack with old log-api
-# USE_OLD_LOG_API=true
-# enable_service monasca-log-api
-
-# Start devstack with services running under Python 3
-USE_PYTHON3=True
-
-
-# Uncomment one of the following lines and modify accordingly to enable the Monasca DevStack Plugin
-enable_plugin monasca-api https://opendev.org/openstack/monasca-api
-# enable_plugin monasca-api file:///vagrant_home/Documents/repos/openstack/monasca-api.vertica
-
-# Uncomment to install tempest tests
-enable_plugin monasca-tempest-plugin https://opendev.org/openstack/monasca-tempest-plugin
-
-' > local.conf
- sudo apt purge -y python3-simplejson
- ./stack.sh
- # Cache downloaded files for future runs
- if [ -d "/tmp/vagrant-cache" ]; then
- mkdir -p /tmp/vagrant-cache/downloads
- cp files/*gz files/*.deb /tmp/vagrant-cache/downloads
- tar czf /tmp/vagrant-cache/pip-cache.tar.gz -C ~ .cache
- tar czf /tmp/vagrant-cache/nvm-cache.tar.gz -C ~/.nvm .cache
- tar czf /tmp/vagrant-cache/npm-pkgs.tar.gz -C ~ .npm
- sudo tar czf /tmp/vagrant-cache/root-pip-cache.tar.gz -C ~root .cache
- sudo tar czf /tmp/vagrant-cache/root-m2-cache.tar.gz -C ~root .m2
- fi
- SHELL
-
-end
diff --git a/devstack/files/cassandra/monasca_schema.cql b/devstack/files/cassandra/monasca_schema.cql
deleted file mode 100644
index 969b94ee8..000000000
--- a/devstack/files/cassandra/monasca_schema.cql
+++ /dev/null
@@ -1,93 +0,0 @@
-// (C) Copyright 2017 SUSE LLC
-//
-// 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.
-
-// version 1.0
-
-drop schema if exists monasca;
-
-// replication factor is set to 1 for devstack installation
-
-create schema monasca with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
-
-create table monasca.measurements (
- metric_id blob,
- region text static,
- tenant_id text static,
- metric_name text static,
- dimensions frozen> static,
- time_stamp timestamp,
- value double,
- value_meta text,
- primary key (metric_id, time_stamp)
-)
-WITH CLUSTERING ORDER BY (time_stamp ASC);
-
-create table monasca.metrics (
- region text,
- tenant_id text,
- metric_name text,
- dimensions frozen>,
- dimension_names frozen>,
- metric_id blob,
- created_at timestamp,
- updated_at timestamp,
- primary key ((region, tenant_id, metric_name), dimensions, dimension_names)
-);
-
-CREATE CUSTOM INDEX metrics_created_at_index ON monasca.metrics (created_at)
-USING 'org.apache.cassandra.index.sasi.SASIIndex';
-
-CREATE CUSTOM INDEX metrics_updated_at_index ON monasca.metrics (updated_at)
-USING 'org.apache.cassandra.index.sasi.SASIIndex';
-
-create table monasca.dimensions (
- region text,
- tenant_id text,
- name text,
- value text,
- primary key ((region, tenant_id, name), value)
-);
-
-create table monasca.dimensions_metrics (
- region text,
- tenant_id text,
- dimension_name text,
- dimension_value text,
- metric_name text,
- primary key ((region, tenant_id, dimension_name, dimension_value), metric_name)
-);
-
-create table monasca.metrics_dimensions (
- region text,
- tenant_id text,
- dimension_name text,
- dimension_value text,
- metric_name text,
- primary key ((region, tenant_id, metric_name), dimension_name, dimension_value)
-);
-
-create table monasca.alarm_state_history (
- tenant_id text,
- alarm_id text,
- time_stamp timestamp,
- metric text,
- old_state text,
- new_state text,
- reason text,
- reason_data text,
- sub_alarms text,
- primary key ((tenant_id, alarm_id), time_stamp)
-);
-
diff --git a/devstack/files/debs/monasca-api b/devstack/files/debs/monasca-api
deleted file mode 100644
index f9b04280a..000000000
--- a/devstack/files/debs/monasca-api
+++ /dev/null
@@ -1,9 +0,0 @@
-openjdk-8-jdk # dist:xenial,bionic,focal,jammy,noble
-openjdk-8-jre-headless # dist:bionic,focal,jammy,noble
-maven # dist:xenial,bionic,focal,jammy,noble
-jq # dist:xenial,bionic,focal,jammy,noble
-python-dev # dist:xenial,bionic,focal
-python3-dev # dist:jammy,noble
-build-essential # dist:xenial,bionic,focal,jammy,noble
-mailutils # dist:xenial,bionic,focal,jammy,noble
-python-is-python3 # dist:focal,jammy,noble
\ No newline at end of file
diff --git a/devstack/files/elasticsearch/elasticsearch.yml b/devstack/files/elasticsearch/elasticsearch.yml
deleted file mode 100644
index cb72492ec..000000000
--- a/devstack/files/elasticsearch/elasticsearch.yml
+++ /dev/null
@@ -1,88 +0,0 @@
-# ======================== Elasticsearch Configuration =========================
-#
-# NOTE: Elasticsearch comes with reasonable defaults for most settings.
-# Before you set out to tweak and tune the configuration, make sure you
-# understand what are you trying to accomplish and the consequences.
-#
-# The primary way of configuring a node is via this file. This template lists
-# the most important settings you may want to configure for a production cluster.
-#
-# Please consult the documentation for further information on configuration options:
-# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
-#
-# ---------------------------------- Cluster -----------------------------------
-#
-# Use a descriptive name for your cluster:
-#
-cluster.name: monasca_elastic
-#
-# ------------------------------------ Node ------------------------------------
-#
-# Use a descriptive name for the node:
-#
-#node.name: node-1
-#
-# Add custom attributes to the node:
-#
-#node.attr.rack: r1
-#
-# ----------------------------------- Paths ------------------------------------
-#
-# Path to directory where to store the data (separate multiple locations by comma):
-#
-path.data: %ES_DATA_DIR%
-#
-# Path to log files:
-#
-path.logs: %ES_LOG_DIR%
-#
-# ----------------------------------- Memory -----------------------------------
-#
-# Lock the memory on startup:
-#
-#bootstrap.memory_lock: true
-#
-# Make sure that the heap size is set to about half the memory available
-# on the system and that the owner of the process is allowed to use this
-# limit.
-#
-# Elasticsearch performs poorly when the system is swapping the memory.
-#
-# ---------------------------------- Network -----------------------------------
-#
-# Set the bind address to a specific IP (IPv4 or IPv6):
-#
-network.host: %ES_SERVICE_BIND_HOST%
-#
-# Set a custom port for HTTP:
-#
-http.port: %ES_SERVICE_BIND_PORT%
-#
-# For more information, consult the network module documentation.
-#
-# --------------------------------- Discovery ----------------------------------
-#
-# Pass an initial list of hosts to perform discovery when this node is started:
-# The default list of hosts is ["127.0.0.1", "[::1]"]
-#
-#discovery.seed_hosts: ["host1", "host2"]
-#
-# Bootstrap the cluster using an initial set of master-eligible nodes:
-#
-cluster.initial_master_nodes: ["%ES_SERVICE_BIND_HOST%"]
-#
-# For more information, consult the discovery and cluster formation module documentation.
-#
-# ---------------------------------- Gateway -----------------------------------
-#
-# Block initial recovery after a full cluster restart until N nodes are started:
-#
-#gateway.recover_after_nodes: 3
-#
-# For more information, consult the gateway module documentation.
-#
-# ---------------------------------- Various -----------------------------------
-#
-# Require explicit names when deleting indices:
-#
-#action.destructive_requires_name: true
\ No newline at end of file
diff --git a/devstack/files/grafana/dashboards.d/08-openstack.json b/devstack/files/grafana/dashboards.d/08-openstack.json
deleted file mode 100644
index 6edc5d2b6..000000000
--- a/devstack/files/grafana/dashboards.d/08-openstack.json
+++ /dev/null
@@ -1,988 +0,0 @@
-{
- "id": null,
- "title": "Openstack Dashboard",
- "originalTitle": "Openstack Dashboard",
- "tags": [],
- "style": "light",
- "timezone": "browser",
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "editable": true,
- "hideControls": false,
- "sharedCrosshair": false,
- "rows": [
- {
- "title": "OpenStack Health",
- "height": "100px",
- "editable": true,
- "collapse": false,
- "collapsable": true,
- "panels": [
- {
- "title": "compute (Nova)",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 1,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "http_status",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "compute"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "1",
- "op": "=",
- "text": "DOWN"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- },
- "height": "100"
- },
- {
- "title": "networking (Neutron)",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 4,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "http_status",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "networking"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "1",
- "op": "=",
- "text": "DOWN"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- },
- "height": "100"
- },
- {
- "title": "image-service (Glance)",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 5,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "http_status",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "image-service"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "1",
- "op": "=",
- "text": "DOWN"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- },
- "height": "100"
- },
- {
- "title": "block-storage (Cinder)",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 7,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "http_status",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "block-storage"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "1",
- "op": "=",
- "text": "DOWN"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- },
- "height": "100"
- },
- {
- "title": "object-storage (Swift)",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 8,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "http_status",
- "dimensions": [{"key": "service", "value": "object-storage"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "1",
- "op": "=",
- "text": "DOWN"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- },
- "height": "100"
- },
- {
- "title": "identity-service (Keystone)",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 12,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "http_status",
- "dimensions": [{"key": "service", "value": "identity-service"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "1",
- "op": "=",
- "text": "DOWN"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- },
- "height": "100"
- }
- ],
- "notice": false,
- "showTitle": true
- },
- {
- "title": "System Resources",
- "height": "250px",
- "editable": true,
- "collapse": false,
- "collapsable": true,
- "panels": [
- {
- "span": 6,
- "editable": true,
- "type": "graph",
- "loadingEditor": false,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "scale": 1,
- "y_formats": [
- "percent",
- "none"
- ],
- "grid": {
- "max": null,
- "min": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)",
- "leftMax": 100,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null
- },
- "annotate": {
- "enable": false
- },
- "resolution": 100,
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true,
- "rightSide": false
- },
- "percentage": false,
- "zerofill": true,
- "nullPointMode": "null",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "query_as_alias": true,
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "cpu.percent",
- "condition_filter": false,
- "alias": "cpu.percent (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "cpu.wait_perc",
- "alias": "cpu.wait_perc (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "cpu.system_perc",
- "alias": "cpu.system_perc (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "cpu.user_perc",
- "alias": "cpu.user_perc (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- }
- ],
- "aliasColors": {},
- "title": "CPU usage",
- "id": 2,
- "seriesOverrides": [],
- "links": [],
- "leftYAxisLabel": ""
- },
- {
- "title": "Memory usage",
- "error": false,
- "span": 6,
- "editable": true,
- "type": "graph",
- "id": 13,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "none",
- "none"
- ],
- "grid": {
- "leftMax": null,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)",
- "thresholdLine": false
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true,
- "rightSide": false
- },
- "nullPointMode": "null",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "mem.total_mb",
- "merge": false,
- "alias": "mem.total_mb (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "mem.swap_used_mb",
- "alias": "mem.swap_used_mb (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "mem.used_mb",
- "alias": "mem.used_mb (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "mem.swap_total_mb",
- "alias": "mem.swap_total_mb (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "mem.used_cache",
- "alias": "mem.used_cache (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": [],
- "leftYAxisLabel": "MB"
- },
- {
- "title": "Disk usage",
- "error": false,
- "span": 6,
- "editable": true,
- "type": "graph",
- "id": 14,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "percent",
- "short"
- ],
- "grid": {
- "leftMax": 100,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true,
- "rightSide": false,
- "sortDesc": null,
- "sort": null
- },
- "nullPointMode": "null",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "disk.space_used_perc",
- "merge": false,
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- },
- {
- "key": "device",
- "value": "rootfs"
- }
- ],
- "alias": "disk.space_used_perc (@hostname @device)"
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "disk.space_used_perc",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- },
- {
- "key": "mount_point",
- "value": "/boot"
- }
- ],
- "alias": "disk.space_used_perc (@hostname @mount_point)"
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "disk.space_used_perc",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- },
- {
- "key": "mount_point",
- "value": "/srv/node/swiftloopback"
- }
- ],
- "alias": "disk.space_used_perc (@hostname @mount_point)"
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": []
- },
- {
- "title": "System load",
- "error": false,
- "span": 6,
- "editable": true,
- "type": "graph",
- "id": 15,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "none",
- "short"
- ],
- "grid": {
- "leftMax": null,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "null",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "load.avg_1_min",
- "alias": "load.avg_1_min (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "load.avg_5_min",
- "alias": "load.avg_5_min (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "load.avg_15_min",
- "alias": "load.avg_15_min (@hostname)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- }
- ]
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": []
- }
- ],
- "notice": false,
- "showTitle": true
- },
- {
- "title": "Network monitoring",
- "height": "250px",
- "editable": true,
- "collapse": false,
- "panels": [
- {
- "title": "Network usage",
- "error": false,
- "span": 6,
- "editable": true,
- "type": "graph",
- "id": 16,
-
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "bps",
- "short"
- ],
- "grid": {
- "leftMax": null,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "connected",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "net.in_bytes_sec",
- "merge": true,
- "alias": "net.in_bytes_sec (@hostname @device)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- },
- {
- "key": "device",
- "value": "$all"
- }
- ]
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "merge": true,
- "metric": "net.out_bytes_sec",
- "alias": "net.out_bytes_sec (@hostname @device)",
- "dimensions": [
- {
- "key": "hostname",
- "value": "$all"
- },
- {
- "key": "device",
- "value": "$all"
- }
- ]
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": []
- }
- ],
- "showTitle": true
- }
- ],
- "nav": [
- {
- "type": "timepicker",
- "collapse": false,
- "notice": false,
- "enable": true,
- "status": "Stable",
- "time_options": [
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ],
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "now": true
- }
- ],
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "templating": {
- "list": [],
- "enable": false
- },
- "annotations": {
- "enable": false,
- "list": []
- },
- "refresh": "30s",
- "version": 6,
- "hideAllLegends": false
-}
diff --git a/devstack/files/grafana/dashboards.d/09-monasca.json b/devstack/files/grafana/dashboards.d/09-monasca.json
deleted file mode 100644
index 6d8427dab..000000000
--- a/devstack/files/grafana/dashboards.d/09-monasca.json
+++ /dev/null
@@ -1,1603 +0,0 @@
-{
- "id": null,
- "title": "Monasca Monitoring",
- "originalTitle": "Monasca Monitoring",
- "tags": [],
- "style": "dark",
- "timezone": "utc",
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "editable": true,
- "hideControls": false,
- "sharedCrosshair": false,
- "rows": [
- {
- "title": "Monasca Health - metrics",
- "height": "100px",
- "editable": true,
- "collapse": false,
- "panels": [
- {
- "title": "Metrics API",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 19,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.pid_count",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "uwsgi"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "0.0,0.2,1.0",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- }
- },
- {
- "title": "Storm",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 44,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.pid_count",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "storm"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- }
- },
- {
- "title": "Persister",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 21,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.pid_count",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "persister"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- }
- },
- {
- "title": "Metrics DB",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 51,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "http_status",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "influxdb"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "1",
- "op": "=",
- "text": "DOWN"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- }
- },
- {
- "title": "Notification Engine",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 42,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.pid_count",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "monasca-notification"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- }
- }
- ],
- "showTitle": true
- },
- {
- "title": "Monasca Health - Common",
- "height": "100px",
- "editable": true,
- "collapse": false,
- "panels": [
- {
- "title": "Kafka",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 38,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.pid_count",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "kafka"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- }
- },
- {
- "title": "ZooKeeper",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 48,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.pid_count",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "zookeeper"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- }
- },
- {
- "title": "MariaDB",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 66,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.pid_count",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "mysqld"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- }
- },
- {
- "title": "Statsd",
- "error": false,
- "span": 2,
- "editable": true,
- "type": "singlestat",
- "id": 166,
- "links": [],
- "maxDataPoints": 100,
- "interval": null,
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.pid_count",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "monasca-statsd"}]
- }
- ],
- "cacheTimeout": null,
- "format": "none",
- "prefix": "",
- "postfix": "",
- "nullText": null,
- "valueMaps": [
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- }
- ],
- "nullPointMode": "connected",
- "valueName": "current",
- "prefixFontSize": "50%",
- "valueFontSize": "80%",
- "postfixFontSize": "50%",
- "thresholds": "-1.0,0.2,0.8",
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "sparkline": {
- "show": false,
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "fillColor": "rgba(31, 118, 189, 0.18)"
- }
- }
- ],
- "showTitle": true
- },
- {
- "title": "System resources",
- "height": "250px",
- "editable": true,
- "collapse": false,
- "panels": [
- {
- "title": "CPU usage",
- "error": false,
- "span": 6,
- "editable": true,
- "type": "graph",
- "id": 23,
- "datasource": null,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "percent",
- "short"
- ],
- "grid": {
- "leftMax": 100,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "connected",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": false
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "cpu.percent",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring"
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "cpu.user_perc",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring"
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "cpu.system_perc",
- "condition_filter": true
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "cpu.wait_perc",
- "condition_filter": true
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": []
- },
- {
- "title": "Memory usage",
- "error": false,
- "span": 6,
- "editable": true,
- "type": "graph",
- "id": 24,
- "datasource": null,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "none",
- "short"
- ],
- "grid": {
- "leftMax": null,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "connected",
- "steppedLine": false,
- "tooltip": {
- "value_type": "individual",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "mem.total_mb",
- "condition_filter": true
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "mem.used_mb",
- "period": "",
- "condition_filter": true
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "mem.swap_total_mb",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring"
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "mem.swap_used_mb",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring"
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "mem.used_cache",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring"
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": [],
- "leftYAxisLabel": "MB"
- },
- {
- "title": "Disk usage",
- "error": false,
- "span": 6,
- "editable": true,
- "type": "graph",
- "id": 25,
- "datasource": null,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "percent",
- "short"
- ],
- "grid": {
- "leftMax": 100,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "connected",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "disk.space_used_perc",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring",
- "dimensions": [
- {
- "key": "mount_point",
- "value": "/boot"
- }
- ]
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": []
- },
- {
- "title": "System load",
- "error": false,
- "span": 6,
- "editable": true,
- "type": "graph",
- "id": 26,
- "datasource": null,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "none",
- "short"
- ],
- "grid": {
- "leftMax": null,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "connected",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "load.avg_1_min",
- "period": "",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring"
- },
- {
- "aggregator": "none",
- "column": "value",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring",
- "metric": "load.avg_5_min",
- "period": "300",
- "refId": "B",
- "dimensions": [],
- "error": ""
- },
- {
- "aggregator": "none",
- "column": "value",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring",
- "metric": "load.avg_15_min",
- "period": "300",
- "refId": "C",
- "dimensions": [],
- "error": ""
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": []
- }
- ],
- "showTitle": true
- },
- {
- "title": "Network Monitoring",
- "height": "250px",
- "editable": true,
- "collapse": false,
- "panels": [
- {
- "title": "Network usage",
- "error": false,
- "span": 6,
- "editable": true,
- "type": "graph",
- "id": 61,
- "datasource": null,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "bps",
- "short"
- ],
- "grid": {
- "leftMax": null,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "connected",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "net.in_bytes_sec",
- "merge": true,
- "dimensions": "",
- "period": "",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring"
- },
- {
- "target": "",
- "aggregator": "none",
- "column": "value",
- "metric": "net.out_bytes_sec",
- "merge": true,
- "dimensions": "",
- "period": "",
- "condition_filter": true,
- "condition_key": "service",
- "condition_value": "monitoring"
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": []
- }
- ],
- "showTitle": true
- },
- {
- "title": "Kafka",
- "height": "250px",
- "editable": true,
- "collapse": false,
- "panels": [
- {
- "title": "CPU usage",
- "error": false,
- "span": 4,
- "editable": true,
- "type": "graph",
- "id": 60,
- "datasource": null,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "percent",
- "short"
- ],
- "grid": {
- "leftMax": null,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "connected",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.cpu_perc",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "kafka"}]
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": []
- },
- {
- "title": "Allocated memory",
- "error": false,
- "span": 4,
- "editable": true,
- "type": "graph",
- "id": 59,
- "datasource": null,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "none",
- "short"
- ],
- "grid": {
- "leftMax": null,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "connected",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.mem.rss_mbytes",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "kafka"}]
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "leftYAxisLabel": "MB",
- "links": []
- },
- {
- "title": "PID count",
- "error": false,
- "span": 4,
- "editable": true,
- "type": "graph",
- "id": 89,
- "datasource": null,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "none",
- "short"
- ],
- "grid": {
- "leftMax": null,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "connected",
- "steppedLine": true,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "process.pid_count",
- "condition_filter": true,
- "dimensions": [{"key": "service", "value": "kafka"}]
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": []
- },
- {
- "title": "Consumer lag",
- "error": false,
- "span": 12,
- "editable": true,
- "type": "graph",
- "id": 58,
- "datasource": null,
- "renderer": "flot",
- "x-axis": true,
- "y-axis": true,
- "y_formats": [
- "none",
- "short"
- ],
- "grid": {
- "leftMax": null,
- "rightMax": null,
- "leftMin": 0,
- "rightMin": null,
- "threshold1": null,
- "threshold2": null,
- "threshold1Color": "rgba(216, 200, 27, 0.27)",
- "threshold2Color": "rgba(234, 112, 112, 0.22)"
- },
- "lines": true,
- "fill": 0,
- "linewidth": 1,
- "points": false,
- "pointradius": 5,
- "bars": false,
- "stack": false,
- "percentage": false,
- "legend": {
- "show": true,
- "values": false,
- "min": false,
- "max": false,
- "current": false,
- "total": false,
- "avg": false,
- "alignAsTable": true
- },
- "nullPointMode": "connected",
- "steppedLine": false,
- "tooltip": {
- "value_type": "cumulative",
- "shared": true
- },
- "targets": [
- {
- "aggregator": "none",
- "column": "value",
- "metric": "kafka.consumer_lag",
- "alias": "kafka.consumer_lag: @consumer_group",
- "refId": "A",
- "period": "300",
- "dimensions": [
- {
- "key": "consumer_group",
- "value": "$all"
- }
- ],
- "error": ""
- }
- ],
- "aliasColors": {},
- "seriesOverrides": [],
- "links": []
- }
- ],
- "showTitle": true
- },
- {
- "title": "Components",
- "panels": [
- {
- "id": 167,
- "title": "Common",
- "span": 4,
- "type": "dashlist",
- "query": "",
- "limit": 10,
- "tags": [
- "common"
- ],
- "recent": false,
- "search": true,
- "starred": false,
- "headings": false,
- "links": []
- },
- {
- "id": 168,
- "title": "Metrics",
- "span": 4,
- "type": "dashlist",
- "query": "",
- "limit": 10,
- "tags": [
- "metrics"
- ],
- "recent": false,
- "search": true,
- "starred": false,
- "headings": false,
- "links": []
- }
- ]
- }
- ],
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "templating": {
- "list": [],
- "enable": false
- },
- "annotations": {
- "enable": false,
- "list": []
- },
- "refresh": "30s",
- "version": 6,
- "hideAllLegends": false
-}
diff --git a/devstack/files/grafana/dashboards.d/11-maradb.json b/devstack/files/grafana/dashboards.d/11-maradb.json
deleted file mode 100644
index f52b13065..000000000
--- a/devstack/files/grafana/dashboards.d/11-maradb.json
+++ /dev/null
@@ -1,709 +0,0 @@
-{
- "id": null,
- "title": "MariaDB",
- "tags": [
- "common"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 15,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "mysqld"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "MariaDB",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "mysqld"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "mysqld"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "mysql.innodb.data_reads",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "mysql.innodb.data_writes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Data Read/Write",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "fill": 1,
- "id": 7,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "mysqld"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "mysqld"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "mysql.innodb.buffer_pool_free",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "mysql.innodb.buffer_pool_total",
- "period": "300",
- "refId": "B"
- },
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "mysql.innodb.buffer_pool_used",
- "period": "300",
- "refId": "C"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Buffer Pool Size",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "mysql.innodb.row_lock_time",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "mysql.innodb.row_lock_waits",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Lock",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "ms",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/12-api.json b/devstack/files/grafana/dashboards.d/12-api.json
deleted file mode 100644
index bf520f27e..000000000
--- a/devstack/files/grafana/dashboards.d/12-api.json
+++ /dev/null
@@ -1,624 +0,0 @@
-{
- "id": null,
- "title": "Monasca API",
- "tags": [
- "metrics"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "uwsgi"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Monasca API",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-api"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-api"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-api"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-api"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-api"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-api"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-api"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/13-storm.json b/devstack/files/grafana/dashboards.d/13-storm.json
deleted file mode 100644
index ce39304c3..000000000
--- a/devstack/files/grafana/dashboards.d/13-storm.json
+++ /dev/null
@@ -1,624 +0,0 @@
-{
- "id": null,
- "title": "Storm",
- "tags": [
- "metrics"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "storm"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Storm",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "storm"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "storm"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "storm"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "storm"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "storm"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "storm"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "storm"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/14-persister.json b/devstack/files/grafana/dashboards.d/14-persister.json
deleted file mode 100644
index 993c99369..000000000
--- a/devstack/files/grafana/dashboards.d/14-persister.json
+++ /dev/null
@@ -1,624 +0,0 @@
-{
- "id": null,
- "title": "Persister",
- "tags": [
- "metrics"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "persister"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Persister",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "persister"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "persister"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "persister"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "persister"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "persister"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "persister"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "persister"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/15-influxdb.json b/devstack/files/grafana/dashboards.d/15-influxdb.json
deleted file mode 100644
index 849226c5e..000000000
--- a/devstack/files/grafana/dashboards.d/15-influxdb.json
+++ /dev/null
@@ -1,564 +0,0 @@
-{
- "id": null,
- "title": "Metrics DB",
- "tags": [
- "metrics"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [{"key": "service", "value": "influxdb"}],
- "error": "",
- "metric": "http_status",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "InfluxDB",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "1",
- "op": "=",
- "text": "DOWN"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "influxd"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "influxd"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "influxd"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "influxd"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "influxd"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "influxd"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "influxd"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/16-zookeper.json b/devstack/files/grafana/dashboards.d/16-zookeper.json
deleted file mode 100644
index 1a48cfb3e..000000000
--- a/devstack/files/grafana/dashboards.d/16-zookeper.json
+++ /dev/null
@@ -1,760 +0,0 @@
-{
- "id": null,
- "title": "Zookeper",
- "tags": [
- "common"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 15,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "datasource": null,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 2,
- "interval": null,
- "links": [],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "zookeeper"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Zookeper",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "UP",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UP",
- "value": "2"
- },
- {
- "op": "=",
- "text": "UP",
- "value": "3"
- },
- {
- "op": "=",
- "text": "UP",
- "value": "4"
- },
- {
- "op": "=",
- "text": "UP",
- "value": "5"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "0"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "zookeeper"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "zookeeper"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "mbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "zookeeper"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "zookeeper"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "zookeeper"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "zookeeper"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 7,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "zookeeper"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 8,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "zookeeper.avg_latency_sec",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "zookeeper.max_latency_sec",
- "period": "300",
- "refId": "B"
- },
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "zookeeper.min_latency_sec",
- "period": "300",
- "refId": "C"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Latency",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 9,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [],
- "error": "",
- "metric": "zookeeper.connections_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Conections count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/17-notification.json b/devstack/files/grafana/dashboards.d/17-notification.json
deleted file mode 100644
index 29f1b6043..000000000
--- a/devstack/files/grafana/dashboards.d/17-notification.json
+++ /dev/null
@@ -1,624 +0,0 @@
-{
- "id": null,
- "title": "Notification Engine",
- "tags": [
- "metrics"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "monasca-notification"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Notification",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-notification"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-notification"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-notification"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-notification"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-notification"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-notification"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-notification"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/18-kafka.json b/devstack/files/grafana/dashboards.d/18-kafka.json
deleted file mode 100644
index 7874cc752..000000000
--- a/devstack/files/grafana/dashboards.d/18-kafka.json
+++ /dev/null
@@ -1,624 +0,0 @@
-{
- "id": null,
- "title": "Kafka",
- "tags": [
- "common"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "kafka"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Kafka",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kafka"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kafka"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kafka"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kafka"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kafka"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kafka"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kafka"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/19-statsd.json b/devstack/files/grafana/dashboards.d/19-statsd.json
deleted file mode 100644
index 9074b21d7..000000000
--- a/devstack/files/grafana/dashboards.d/19-statsd.json
+++ /dev/null
@@ -1,624 +0,0 @@
-{
- "id": null,
- "title": "Monasca statsd",
- "tags": [
- "common"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "monasca-statsd"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Monasca statsd",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-statsd"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-statsd"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-statsd"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-statsd"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-statsd"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-statsd"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "monasca-statsd"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/20-kibana.json b/devstack/files/grafana/dashboards.d/20-kibana.json
deleted file mode 100644
index 712afb006..000000000
--- a/devstack/files/grafana/dashboards.d/20-kibana.json
+++ /dev/null
@@ -1,624 +0,0 @@
-{
- "id": null,
- "title": "Kibana",
- "tags": [
- "logs"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "kibana"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Kibana",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kibana"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kibana"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kibana"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kibana"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kibana"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kibana"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "kibana"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/22-logtransformer.json b/devstack/files/grafana/dashboards.d/22-logtransformer.json
deleted file mode 100644
index dd9dae5c6..000000000
--- a/devstack/files/grafana/dashboards.d/22-logtransformer.json
+++ /dev/null
@@ -1,624 +0,0 @@
-{
- "id": null,
- "title": "Log Transformer",
- "tags": [
- "logs"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "log-transformer"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Log Transformer",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-transformer"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-transformer"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-transformer"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-transformer"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-transformer"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-transformer"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-transformer"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/23-logtmetrics.json b/devstack/files/grafana/dashboards.d/23-logtmetrics.json
deleted file mode 100644
index eb44a73dd..000000000
--- a/devstack/files/grafana/dashboards.d/23-logtmetrics.json
+++ /dev/null
@@ -1,624 +0,0 @@
-{
- "id": null,
- "title": "Log Metrics",
- "tags": [
- "logs"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "log-metrics"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Log Metrics",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-metrics"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-metrics"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-metrics"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-metrics"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-metrics"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-metrics"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-metrics"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/dashboards.d/24-logpersister.json b/devstack/files/grafana/dashboards.d/24-logpersister.json
deleted file mode 100644
index 28a1adec1..000000000
--- a/devstack/files/grafana/dashboards.d/24-logpersister.json
+++ /dev/null
@@ -1,624 +0,0 @@
-{
- "id": null,
- "title": "Log Persister",
- "tags": [
- "logs"
- ],
- "style": "dark",
- "timezone": "browser",
- "editable": true,
- "sharedCrosshair": false,
- "hideControls": false,
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "templating": {
- "list": []
- },
- "annotations": {
- "list": []
- },
- "schemaVersion": 13,
- "version": 7,
- "links": [],
- "gnetId": null,
- "rows": [
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(225, 40, 40, 0.59)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(71, 212, 59, 0.4)"
- ],
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": null,
- "links": [],
- "mappingType": 1,
- "mappingTypes": [
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "aggregator": "none",
- "dimensions": [
- {
- "key": "service",
- "value": "log-persister"
- }
- ],
- "error": "",
- "metric": "process.pid_count",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": "0.2,0.8",
- "title": "Log Persister",
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "value": "0",
- "op": "=",
- "text": "DOWN"
- },
- {
- "value": "1",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "2",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "3",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "4",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "5",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "6",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "7",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "8",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "9",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "10",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "11",
- "op": "=",
- "text": "UP"
- },
- {
- "value": "12",
- "op": "=",
- "text": "UP"
- }
- ],
- "valueName": "current"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-persister"
- }
- ],
- "error": "",
- "metric": "process.cpu_perc",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-persister"
- }
- ],
- "error": "",
- "metric": "process.mem.rss_mbytes",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": "250px",
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-persister"
- }
- ],
- "error": "",
- "metric": "process.io.read_count",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-persister"
- }
- ],
- "error": "",
- "metric": "process.io.write_count",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Count",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-persister"
- }
- ],
- "error": "",
- "metric": "process.io.read_kbytes",
- "period": "300",
- "refId": "A"
- },
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-persister"
- }
- ],
- "error": "",
- "metric": "process.io.write_kbytes",
- "period": "300",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "IO Read/Write [kB]",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "kbytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- },
- {
- "title": "Dashboard Row",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": null,
- "fill": 1,
- "id": 6,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "aggregator": "avg",
- "dimensions": [
- {
- "key": "process_name",
- "value": "log-persister"
- }
- ],
- "error": "",
- "metric": "process.open_file_descriptors",
- "period": "300",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Open File Descriptors",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "titleSize": "h6",
- "height": 250,
- "repeat": null,
- "repeatRowId": null,
- "repeatIteration": null,
- "collapse": false
- }
- ]
-}
diff --git a/devstack/files/grafana/grafana-init.py b/devstack/files/grafana/grafana-init.py
deleted file mode 100644
index adb824874..000000000
--- a/devstack/files/grafana/grafana-init.py
+++ /dev/null
@@ -1,176 +0,0 @@
-# coding=utf-8
-
-# (C) Copyright 2017 Hewlett Packard Enterprise Development LP
-#
-# 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.
-
-import glob
-import json
-import logging
-import os
-import sys
-import time
-
-from requests import RequestException
-from requests import Session
-
-LOG_LEVEL = logging.getLevelName(os.environ.get('LOG_LEVEL', 'INFO'))
-logging.basicConfig(level=LOG_LEVEL)
-
-logger = logging.getLogger(__name__)
-
-GRAFANA_URL = os.environ.get('GRAFANA_URL', 'http://localhost:3000')
-GRAFANA_USERNAME = os.environ.get('GRAFANA_USERNAME', 'mini-mon')
-GRAFANA_PASSWORD = os.environ.get('GRAFANA_PASSWORD', 'password')
-GRAFANA_USERS = [{'user': GRAFANA_USERNAME, 'password': GRAFANA_PASSWORD, 'email': ''}]
-
-DATASOURCE_NAME = os.environ.get('DATASOURCE_NAME', 'monasca')
-DATASOURCE_URL = os.environ.get('DATASOURCE_URL', 'http://localhost/metrics')
-DATASOURCE_ACCESS_MODE = os.environ.get('DATASOURCE_ACCESS_MODE', 'proxy')
-DATASOURCE_AUTH = os.environ.get('DATASOURCE_AUTH', 'Keystone').capitalize()
-DATASOURCE_AUTH_TOKEN = os.environ.get('DATASOURCE_AUTH_TOKEN', '')
-
-DASHBOARDS_DIR = os.environ.get('DASHBOARDS_DIR', '/dashboards.d')
-
-
-def retry(retries=5, delay=2.0, exc_types=(RequestException,)):
- def decorator(func):
- def f_retry(*args, **kwargs):
- for i in range(retries):
- try:
- return func(*args, **kwargs)
- except exc_types as exc:
- if i < retries - 1:
- logger.debug('Caught exception, retrying...',
- exc_info=True)
- time.sleep(delay)
- else:
- logger.exception('Failed after %d attempts', retries)
- if isinstance(exc, RequestException):
- logger.debug('Response was: %r', exc.response.text)
-
- raise
- return f_retry
- return decorator
-
-
-def create_login_payload():
- if os.environ.get('GRAFANA_USERS'):
- try:
- json.loads(os.environ.get('GRAFANA_USERS'))
- except ValueError:
- print("Invalid type GRAFANA_USERS")
- raise
- grafana_users = json.loads(os.environ.get('GRAFANA_USERS'))
- else:
- grafana_users = GRAFANA_USERS
- return grafana_users
-
-
-@retry(retries=24, delay=5.0)
-def login(session, user):
- r = session.post('{url}/login'.format(url=GRAFANA_URL),
- json=user,
- timeout=5)
- r.raise_for_status()
-
-
-@retry(retries=12, delay=5.0)
-def check_initialized(session):
- r = session.get('{url}/api/datasources'.format(url=GRAFANA_URL), timeout=5)
- r.raise_for_status()
-
- logging.debug('existing datasources = %r', r.json())
-
- for datasource in r.json():
- if datasource['name'] == DATASOURCE_NAME:
- return True
-
- return False
-
-
-def create_datasource_payload():
- payload = {
- 'name': DATASOURCE_NAME,
- 'url': DATASOURCE_URL,
- 'access': DATASOURCE_ACCESS_MODE,
- 'isDefault': True,
- }
-
- if DATASOURCE_AUTH not in ['Keystone', 'Horizon', 'Token']:
- logger.error('Unknown Keystone authentication option: %s',
- DATASOURCE_AUTH)
- sys.exit(1)
-
- keystone_auth = False
- if DATASOURCE_AUTH in ['Keystone']:
- keystone_auth = True
-
- payload.update({
- 'monasca': {
- 'type': 'monasca-datasource',
- 'jsonData': {
- 'authMode': DATASOURCE_AUTH,
- 'keystoneAuth': keystone_auth,
- 'token': DATASOURCE_AUTH_TOKEN,
- }
- }
- }.get(DATASOURCE_NAME, {}))
-
- logging.debug('payload = %r', payload)
-
- return payload
-
-
-def create_dashboard_payload(json_path):
- with open(json_path, 'r') as f:
- dashboard = json.load(f)
- dashboard['id'] = None
-
- return {
- 'dashboard': dashboard,
- 'overwrite': False
- }
-
-
-def main():
- for user in create_login_payload():
- logging.info('Opening a Grafana session...')
- session = Session()
- login(session, user)
-
- if check_initialized(session):
- logging.info('Grafana has already been initialized, skipping!')
- return
-
- logging.info('Attempting to add configured datasource...')
- r = session.post('{url}/api/datasources'.format(url=GRAFANA_URL),
- json=create_datasource_payload())
- logging.debug('Response: %r', r.json())
- r.raise_for_status()
-
- for path in sorted(glob.glob('{dir}/*.json'.format(dir=DASHBOARDS_DIR))):
- logging.info('Creating dashboard from file: {path}'.format(path=path))
- r = session.post('{url}/api/dashboards/db'.format(url=GRAFANA_URL),
- json=create_dashboard_payload(path))
- logging.debug('Response: %r', r.json())
- r.raise_for_status()
-
- logging.info('Ending %r session...', user.get('user'))
- session.get('{url}/logout'.format(url=GRAFANA_URL))
-
- logging.info('Finished successfully.')
-
-
-if __name__ == '__main__':
- main()
diff --git a/devstack/files/grafana/grafana-server b/devstack/files/grafana/grafana-server
deleted file mode 100755
index 27c2a1b86..000000000
--- a/devstack/files/grafana/grafana-server
+++ /dev/null
@@ -1,146 +0,0 @@
-#! /usr/bin/env bash
-
-# chkconfig: 2345 80 05
-# description: Grafana web server & backend
-# processname: grafana-server
-# config: /etc/grafana/grafana.ini
-# pidfile: /var/run/grafana-server.pid
-
-### BEGIN INIT INFO
-# Provides: grafana-server
-# Required-Start: $all
-# Required-Stop: $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Start grafana at boot time
-### END INIT INFO
-
-# tested on
-# 1. New lsb that define start-stop-daemon
-# 3. Centos with initscripts package installed
-
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-NAME=grafana-server
-DESC="Grafana Server"
-DEFAULT=/etc/default/$NAME
-
-GRAFANA_USER=grafana
-GRAFANA_GROUP=grafana
-GRAFANA_HOME=/usr/share/grafana
-CONF_DIR=/etc/grafana
-WORK_DIR=$GRAFANA_HOME
-DATA_DIR=/var/lib/grafana
-LOG_DIR=/var/log/grafana
-CONF_FILE=$CONF_DIR/grafana.ini
-MAX_OPEN_FILES=10000
-PID_FILE=/var/run/$NAME.pid
-DAEMON=/usr/sbin/$NAME
-
-umask 0027
-
-if [ `id -u` -ne 0 ]; then
- echo "You need root privileges to run this script"
- exit 4
-fi
-
-if [ ! -x $DAEMON ]; then
- echo "Program not installed or not executable"
- exit 5
-fi
-
-. /lib/lsb/init-functions
-
-if [ -r /etc/default/rcS ]; then
- . /etc/default/rcS
-fi
-
-# overwrite settings from default file
-if [ -f "$DEFAULT" ]; then
- . "$DEFAULT"
-fi
-
-DAEMON_OPTS="--pidfile=${PID_FILE} --config=${CONF_FILE} cfg:default.paths.data=${DATA_DIR} cfg:default.paths.logs=${LOG_DIR}"
-
-case "$1" in
- start)
-
- log_daemon_msg "Starting $DESC"
-
- pid=`pidofproc -p $PID_FILE grafana`
- if [ -n "$pid" ] ; then
- log_begin_msg "Already running."
- log_end_msg 0
- exit 0
- fi
-
- # Prepare environment
- mkdir -p "$LOG_DIR" "$DATA_DIR" && chown "$GRAFANA_USER":"$GRAFANA_GROUP" "$LOG_DIR" "$DATA_DIR"
- touch "$PID_FILE" && chown "$GRAFANA_USER":"$GRAFANA_GROUP" "$PID_FILE"
-
- if [ -n "$MAX_OPEN_FILES" ]; then
- ulimit -n $MAX_OPEN_FILES
- fi
-
- # Start Daemon
- start-stop-daemon --start -b --chdir "$WORK_DIR" --user "$GRAFANA_USER" -c "$GRAFANA_USER" --pidfile "$PID_FILE" --exec $DAEMON -- $DAEMON_OPTS
- return=$?
- if [ $return -eq 0 ]
- then
- sleep 1
-
- # check if pid file has been written two
- if ! [[ -s $PID_FILE ]]; then
- log_end_msg 1
- exit 1
- fi
-
- i=0
- timeout=10
- # Wait for the process to be properly started before exiting
- until { cat "$PID_FILE" | xargs kill -0; } >/dev/null 2>&1
- do
- sleep 1
- i=$(($i + 1))
- if [ $i -gt $timeout ]; then
- log_end_msg 1
- exit 1
- fi
- done
- fi
- log_end_msg $return
- ;;
- stop)
- log_daemon_msg "Stopping $DESC"
-
- if [ -f "$PID_FILE" ]; then
- start-stop-daemon --stop --pidfile "$PID_FILE" \
- --user "$GRAFANA_USER" \
- --retry=TERM/20/KILL/5 >/dev/null
- if [ $? -eq 1 ]; then
- log_progress_msg "$DESC is not running but pid file exists, cleaning up"
- elif [ $? -eq 3 ]; then
- PID="`cat $PID_FILE`"
- log_failure_msg "Failed to stop $DESC (pid $PID)"
- exit 1
- fi
- rm -f "$PID_FILE"
- else
- log_progress_msg "(not running)"
- fi
- log_end_msg 0
- ;;
- status)
- status_of_proc -p $PID_FILE grafana grafana && exit 0 || exit $?
- ;;
- restart|force-reload)
- if [ -f "$PID_FILE" ]; then
- $0 stop
- sleep 1
- fi
- $0 start
- ;;
- *)
- log_success_msg "Usage: $0 {start|stop|restart|force-reload|status}"
- exit 3
- ;;
-esac
diff --git a/devstack/files/grafana/grafana.ini b/devstack/files/grafana/grafana.ini
deleted file mode 100644
index b0af9c00a..000000000
--- a/devstack/files/grafana/grafana.ini
+++ /dev/null
@@ -1,13 +0,0 @@
-[auth.keystone]
-enabled = true
-auth_url = '%KEYSTONE_AUTH_URI%'
-
-[paths]
-plugins = /var/lib/grafana/plugins
-
-[session]
-session_life_time = 1800
-gc_interval_time = 1800
-
-[security]
-login_remember_days = 0
diff --git a/devstack/files/influxdb/influxdb b/devstack/files/influxdb/influxdb
deleted file mode 100644
index 4fcff8538..000000000
--- a/devstack/files/influxdb/influxdb
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
-#
-# 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.
-#
-
-# Logging
-STDERR="/var/log/influxdb/influxd.log"
diff --git a/devstack/files/influxdb/influxdb.conf b/devstack/files/influxdb/influxdb.conf
deleted file mode 100644
index 1d2ee917a..000000000
--- a/devstack/files/influxdb/influxdb.conf
+++ /dev/null
@@ -1,579 +0,0 @@
-### Welcome to the InfluxDB configuration file.
-
-# The values in this file override the default values used by the system if
-# a config option is not specified. The commented out lines are the configuration
-# field and the default value used. Uncommenting a line and changing the value
-# will change the value used at runtime when the process is restarted.
-
-# Once every 24 hours InfluxDB will report usage data to usage.influxdata.com
-# The data includes a random ID, os, arch, version, the number of series and other
-# usage data. No data from user databases is ever transmitted.
-# Change this option to true to disable reporting.
-# reporting-disabled = false
-
-# Bind address to use for the RPC service for backup and restore.
-# bind-address = "127.0.0.1:8088"
-
-###
-### [meta]
-###
-### Controls the parameters for the Raft consensus group that stores metadata
-### about the InfluxDB cluster.
-###
-
-[meta]
- # Where the metadata/raft database is stored
- dir = "/var/lib/influxdb/meta"
-
- # Automatically create a default retention policy when creating a database.
- # retention-autocreate = true
-
- # If log messages are printed for the meta service
- # logging-enabled = true
-
-###
-### [data]
-###
-### Controls where the actual shard data for InfluxDB lives and how it is
-### flushed from the WAL. "dir" may need to be changed to a suitable place
-### for your system, but the WAL settings are an advanced configuration. The
-### defaults should work for most systems.
-###
-
-[data]
- # The directory where the TSM storage engine stores TSM files.
- dir = "/var/lib/influxdb/data"
-
- # The directory where the TSM storage engine stores WAL files.
- wal-dir = "/var/lib/influxdb/wal"
-
- # The amount of time that a write will wait before fsyncing. A duration
- # greater than 0 can be used to batch up multiple fsync calls. This is useful for slower
- # disks or when WAL write contention is seen. A value of 0s fsyncs every write to the WAL.
- # Values in the range of 0-100ms are recommended for non-SSD disks.
- # wal-fsync-delay = "0s"
-
-
- # The type of shard index to use for new shards. The default is an in-memory index that is
- # recreated at startup. A value of "tsi1" will use a disk based index that supports higher
- # cardinality datasets.
- # index-version = "inmem"
- index-version = "tsi1"
-
- # Trace logging provides more verbose output around the tsm engine. Turning
- # this on can provide more useful output for debugging tsm engine issues.
- # trace-logging-enabled = false
-
- # Whether queries should be logged before execution. Very useful for troubleshooting, but will
- # log any sensitive data contained within a query.
- # query-log-enabled = true
-
- # Validates incoming writes to ensure keys only have valid unicode characters.
- # This setting will incur a small overhead because every key must be checked.
- # validate-keys = false
-
- # Settings for the TSM engine
-
- # CacheMaxMemorySize is the maximum size a shard's cache can
- # reach before it starts rejecting writes.
- # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
- # Values without a size suffix are in bytes.
- # cache-max-memory-size = "1g"
-
- # CacheSnapshotMemorySize is the size at which the engine will
- # snapshot the cache and write it to a TSM file, freeing up memory
- # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
- # Values without a size suffix are in bytes.
- # cache-snapshot-memory-size = "25m"
-
- # CacheSnapshotWriteColdDuration is the length of time at
- # which the engine will snapshot the cache and write it to
- # a new TSM file if the shard hasn't received writes or deletes
- # cache-snapshot-write-cold-duration = "10m"
-
- # CompactFullWriteColdDuration is the duration at which the engine
- # will compact all TSM files in a shard if it hasn't received a
- # write or delete
- # compact-full-write-cold-duration = "4h"
-
- # The maximum number of concurrent full and level compactions that can run at one time. A
- # value of 0 results in 50% of runtime.GOMAXPROCS(0) used at runtime. Any number greater
- # than 0 limits compactions to that value. This setting does not apply
- # to cache snapshotting.
- # max-concurrent-compactions = 0
-
- # CompactThroughput is the rate limit in bytes per second that we
- # will allow TSM compactions to write to disk. Note that short bursts are allowed
- # to happen at a possibly larger value, set by CompactThroughputBurst
- # compact-throughput = "48m"
-
- # CompactThroughputBurst is the rate limit in bytes per second that we
- # will allow TSM compactions to write to disk.
- # compact-throughput-burst = "48m"
-
- # If true, then the mmap advise value MADV_WILLNEED will be provided to the kernel with respect to
- # TSM files. This setting has been found to be problematic on some kernels, and defaults to off.
- # It might help users who have slow disks in some cases.
- # tsm-use-madv-willneed = false
-
- # Settings for the inmem index
-
- # The maximum series allowed per database before writes are dropped. This limit can prevent
- # high cardinality issues at the database level. This limit can be disabled by setting it to
- # 0.
- # max-series-per-database = 1000000
-
- # The maximum number of tag values per tag that are allowed before writes are dropped. This limit
- # can prevent high cardinality tag values from being written to a measurement. This limit can be
- # disabled by setting it to 0.
- # max-values-per-tag = 100000
-
- # Settings for the tsi1 index
-
- # The threshold, in bytes, when an index write-ahead log file will compact
- # into an index file. Lower sizes will cause log files to be compacted more
- # quickly and result in lower heap usage at the expense of write throughput.
- # Higher sizes will be compacted less frequently, store more series in-memory,
- # and provide higher write throughput.
- # Valid size suffixes are k, m, or g (case insensitive, 1024 = 1k).
- # Values without a size suffix are in bytes.
- # max-index-log-file-size = "1m"
-
- # The size of the internal cache used in the TSI index to store previously
- # calculated series results. Cached results will be returned quickly from the cache rather
- # than needing to be recalculated when a subsequent query with a matching tag key/value
- # predicate is executed. Setting this value to 0 will disable the cache, which may
- # lead to query performance issues.
- # This value should only be increased if it is known that the set of regularly used
- # tag key/value predicates across all measurements for a database is larger than 100. An
- # increase in cache size may lead to an increase in heap usage.
- series-id-set-cache-size = 100
-
-###
-### [coordinator]
-###
-### Controls the clustering service configuration.
-###
-
-[coordinator]
- # The default time a write request will wait until a "timeout" error is returned to the caller.
- # write-timeout = "10s"
-
- # The maximum number of concurrent queries allowed to be executing at one time. If a query is
- # executed and exceeds this limit, an error is returned to the caller. This limit can be disabled
- # by setting it to 0.
- # max-concurrent-queries = 0
-
- # The maximum time a query will is allowed to execute before being killed by the system. This limit
- # can help prevent run away queries. Setting the value to 0 disables the limit.
- # query-timeout = "0s"
-
- # The time threshold when a query will be logged as a slow query. This limit can be set to help
- # discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging.
- # log-queries-after = "0s"
-
- # The maximum number of points a SELECT can process. A value of 0 will make
- # the maximum point count unlimited. This will only be checked every second so queries will not
- # be aborted immediately when hitting the limit.
- # max-select-point = 0
-
- # The maximum number of series a SELECT can run. A value of 0 will make the maximum series
- # count unlimited.
- # max-select-series = 0
-
- # The maximum number of group by time bucket a SELECT can create. A value of zero will max the maximum
- # number of buckets unlimited.
- # max-select-buckets = 0
-
-###
-### [retention]
-###
-### Controls the enforcement of retention policies for evicting old data.
-###
-
-[retention]
- # Determines whether retention policy enforcement enabled.
- # enabled = true
-
- # The interval of time when retention policy enforcement checks run.
- # check-interval = "30m"
-
-###
-### [shard-precreation]
-###
-### Controls the precreation of shards, so they are available before data arrives.
-### Only shards that, after creation, will have both a start- and end-time in the
-### future, will ever be created. Shards are never precreated that would be wholly
-### or partially in the past.
-
-[shard-precreation]
- # Determines whether shard pre-creation service is enabled.
- # enabled = true
-
- # The interval of time when the check to pre-create new shards runs.
- # check-interval = "10m"
-
- # The default period ahead of the endtime of a shard group that its successor
- # group is created.
- # advance-period = "30m"
-
-###
-### Controls the system self-monitoring, statistics and diagnostics.
-###
-### The internal database for monitoring data is created automatically if
-### if it does not already exist. The target retention within this database
-### is called 'monitor' and is also created with a retention period of 7 days
-### and a replication factor of 1, if it does not exist. In all cases the
-### this retention policy is configured as the default for the database.
-
-[monitor]
- # Whether to record statistics internally.
- # store-enabled = true
-
- # The destination database for recorded statistics
- # store-database = "_internal"
-
- # The interval at which to record statistics
- # store-interval = "10s"
-
-###
-### [http]
-###
-### Controls how the HTTP endpoints are configured. These are the primary
-### mechanism for getting data into and out of InfluxDB.
-###
-
-[http]
- # Determines whether HTTP endpoint is enabled.
- # enabled = true
-
- # Determines whether the Flux query endpoint is enabled.
- # flux-enabled = false
-
- # Determines whether the Flux query logging is enabled.
- # flux-log-enabled = false
-
- # The bind address used by the HTTP service.
- # bind-address = ":8086"
-
- # Determines whether user authentication is enabled over HTTP/HTTPS.
- # auth-enabled = false
-
- # The default realm sent back when issuing a basic auth challenge.
- # realm = "InfluxDB"
-
- # Determines whether HTTP request logging is enabled.
- # log-enabled = true
-
- # Determines whether the HTTP write request logs should be suppressed when the log is enabled.
- # suppress-write-log = false
-
- # When HTTP request logging is enabled, this option specifies the path where
- # log entries should be written. If unspecified, the default is to write to stderr, which
- # intermingles HTTP logs with internal InfluxDB logging.
- #
- # If influxd is unable to access the specified path, it will log an error and fall back to writing
- # the request log to stderr.
- # access-log-path = ""
-
- # Filters which requests should be logged. Each filter is of the pattern NNN, NNX, or NXX where N is
- # a number and X is a wildcard for any number. To filter all 5xx responses, use the string 5xx.
- # If multiple filters are used, then only one has to match. The default is to have no filters which
- # will cause every request to be printed.
- # access-log-status-filters = []
-
- # Determines whether detailed write logging is enabled.
- # write-tracing = false
-
- # Determines whether the pprof endpoint is enabled. This endpoint is used for
- # troubleshooting and monitoring.
- # pprof-enabled = true
- pprof-enabled = false
-
- # Enables a pprof endpoint that binds to localhost:6060 immediately on startup.
- # This is only needed to debug startup issues.
- # debug-pprof-enabled = false
-
- # Determines whether HTTPS is enabled.
- # https-enabled = false
-
- # The SSL certificate to use when HTTPS is enabled.
- # https-certificate = "/etc/ssl/influxdb.pem"
-
- # Use a separate private key location.
- # https-private-key = ""
-
- # The JWT auth shared secret to validate requests using JSON web tokens.
- # shared-secret = ""
-
- # The default chunk size for result sets that should be chunked.
- # max-row-limit = 0
-
- # The maximum number of HTTP connections that may be open at once. New connections that
- # would exceed this limit are dropped. Setting this value to 0 disables the limit.
- # max-connection-limit = 0
-
- # Enable http service over unix domain socket
- # unix-socket-enabled = false
-
- # The path of the unix domain socket.
- # bind-socket = "/var/run/influxdb.sock"
-
- # The maximum size of a client request body, in bytes. Setting this value to 0 disables the limit.
- # max-body-size = 25000000
-
- # The maximum number of writes processed concurrently.
- # Setting this to 0 disables the limit.
- # max-concurrent-write-limit = 0
-
- # The maximum number of writes queued for processing.
- # Setting this to 0 disables the limit.
- # max-enqueued-write-limit = 0
-
- # The maximum duration for a write to wait in the queue to be processed.
- # Setting this to 0 or setting max-concurrent-write-limit to 0 disables the limit.
- # enqueued-write-timeout = 0
-
-###
-### [logging]
-###
-### Controls how the logger emits logs to the output.
-###
-
-[logging]
- # Determines which log encoder to use for logs. Available options
- # are auto, logfmt, and json. auto will use a more a more user-friendly
- # output format if the output terminal is a TTY, but the format is not as
- # easily machine-readable. When the output is a non-TTY, auto will use
- # logfmt.
- # format = "auto"
-
- # Determines which level of logs will be emitted. The available levels
- # are error, warn, info, and debug. Logs that are equal to or above the
- # specified level will be emitted.
- # level = "info"
-
- # Suppresses the logo output that is printed when the program is started.
- # The logo is always suppressed if STDOUT is not a TTY.
- # suppress-logo = false
-
-###
-### [subscriber]
-###
-### Controls the subscriptions, which can be used to fork a copy of all data
-### received by the InfluxDB host.
-###
-
-[subscriber]
- # Determines whether the subscriber service is enabled.
- # enabled = true
-
- # The default timeout for HTTP writes to subscribers.
- # http-timeout = "30s"
-
- # Allows insecure HTTPS connections to subscribers. This is useful when testing with self-
- # signed certificates.
- # insecure-skip-verify = false
-
- # The path to the PEM encoded CA certs file. If the empty string, the default system certs will be used
- # ca-certs = ""
-
- # The number of writer goroutines processing the write channel.
- # write-concurrency = 40
-
- # The number of in-flight writes buffered in the write channel.
- # write-buffer-size = 1000
-
-
-###
-### [[graphite]]
-###
-### Controls one or many listeners for Graphite data.
-###
-
-[[graphite]]
- # Determines whether the graphite endpoint is enabled.
- # enabled = false
- # database = "graphite"
- # retention-policy = ""
- # bind-address = ":2003"
- # protocol = "tcp"
- # consistency-level = "one"
-
- # These next lines control how batching works. You should have this enabled
- # otherwise you could get dropped metrics or poor performance. Batching
- # will buffer points in memory if you have many coming in.
-
- # Flush if this many points get buffered
- # batch-size = 5000
-
- # number of batches that may be pending in memory
- # batch-pending = 10
-
- # Flush at least this often even if we haven't hit buffer limit
- # batch-timeout = "1s"
-
- # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
- # udp-read-buffer = 0
-
- ### This string joins multiple matching 'measurement' values providing more control over the final measurement name.
- # separator = "."
-
- ### Default tags that will be added to all metrics. These can be overridden at the template level
- ### or by tags extracted from metric
- # tags = ["region=us-east", "zone=1c"]
-
- ### Each template line requires a template pattern. It can have an optional
- ### filter before the template and separated by spaces. It can also have optional extra
- ### tags following the template. Multiple tags should be separated by commas and no spaces
- ### similar to the line protocol format. There can be only one default template.
- # templates = [
- # "*.app env.service.resource.measurement",
- # # Default template
- # "server.*",
- # ]
-
-###
-### [collectd]
-###
-### Controls one or many listeners for collectd data.
-###
-
-[[collectd]]
- # enabled = false
- # bind-address = ":25826"
- # database = "collectd"
- # retention-policy = ""
- #
- # The collectd service supports either scanning a directory for multiple types
- # db files, or specifying a single db file.
- # typesdb = "/usr/local/share/collectd"
- #
- # security-level = "none"
- # auth-file = "/etc/collectd/auth_file"
-
- # These next lines control how batching works. You should have this enabled
- # otherwise you could get dropped metrics or poor performance. Batching
- # will buffer points in memory if you have many coming in.
-
- # Flush if this many points get buffered
- # batch-size = 5000
-
- # Number of batches that may be pending in memory
- # batch-pending = 10
-
- # Flush at least this often even if we haven't hit buffer limit
- # batch-timeout = "10s"
-
- # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
- # read-buffer = 0
-
- # Multi-value plugins can be handled two ways.
- # "split" will parse and store the multi-value plugin data into separate measurements
- # "join" will parse and store the multi-value plugin as a single multi-value measurement.
- # "split" is the default behavior for backward compatibility with previous versions of influxdb.
- # parse-multivalue-plugin = "split"
-###
-### [opentsdb]
-###
-### Controls one or many listeners for OpenTSDB data.
-###
-
-[[opentsdb]]
- # enabled = false
- # bind-address = ":4242"
- # database = "opentsdb"
- # retention-policy = ""
- # consistency-level = "one"
- # tls-enabled = false
- # certificate= "/etc/ssl/influxdb.pem"
-
- # Log an error for every malformed point.
- # log-point-errors = true
-
- # These next lines control how batching works. You should have this enabled
- # otherwise you could get dropped metrics or poor performance. Only points
- # metrics received over the telnet protocol undergo batching.
-
- # Flush if this many points get buffered
- # batch-size = 1000
-
- # Number of batches that may be pending in memory
- # batch-pending = 5
-
- # Flush at least this often even if we haven't hit buffer limit
- # batch-timeout = "1s"
-
-###
-### [[udp]]
-###
-### Controls the listeners for InfluxDB line protocol data via UDP.
-###
-
-[[udp]]
- # enabled = false
- # bind-address = ":8089"
- # database = "udp"
- # retention-policy = ""
-
- # InfluxDB precision for timestamps on received points ("" or "n", "u", "ms", "s", "m", "h")
- # precision = ""
-
- # These next lines control how batching works. You should have this enabled
- # otherwise you could get dropped metrics or poor performance. Batching
- # will buffer points in memory if you have many coming in.
-
- # Flush if this many points get buffered
- # batch-size = 5000
-
- # Number of batches that may be pending in memory
- # batch-pending = 10
-
- # Will flush at least this often even if we haven't hit buffer limit
- # batch-timeout = "1s"
-
- # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
- # read-buffer = 0
-
-###
-### [continuous_queries]
-###
-### Controls how continuous queries are run within InfluxDB.
-###
-
-[continuous_queries]
- # Determines whether the continuous query service is enabled.
- # enabled = true
-
- # Controls whether queries are logged when executed by the CQ service.
- # log-enabled = true
-
- # Controls whether queries are logged to the self-monitoring data store.
- # query-stats-enabled = false
-
- # interval for how often continuous queries will be checked if they need to run
- # run-interval = "1s"
-
-###
-### [tls]
-###
-### Global configuration settings for TLS in InfluxDB.
-###
-
-[tls]
- # Determines the available set of cipher suites. See https://golang.org/pkg/crypto/tls/#pkg-constants
- # for a list of available ciphers, which depends on the version of Go (use the query
- # SHOW DIAGNOSTICS to see the version of Go used to build InfluxDB). If not specified, uses
- # the default settings from Go's crypto/tls package.
- # ciphers = [
- # "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305",
- # "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
- # ]
-
- # Minimum version of the tls protocol that will be negotiated. If not specified, uses the
- # default settings from Go's crypto/tls package.
- # min-version = "tls1.2"
-
- # Maximum version of the tls protocol that will be negotiated. If not specified, uses the
- # default settings from Go's crypto/tls package.
- # max-version = "tls1.2"
diff --git a/devstack/files/kafka/kafka-server-start.sh b/devstack/files/kafka/kafka-server-start.sh
deleted file mode 100644
index 87b31d56a..000000000
--- a/devstack/files/kafka/kafka-server-start.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-
-if [ $# -lt 1 ];
-then
- echo "USAGE: $0 [-daemon] server.properties"
- exit 1
-fi
-base_dir=$(dirname $0)
-export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/log4j.properties"
-export KAFKA_HEAP_OPTS="-Xms256m -Xmx256m"
-
-EXTRA_ARGS="-name kafkaServer -loggc"
-
-COMMAND=$1
-case $COMMAND in
- -daemon)
- EXTRA_ARGS="-daemon "$EXTRA_ARGS
- shift
- ;;
- *)
- ;;
-esac
-
-exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka $@
diff --git a/devstack/files/kafka/kafka.service b/devstack/files/kafka/kafka.service
deleted file mode 100644
index 9b311704d..000000000
--- a/devstack/files/kafka/kafka.service
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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.
-#
-
-[Unit]
-Description=Kafka
-Requires=network.target
-After=network.target zookeeper.service
-
-[Service]
-User=kafka
-Group=kafka
-LimitNOFILE=32768:32768
-Environment="LOG_DIR=/var/log/kafka"
-Environment="KAFKA_HEAP_OPTS=-Xmx128m"
-ExecStart=/opt/kafka/bin/kafka-server-start.sh /etc/kafka/server.properties
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
diff --git a/devstack/files/kafka/server.properties b/devstack/files/kafka/server.properties
deleted file mode 100644
index f592903e5..000000000
--- a/devstack/files/kafka/server.properties
+++ /dev/null
@@ -1,146 +0,0 @@
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-
-# see kafka.server.KafkaConfig for additional details and defaults
-
-############################# Server Basics #############################
-
-# The id of the broker. This must be set to a unique integer for each broker.
-broker.id=0
-
-############################# Socket Server Settings #############################
-
-# The address the socket server listens on. It will get the value returned from
-# java.net.InetAddress.getCanonicalHostName() if not configured.
-# FORMAT:
-# listeners = listener_name://host_name:port
-# EXAMPLE:
-# listeners = PLAINTEXT://your.host.name:9092
-
-# Hostname and port the broker will advertise to producers and consumers. If not set,
-# it uses the value for "listeners" if configured. Otherwise, it will use the value
-# returned from java.net.InetAddress.getCanonicalHostName().
-#advertised.listeners=PLAINTEXT://your.host.name:9092
-
-# Maps listener names to security protocols, the default is for them to be the same. See the config documentation for more details
-#listener.security.protocol.map=PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
-
-# The number of threads that the server uses for receiving requests from the network and sending responses to the network
-num.network.threads=3
-
-# The number of threads that the server uses for processing requests, which may include disk I/O
-num.io.threads=2
-
-# The send buffer (SO_SNDBUF) used by the socket server
-socket.send.buffer.bytes=102400
-
-# The receive buffer (SO_RCVBUF) used by the socket server
-socket.receive.buffer.bytes=102400
-
-# The maximum size of a request that the socket server will accept (protection against OOM)
-socket.request.max.bytes=104857600
-
-
-############################# Log Basics #############################
-
-# A comma separated list of directories under which to store log files
-log.dirs=/var/kafka
-
-auto.create.topics.enable=false
-# The default number of log partitions per topic. More partitions allow greater
-# parallelism for consumption, but this will also result in more files across
-# the brokers.
-num.partitions=1
-
-# The number of threads per data directory to be used for log recovery at startup and flushing at shutdown.
-# This value is recommended to be increased for installations with data dirs located in RAID array.
-num.recovery.threads.per.data.dir=1
-
-# Specify the message format version the broker will use to append messages to
-# the logs. Once consumers are upgraded, one can change the message format and
-# enjoy the new message format that includes new timestamp and improved
-# compression.
-# (TODO) Use new message format after updating consumers
-log.message.format.version=0.9.0.0
-
-############################# Internal Topic Settings #############################
-# The replication factor for the group metadata internal topics "__consumer_offsets" and "__transaction_state"
-# For anything other than development testing, a value greater than 1 is recommended for to ensure availability such as 3.
-offsets.topic.replication.factor=1
-transaction.state.log.replication.factor=1
-transaction.state.log.min.isr=1
-
-############################# Log Flush Policy #############################
-
-# Messages are immediately written to the filesystem but by default we only fsync() to sync
-# the OS cache lazily. The following configurations control the flush of data to disk.
-# There are a few important trade-offs here:
-# 1. Durability: Unflushed data may be lost if you are not using replication.
-# 2. Latency: Very large flush intervals may lead to latency spikes when the flush does occur as there will be a lot of data to flush.
-# 3. Throughput: The flush is generally the most expensive operation, and a small flush interval may lead to excessive seeks.
-# The settings below allow one to configure the flush policy to flush data after a period of time or
-# every N messages (or both). This can be done globally and overridden on a per-topic basis.
-
-# The number of messages to accept before forcing a flush of data to disk
-log.flush.interval.messages=10000
-
-# The maximum amount of time a message can sit in a log before we force a flush
-log.flush.interval.ms=1000
-
-############################# Log Retention Policy #############################
-
-# The following configurations control the disposal of log segments. The policy can
-# be set to delete segments after a period of time, or after a given size has accumulated.
-# A segment will be deleted whenever *either* of these criteria are met. Deletion always happens
-# from the end of the log.
-
-# The minimum age of a log file to be eligible for deletion due to age
-log.retention.hours=24
-
-# A size-based retention policy for logs. Segments are pruned from the log unless the remaining
-# segments drop below log.retention.bytes. Functions independently of log.retention.hours.
-log.retention.bytes=104857600
-
-# The maximum size of a log segment file. When this size is reached a new log segment will be created.
-log.segment.bytes=104857600
-
-# The interval at which log segments are checked to see if they can be deleted according
-# to the retention policies
-log.retention.check.interval.ms=300000
-
-############################# Zookeeper #############################
-
-# Zookeeper connection string (see zookeeper docs for details).
-# This is a comma separated host:port pairs, each corresponding to a zk
-# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
-# You can also append an optional chroot string to the urls to specify the
-# root directory for all kafka znodes.
-zookeeper.connect=127.0.0.1:2181
-
-# Timeout in ms for connecting to zookeeper
-zookeeper.connection.timeout.ms=6000
-
-
-############################# Group Coordinator Settings #############################
-
-# The following configuration specifies the time, in milliseconds, that the GroupCoordinator will delay the initial consumer rebalance.
-# The rebalance will be further delayed by the value of group.initial.rebalance.delay.ms as new members join the group, up to a maximum of max.poll.interval.ms.
-# The default value for this is 3 seconds.
-# We override this to 0 here as it makes for a better out-of-the-box experience for development and testing.
-# However, in production environments the default value of 3 seconds is more suitable as this will help to avoid unnecessary, and potentially expensive, rebalances during application startup.
-group.initial.rebalance.delay.ms=0
\ No newline at end of file
diff --git a/devstack/files/kibana/kibana.yml b/devstack/files/kibana/kibana.yml
deleted file mode 100644
index b45738a3b..000000000
--- a/devstack/files/kibana/kibana.yml
+++ /dev/null
@@ -1,122 +0,0 @@
-# Kibana is served by a back end server. This setting specifies the port to use.
-server.port: %KIBANA_SERVICE_PORT%
-
-# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
-# The default is 'localhost', which usually means remote machines will not be able to connect.
-# To allow connections from remote users, set this parameter to a non-loopback address.
-server.host: %KIBANA_SERVICE_HOST%
-
-# Enables you to specify a path to mount Kibana at if you are running behind a proxy.
-# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
-# from requests it receives, and to prevent a deprecation warning at startup.
-# This setting cannot end in a slash.
-server.basePath: %KIBANA_SERVER_BASE_PATH%
-
-# Specifies whether Kibana should rewrite requests that are prefixed with
-# `server.basePath` or require that they are rewritten by your reverse proxy.
-# This setting was effectively always `false` before Kibana 6.3 and will
-# default to `true` starting in Kibana 7.0.
-server.rewriteBasePath: false
-
-# The maximum payload size in bytes for incoming server requests.
-#server.maxPayloadBytes: 1048576
-
-# The Kibana server's name. This is used for display purposes.
-#server.name: "your-hostname"
-
-# The URLs of the Elasticsearch instances to use for all your queries.
-elasticsearch.hosts: ["http://%ES_SERVICE_BIND_HOST%:%ES_SERVICE_BIND_PORT%"]
-
-# When this setting's value is true Kibana uses the hostname specified in the server.host
-# setting. When the value of this setting is false, Kibana uses the hostname of the host
-# that connects to this Kibana instance.
-#elasticsearch.preserveHost: true
-
-# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
-# dashboards. Kibana creates a new index if the index doesn't already exist.
-kibana.index: ".kibana"
-
-# The default application to load.
-kibana.defaultAppId: "discover"
-
-# If your Elasticsearch is protected with basic authentication, these settings provide
-# the username and password that the Kibana server uses to perform maintenance on the Kibana
-# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
-# is proxied through the Kibana server.
-#elasticsearch.username: "kibana"
-#elasticsearch.password: "pass"
-
-# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
-# These settings enable SSL for outgoing requests from the Kibana server to the browser.
-#server.ssl.enabled: false
-#server.ssl.certificate: /path/to/your/server.crt
-#server.ssl.key: /path/to/your/server.key
-
-# Optional settings that provide the paths to the PEM-format SSL certificate and key files.
-# These files validate that your Elasticsearch backend uses the same key files.
-#elasticsearch.ssl.certificate: /path/to/your/client.crt
-#elasticsearch.ssl.key: /path/to/your/client.key
-
-# Optional setting that enables you to specify a path to the PEM file for the certificate
-# authority for your Elasticsearch instance.
-#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]
-
-# To disregard the validity of SSL certificates, change this setting's value to 'none'.
-#elasticsearch.ssl.verificationMode: full
-
-# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of
-# the elasticsearch.requestTimeout setting.
-elasticsearch.pingTimeout: 1500
-
-# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
-# must be a positive integer.
-elasticsearch.requestTimeout: 300000
-
-# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
-# headers, set this value to [] (an empty list).
-#elasticsearch.requestHeadersWhitelist: [ authorization ]
-
-# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
-# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.
-#elasticsearch.customHeaders: {}
-
-# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
-elasticsearch.shardTimeout: 0
-
-# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
-elasticsearch.startupTimeout: 5000
-
-# Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
-#elasticsearch.logQueries: false
-
-# Specifies the path where Kibana creates the process ID file.
-#pid.file: /var/run/kibana.pid
-
-# Enables you specify a file where Kibana stores log output.
-#logging.dest: stdout
-
-# Set the value of this setting to true to suppress all logging output.
-logging.silent: false
-
-# Set the value of this setting to true to suppress all logging output other than error messages.
-logging.quiet: false
-
-# Set the value of this setting to true to log all events, including system usage information
-# and all requests.
-logging.verbose: true
-
-# Set the interval in milliseconds to sample system and process performance
-# metrics. Minimum is 100ms. Defaults to 5000.
-#ops.interval: 5000
-
-# Specifies locale to be used for all localizable strings, dates and number formats.
-# Supported languages are the following: English - en , by default , Chinese - zh-CN .
-#i18n.locale: "en"
-
-optimize.useBundleCache: False
-console.enabled: False
-
-monasca-kibana-plugin.enabled: True
-monasca-kibana-plugin.auth_uri: %KEYSTONE_AUTH_URI%
-monasca-kibana-plugin.elasticsearch.url: "http://%ES_SERVICE_BIND_HOST%:%ES_SERVICE_BIND_PORT%"
-monasca-kibana-plugin.cookie.isSecure: False
\ No newline at end of file
diff --git a/devstack/files/monasca-agent/elastic.yaml b/devstack/files/monasca-agent/elastic.yaml
deleted file mode 100644
index 154d20ab5..000000000
--- a/devstack/files/monasca-agent/elastic.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
-init_config:
-instances:
-- url: http://{{IP}}:9200
- cluster_stats: true
- pshard_stats: true
- index_stats: true
- pending_task_stats: true
\ No newline at end of file
diff --git a/devstack/files/monasca-agent/host_alive.yaml b/devstack/files/monasca-agent/host_alive.yaml
deleted file mode 100644
index 58998965f..000000000
--- a/devstack/files/monasca-agent/host_alive.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-init_config:
- ping_timeout: 1
- ssh_port: 22
- ssh_timeout: 0.5
-instances:
- - alive_test: ssh
- host_name: 127.0.0.1
- name: 127.0.0.1
diff --git a/devstack/files/monasca-agent/http_check.yaml b/devstack/files/monasca-agent/http_check.yaml
deleted file mode 100644
index 1a66f37fd..000000000
--- a/devstack/files/monasca-agent/http_check.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-init_config: null
-instances:
- - name: keystone
- dimensions:
- service: keystone
- timeout: 3
- url: http://127.0.0.1/identity
- - name: mysql
- dimensions:
- service: mysql
- timeout: 3
- url: http://127.0.0.1:3306
- - name: influxdb
- dimensions:
- service: influxdb
- timeout: 3
- url: http://127.0.0.1:8086/ping
- - name: elasticsearch
- dimensions:
- service: elasticsearch
- timeout: 3
- url: http://{{IP}}:9200/_cat/health
- - name: kibana
- dimensions:
- service: kibana
- timeout: 3
- url: http://{{IP}}:5601/api/status
diff --git a/devstack/files/monasca-agent/kafka_consumer.yaml b/devstack/files/monasca-agent/kafka_consumer.yaml
deleted file mode 100644
index 164cc6f83..000000000
--- a/devstack/files/monasca-agent/kafka_consumer.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-init_config:
-
-instances:
- - built_by: Kafka
- consumer_groups:
- 1_metrics:
- metrics: []
- thresh-event:
- events: []
- thresh-metric:
- metrics: []
- kafka_connect_str: 127.0.0.1:9092
- name: 127.0.0.1:9092
- per_partition: false
diff --git a/devstack/files/monasca-agent/monasca-reconfigure b/devstack/files/monasca-agent/monasca-reconfigure
deleted file mode 100644
index 108c9042e..000000000
--- a/devstack/files/monasca-agent/monasca-reconfigure
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-'/opt/monasca-agent/bin/monasca-setup' \
- -u 'monasca-agent' \
- -p 'password' \
- -s '%MONASCA_SERVICE_TYPE%' \
- \
- --keystone_url '%KEYSTONE_AUTH_URI%' \
- --project_name 'mini-mon' \
- --project_domain_name '%SERVICE_DOMAIN_NAME%' \
- --user_domain_name '%SERVICE_DOMAIN_NAME%' \
- \
- --service_type '%MONASCA_SERVICE_TYPE%' \
- --endpoint_type 'public' \
- --region_name '%REGION_NAME%' \
- \
- --check_frequency '15' \
- --log_level 'DEBUG' \
- --overwrite \
- --system_only \
- --monasca_statsd_port %MONASCA_STATSD_PORT%
\ No newline at end of file
diff --git a/devstack/files/monasca-agent/mysql.yaml b/devstack/files/monasca-agent/mysql.yaml
deleted file mode 100644
index c1c83cb86..000000000
--- a/devstack/files/monasca-agent/mysql.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-init_config:
-instances:
- - built_by: MySQL
- name: mysql
- server: 127.0.0.1
- port: 3306
- user: root
- pass: secretdatabase
diff --git a/devstack/files/monasca-agent/process.yaml b/devstack/files/monasca-agent/process.yaml
deleted file mode 100644
index 42a90831a..000000000
--- a/devstack/files/monasca-agent/process.yaml
+++ /dev/null
@@ -1,87 +0,0 @@
-init_config:
-
-instances:
- - name: influxd
- detailed: true
- dimensions:
- service: influxd
- exact_match: false
- search_string:
- - influxd
- - name: monasca-statsd
- detailed: true
- dimensions:
- service: monasca-statsd
- exact_match: false
- search_string:
- - monasca-statsd
- - name: monasca-notification
- detailed: true
- dimensions:
- service: monasca-notification
- exact_match: false
- search_string:
- - monasca-notification
- - name: persister
- detailed: true
- dimensions:
- service: persister
- exact_match: false
- search_string:
- - persister
- - name: storm
- detailed: true
- dimensions:
- service: storm
- exact_match: false
- search_string:
- - storm
- - name: monasca-api
- detailed: true
- dimensions:
- service: uwsgi
- exact_match: false
- search_string:
- - uwsgi
- - name: monasca-collector
- detailed: true
- dimensions:
- service: monasca-collector
- exact_match: false
- search_string:
- - monasca-collector
- - name: memcached
- detailed: true
- dimensions:
- service: memcached
- exact_match: false
- search_string:
- - memcached
- - name: monasca-forwarder
- detailed: true
- dimensions:
- service: monasca-forwarder
- exact_match: false
- search_string:
- - monasca-forwarder
- - name: zookeeper
- detailed: true
- dimensions:
- service: zookeeper
- exact_match: false
- search_string:
- - zookeeper
- - name: kafka
- detailed: true
- dimensions:
- service: kafka
- exact_match: false
- search_string:
- - kafka
- - name: mysqld
- detailed: true
- dimensions:
- service: mysqld
- exact_match: false
- search_string:
- - mysqld
diff --git a/devstack/files/monasca-agent/zk.yaml b/devstack/files/monasca-agent/zk.yaml
deleted file mode 100644
index b67f80e55..000000000
--- a/devstack/files/monasca-agent/zk.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-init_config:
-
-instances:
- - host: 127.0.0.1
- port: 2181
- timeout: 3
diff --git a/devstack/files/monasca-api/apache-monasca-api.template b/devstack/files/monasca-api/apache-monasca-api.template
deleted file mode 100644
index 5748e1443..000000000
--- a/devstack/files/monasca-api/apache-monasca-api.template
+++ /dev/null
@@ -1,18 +0,0 @@
-Listen %PUBLICPORT%
-
-
- WSGIDaemonProcess monasca-api user=%USER% processes=%APIWORKERS% threads=1 display-name=%{GROUP} %VIRTUALENV%
- WSGIProcessGroup monasca-api
- WSGIScriptAlias / %PUBLICWSGI%/wsgi.py
- WSGIApplicationGroup %{GLOBAL}
-
- WSGIPassAuthorization On
-
- LogLevel info
- ErrorLog /var/log/%APACHE_NAME%/monasca-api.log
- CustomLog /var/log/%APACHE_NAME%/monasca-api_access.log combined
-
- SetEnv no-gzip 1
- AddDefaultCharset utf-8
-
-
\ No newline at end of file
diff --git a/devstack/files/monasca-api/api-config.yml b/devstack/files/monasca-api/api-config.yml
deleted file mode 100644
index 31a38c501..000000000
--- a/devstack/files/monasca-api/api-config.yml
+++ /dev/null
@@ -1,186 +0,0 @@
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
-# Copyright 2017 Fujitsu LIMITED
-#
-# 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.
-#
-
-# The region for which all metrics passing through this server will be persisted
-region: "useast"
-
-maxQueryLimit: 10000
-
-# Whether this server is running on a secure port
-accessedViaHttps: false
-
-# Topic for publishing metrics to
-metricsTopic: metrics
-
-# Topic for publishing domain events to
-eventsTopic: events
-
-validNotificationPeriods:
- - 60
-
-kafka:
- brokerUris:
- - "%KAFKA_HOST%:9092"
- zookeeperUris:
- - "127.0.0.1:2181"
- healthCheckTopic: healthcheck
-
-mysql:
- driverClass: com.mysql.jdbc.Driver
- url: "jdbc:mysql://%DATABASE_HOST%:%DATABASE_PORT%/mon?connectTimeout=5000&autoReconnect=true&useSSL=true&useLegacyDatetimeCode=false&serverTimezone=UTC&characterEncoding=utf8"
- user: "%DATABASE_USER%"
- password: "%DATABASE_PASSWORD%"
- maxWaitForConnection: 1s
- validationQuery: "/* MyService Health Check */ SELECT 1"
- minSize: 8
- maxSize: 32
- checkConnectionWhileIdle: false
- checkConnectionOnBorrow: true
-
-# Possible options for dataSourceClassName are:
-# - com.mysql.jdbc.jdbc2.optional.MysqlDataSource
-# - org.postgresql.ds.PGPoolingDataSource
-# HINT: dataSourceUrl is relevant only for mysql
-hibernate:
- supportEnabled: %MONASCA_DATABASE_USE_ORM%
- providerClass: com.zaxxer.hikari.hibernate.HikariConnectionProvider
- dataSourceClassName: %MONASCA_API_DATABASE_ENGINE%
- dataSourceUrl: jdbc:mysql://%MYSQL_HOST%:%MYSQL_PORT%/mon
- serverName: %DATABASE_HOST%
- portNumber: %DATABASE_PORT%
- databaseName: mon
- user: %DATABASE_USER%
- password: %DATABASE_PASSWORD%
- initialConnections: 25
- maxConnections: 100
- autoConfig: validate
-
-databaseConfiguration:
- databaseType: "%MONASCA_METRICS_DB%"
-
-# Uncomment if databaseType is influxDB
-influxDB:
- # Retention policy may be left blank to indicate default policy.
- retentionPolicy:
- maxHttpConnections: 100
- gzip: true
- name: "mon"
- url: "http://%INFLUXDB_HOST%:%INFLUXDB_PORT%"
- user: "mon_api"
- password: "password"
-
-
-# Uncomment if databaseType is vertica
-# As of 7/10 there is a bug in the monasca-api that requires this section even if databaseType is set to influxdb
-vertica:
- driverClass: com.vertica.jdbc.Driver
- url: "jdbc:vertica://%VERTICA_HOST%:5433/mon"
- user: "mon_api"
- password: "password"
- maxWaitForConnection: 1s
- validationQuery: "/* MyService Health Check */ SELECT 1"
- minSize: 4
- maxSize: 32
- checkConnectionWhileIdle: true
- #
- # vertica database hint to be added to SELECT
- # statements. For example, the hint below is used
- # to tell vertica that the query can be satisfied
- # locally (replicated projection).
- #
- # dbHint: "/*+KV(01)*/"
- dbHint: ""
-
-middleware:
- enabled: true
- serverVIP: "%KEYSTONE_SERVICE_HOST%"
- serverPort: %KEYSTONE_SERVICE_PORT%
- useHttps: False
- truststore: "None"
- truststorePassword: "None"
- connTimeout: 5000
- connSSLClientAuth: False
- keystore: "None"
- keystorePassword: "None"
- connPoolMaxActive: 3
- connPoolMaxIdle: 3
- connPoolEvictPeriod: 600000
- connPoolMinIdleTime: 600000
- connRetryTimes: 2
- connRetryInterval: 50
- defaultAuthorizedRoles: [monasca-user]
- readOnlyAuthorizedRoles: [monasca-read-only-user]
- agentAuthorizedRoles: [monasca-agent]
- delegateAuthorizedRole: admin
- adminRole: admin
- adminAuthMethod: password
- adminUser: "admin"
- adminPassword: "%ADMIN_PASSWORD%"
- adminProjectId:
- adminProjectName: "admin"
- adminToken:
- timeToCacheToken: 600
- maxTokenCacheSize: 1048576
-
-server:
- applicationConnectors:
- - type: http
- port: %MONASCA_API_SERVICE_PORT%
- bindHost: %MONASCA_API_SERVICE_HOST%
- maxRequestHeaderSize: 16KiB # Allow large headers used by keystone tokens
- adminConnectors:
- - type: http
- port: %MONASCA_API_ADMIN_PORT%
- bindHost: %MONASCA_API_SERVICE_HOST%
- requestLog:
- timeZone: UTC
- appenders:
- - type: file
- currentLogFilename: "/var/log/monasca/api/request.log"
- threshold: ALL
- archive: true
- archivedLogFilenamePattern: "/var/log/monasca/api/request-%d.log.gz"
- archivedFileCount: 5
-
-# Logging settings.
-logging:
-
- # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL.
- level: WARN
-
- # Logger-specific levels.
- loggers:
-
- # Sets the level for 'com.example.app' to DEBUG.
- com.example.app: DEBUG
-
- appenders:
- - type: console
- threshold: ALL
- timeZone: UTC
- target: stdout
- logFormat: # TODO
-
- - type: file
- currentLogFilename: "/var/log/monasca/api/monasca-api.log"
- threshold: ALL
- archive: true
- archivedLogFilenamePattern: "/var/log/monasca/api/monasca-api-%d.log.gz"
- archivedFileCount: 5
- timeZone: UTC
- logFormat: # TODO
diff --git a/devstack/files/monasca-api/monasca-api.service b/devstack/files/monasca-api/monasca-api.service
deleted file mode 100644
index 89555e743..000000000
--- a/devstack/files/monasca-api/monasca-api.service
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-#
-
-# Startup script for the Monasca API
-
-[Unit]
-Description=Monasca API Java app
-Requires=network.target
-After=network.target kafka.service influxdb.service mysql.service
-
-[Service]
-User=mon-api
-Group=monasca
-ExecStart=/usr/bin/java -Dfile.encoding=UTF-8 -Xmx128m -cp /opt/monasca/monasca-api.jar monasca.api.MonApiApplication server /etc/monasca/api-config.yml
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
diff --git a/devstack/files/monasca-log-agent/agent.conf b/devstack/files/monasca-log-agent/agent.conf
deleted file mode 100644
index f70aedd29..000000000
--- a/devstack/files/monasca-log-agent/agent.conf
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright 2016 FUJITSU LIMITED
-#
-# 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.
-#
-input {
- file {
- add_field => { "dimensions" => { "service" => "system" }}
- path => "/var/log/syslog"
- tags => ["syslog"]
- codec => multiline {
- negate => "true"
- pattern => "^%{SYSLOGTIMESTAMP}"
- what => "previous"
- }
- }
-}
-
-output {
- monasca_log_api {
- monasca_log_api_url => "%MONASCA_API_URI_V2%"
- keystone_api_url => "%KEYSTONE_AUTH_URI%"
- project_name => "mini-mon"
- username => "monasca-agent"
- password => "password"
- user_domain_name => "default"
- project_domain_name => "default"
- dimensions => [ "hostname:devstack" ]
- }
-}
diff --git a/devstack/files/monasca-log-metrics/log-metrics.conf b/devstack/files/monasca-log-metrics/log-metrics.conf
deleted file mode 100644
index e48468be6..000000000
--- a/devstack/files/monasca-log-metrics/log-metrics.conf
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 2016 FUJITSU LIMITED
-#
-# 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.
-
-
-input {
- kafka {
- bootstrap_servers => "%KAFKA_SERVICE_HOST%:%KAFKA_SERVICE_PORT%"
- topics => ["transformed-log"]
- group_id => "log-metric"
- client_id => "monasca_log_metrics"
- consumer_threads => 4
- codec => json
- }
-}
-
-
-filter {
-
- # drop logs that have not set log level
- if ![log][level] {
- drop { periodic_flush => true }
- } else {
- ruby {
- code => "
- log_level = event.get('[log][level]').downcase
- event.set('[log][level]', log_level)
- "
- }
- }
-
- # drop logs with log level not in warning,error
- if [log][level] not in [warning,error] {
- drop { periodic_flush => true }
- }
-
- ruby {
- code => "
- log_level = event.get('[log][level]').downcase
- log_ts = Time.now.to_f * 1000.0
-
- # metric name
- metric_name = 'log.%s' % log_level
-
- # build metric
- metric = {}
- metric['name'] = metric_name
- metric['timestamp'] = log_ts
- metric['value'] = 1
- metric['dimensions'] = event.get('[log][dimensions]')
- metric['value_meta'] = {}
-
- event.set('[metric]',metric.to_hash)
- "
- }
-
- mutate {
- remove_field => ["log", "@version", "@timestamp", "log_level_original", "tags"]
- }
-
-}
-
-
-output {
- kafka {
- bootstrap_servers => "%KAFKA_SERVICE_HOST%:%KAFKA_SERVICE_PORT%"
- topic_id => "metrics"
- client_id => "monasca_log_metrics"
- compression_type => "none"
- codec => json
- }
-}
diff --git a/devstack/files/monasca-log-persister/persister.conf b/devstack/files/monasca-log-persister/persister.conf
deleted file mode 100644
index 3ab01a5c0..000000000
--- a/devstack/files/monasca-log-persister/persister.conf
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Copyright 2016 FUJITSU LIMITED
-#
-# 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.
-#
-input {
- kafka {
- bootstrap_servers => "%KAFKA_SERVICE_HOST%:%KAFKA_SERVICE_PORT%"
- codec => json
- topics => ["transformed-log"]
- group_id => "logstash-persister"
- }
-}
-
-filter {
- date {
- match => ["[log][timestamp]", "UNIX"]
- target => "@timestamp"
- }
-
- date {
- match => ["creation_time", "UNIX"]
- target => "creation_time"
- }
-
- grok {
- match => {
- "[@timestamp]" => "^(?\d{4}-\d{2}-\d{2})"
- }
- }
-
- if "dimensions" in [log] {
- ruby {
- code => "
- fieldHash = event.get('[log][dimensions]')
- fieldHash.each do |key, value|
- event.set(key,value)
- end
- "
- }
- }
-
- mutate {
- add_field => {
- "message" => "%{[log][message]}"
- "log_level" => "%{[log][level]}"
- "tenant" => "%{[meta][tenantId]}"
- "region" => "%{[meta][region]}"
- }
- remove_field => ["@version", "host", "type", "tags" ,"_index_date", "meta", "log"]
- }
-}
-
-output {
- elasticsearch {
- index => "logs-%{tenant}-%{index_date}"
- document_type => "log"
- hosts => ["%ES_SERVICE_BIND_HOST%"]
- }
-}
diff --git a/devstack/files/monasca-log-transformer/transformer.conf b/devstack/files/monasca-log-transformer/transformer.conf
deleted file mode 100644
index c284e3ee0..000000000
--- a/devstack/files/monasca-log-transformer/transformer.conf
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# Copyright 2016 FUJITSU LIMITED
-#
-# 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.
-#
-input {
- kafka {
- bootstrap_servers => "%KAFKA_SERVICE_HOST%:%KAFKA_SERVICE_PORT%"
- topics => ["log"]
- group_id => "transformer-logstash-consumer"
- codec => json
- }
-}
-
-filter {
- ruby {
- code => 'event.set("message_tmp", event.get("[log][message]")[0..49])'
- }
- grok {
- match => {
- "message_tmp" => "(?i)(?AUDIT|CRITICAL|DEBUG|INFO|TRACE|ERR(OR)?|WARN(ING)?)|\"level\":\s?(?\d{2})"
- }
- }
- if ! [log_level] {
- grok {
- match => {
- "[log][message]" => "(?i)(?AUDIT|CRITICAL|DEBUG|INFO|TRACE|ERR(OR)?|WARN(ING)?)|\"level\":\s?(?\d{2})"
- }
- }
- }
- ruby {
- init => '
- LOG_LEVELS_MAP = {
- # SYSLOG
- "warn" => "Warning",
- "err" => "Error",
- # Bunyan errcodes
- "10" => "Trace",
- "20" => "Debug",
- "30" => "Info",
- "40" => "Warning",
- "50" => "Error",
- "60" => "Fatal"
- }
- '
- code => '
- if event.get("log_level")
- # keep original value
- log_level = event.get("log_level").downcase
- if LOG_LEVELS_MAP.has_key?(log_level)
- event.set("log_level_original",event.get("log_level"))
- event.set("log_level",LOG_LEVELS_MAP[log_level])
- else
- event.set("log_level",log_level.capitalize)
- end
- else
- event.set("log_level","Unknown")
- end
- '
- }
-
- mutate {
- add_field => {
- "[log][level]" => "%{log_level}"
- }
- # remove temporary fields
- remove_field => ["message","log_level", "message_tmp"]
- }
-}
-
-output {
- kafka {
- codec => json
- bootstrap_servers => "%KAFKA_SERVICE_HOST%:%KAFKA_SERVICE_PORT%"
- topic_id => "transformed-log"
- }
-}
\ No newline at end of file
diff --git a/devstack/files/monasca-persister/persister.yml b/devstack/files/monasca-persister/persister.yml
deleted file mode 100644
index e0593957f..000000000
--- a/devstack/files/monasca-persister/persister.yml
+++ /dev/null
@@ -1,176 +0,0 @@
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
-# Copyright (c) 2017 SUSE LLC
-#
-# 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.
-#
-
-name: monasca-persister
-
-alarmHistoryConfiguration:
- batchSize: %MONASCA_PERSISTER_BATCH_SIZE%
- numThreads: 1
- maxBatchTime: %MONASCA_PERSISTER_MAX_BATCH_TIME%
- commitBatchTime: %MONASCA_PERSISTER_COMMIT_BATCH_TIME%
-# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
- topic: alarm-state-transitions
- groupId: 1_alarm-state-transitions
- consumerId: "mini-mon"
- clientId: 1
-
-metricConfiguration:
- batchSize: %MONASCA_PERSISTER_BATCH_SIZE%
- numThreads: %MONASCA_PERSISTER_METRIC_THREADS%
- maxBatchTime: %MONASCA_PERSISTER_MAX_BATCH_TIME%
- commitBatchTime: %MONASCA_PERSISTER_COMMIT_BATCH_TIME%
-# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
- topic: metrics
- groupId: 1_metrics
- consumerId: "mini-mon"
- clientId: 1
-
-#Kafka settings.
-kafkaConfig:
-# See http://kafka.apache.org/documentation.html#api for semantics and defaults.
- zookeeperConnect: "%ZOOKEEPER_HOST%:2181"
- socketTimeoutMs: 30000
- socketReceiveBufferBytes : 65536
- fetchMessageMaxBytes: 1048576
- queuedMaxMessageChunks: 10
- rebalanceMaxRetries: 4
- fetchMinBytes: 1
- fetchWaitMaxMs: 100
- rebalanceBackoffMs: 2000
- refreshLeaderBackoffMs: 200
- autoOffsetReset: largest
- consumerTimeoutMs: 1000
- zookeeperSessionTimeoutMs : 60000
- zookeeperConnectionTimeoutMs : 60000
- zookeeperSyncTimeMs: 2000
-
-# uncomment if database type is cassandra
-cassandraDbConfiguration:
- contactPoints:
- - %CASSANDRADB_HOST%
- port: 9042
- user: cassandra
- password: cassandra
- keyspace: monasca
- localDataCenter: datacenter1
- maxConnections: 5
- maxRequests: 2048
- # socket time out in milliseconds when creating a new connection
- connectionTimeout: 5000
- # how long the driver waits for a response from server. Must be
- # longer than the server side timeouts in the cassandra.yaml
- readTimeout: 60000
-
- # number of retries in upsert query. The retry interval is exponential,
- # i.e., 1, 2, 4, 8 ... seconds. Retry is blocking.
- maxWriteRetries: 5
- maxBatches: 250
- maxDefinitionCacheSize: 2000000
- # ANY(0),
- # ONE(1),
- # TWO(2),
- # THREE(3),
- # QUORUM(4),
- # ALL(5),
- # LOCAL_QUORUM(6),
- # EACH_QUORUM(7),
- # SERIAL(8),
- # LOCAL_SERIAL(9),
- # LOCAL_ONE(10);
- consistencyLevel: ONE
- # number of days metric retention
- retentionPolicy: 45
-
-verticaMetricRepoConfig:
- maxCacheSize: 2000000
-
-databaseConfiguration:
- databaseType: %MONASCA_PERSISTER_DB_TYPE%
-
-# Uncomment if databaseType is influxdb
-influxDbConfiguration:
- # Retention policy may be left blank to indicate default policy.
- retentionPolicy:
- maxHttpConnections: 100
- gzip: true
- name: "mon"
- url: "http://%INFLUXDB_HOST%:8086"
- user: "mon_persister"
- password: "password"
-
-
-# Uncomment if databaseType is vertica
-dataSourceFactory:
- driverClass: com.vertica.jdbc.Driver
- url: "jdbc:vertica://%VERTICA_HOST%:5433/mon"
- user: "mon_persister"
- password: "password"
- properties:
- ssl: false
- # the maximum amount of time to wait on an empty pool before throwing an exception
- maxWaitForConnection: 1s
- # the SQL query to run when validating a connection's liveness
- validationQuery: "/* MyService Health Check */ SELECT 1"
- # the minimum number of connections to keep open
- minSize: 8
- # the maximum number of connections to keep open
- maxSize: 41
- # whether or not idle connections should be validated
- checkConnectionWhileIdle: false
- # the maximum lifetime of an idle connection
- maxConnectionAge: 1 minute
-
-metrics:
- frequency: 1 second
-
-
-# Logging settings.
-logging:
-
- # The default level of all loggers. Can be OFF, ERROR, WARN, INFO,
- # DEBUG, TRACE, or ALL.
- level: WARN
-
- # Logger-specific levels.
- loggers:
-
- # Sets the level for 'com.example.app' to DEBUG.
- com.example.app: DEBUG
- # com.hpcloud: debug
- # com.hpcloud.mon.persister.repository: DEBUG
-
- appenders:
-
- - type: file
- threshold: INFO
- archive: true
- currentLogFilename: "%MONASCA_PERSISTER_LOG_DIR%/monasca-persister.log"
- archivedLogFilenamePattern: "%MONASCA_PERSISTER_LOG_DIR%/monasca-persister.log-%d.log.gz"
- archivedFileCount: 5
- # The timezone used to format dates. HINT: USE THE DEFAULT, UTC.
- timeZone: UTC
-
-server:
- applicationConnectors:
- - type: http
- port: %MONASCA_PERSISTER_APP_PORT%
- bindHost: %MONASCA_PERSISTER_BIND_HOST%
- adminConnectors:
- - type: http
- port: %MONASCA_PERSISTER_ADMIN_PORT%
- bindHost: %MONASCA_PERSISTER_BIND_HOST%
diff --git a/devstack/files/monasca-thresh/monasca-thresh b/devstack/files/monasca-thresh/monasca-thresh
deleted file mode 100644
index dc5ce2954..000000000
--- a/devstack/files/monasca-thresh/monasca-thresh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
-#
-# 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.
-#
-
-### BEGIN INIT INFO
-# Provides: monasca-thresh
-# Required-Start: $nimbus
-# Required-Stop:
-# Default-Start: 2 3 4 5
-# Default-Stop:
-# Short-Description: Monitoring threshold engine running under storm
-# Description:
-### END INIT INFO
-
-case "$1" in
- start)
- $0 status
- if [ $? -ne 0 ]; then
- sudo -Hu mon-thresh /opt/storm/current/bin/storm jar /opt/monasca/monasca-thresh.jar monasca.thresh.ThresholdingEngine /etc/monasca/thresh-config.yml thresh-cluster
- exit $?
- else
- echo "monasca-thresh is already running"
- exit 0
- fi
- ;;
- stop)
- # On system shutdown storm is being shutdown also and this will hang so skip shutting down thresh in that case
- if [ -e '/sbin/runlevel' ]; then # upstart/sysV case
- if [ $(runlevel | cut -d\ -f 2) == 0 ]; then
- exit 0
- fi
- else # systemd case
- systemctl list-units --type=target |grep shutdown.target
- if [ $? -eq 0 ]; then
- exit 0
- fi
- fi
- sudo -Hu mon-thresh /opt/storm/current/bin/storm kill thresh-cluster
- # The above command returns but actually takes awhile loop watching status
- while true; do
- sudo -Hu mon-thresh /opt/storm/current/bin/storm list |grep thresh-cluster
- if [ $? -ne 0 ]; then break; fi
- sleep 1
- done
- ;;
- status)
- sudo -Hu mon-thresh /opt/storm/current/bin/storm list |grep thresh-cluster
- ;;
- restart)
- $0 stop
- $0 start
- ;;
-esac
diff --git a/devstack/files/monasca-thresh/thresh-config.yml b/devstack/files/monasca-thresh/thresh-config.yml
deleted file mode 100644
index 526c93686..000000000
--- a/devstack/files/monasca-thresh/thresh-config.yml
+++ /dev/null
@@ -1,145 +0,0 @@
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
-# Copyright 2017 Fujitsu LIMITED
-#
-# 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.
-#
-metricSpoutThreads: 2
-metricSpoutTasks: 2
-
-statsdConfig:
- host: "127.0.0.1"
- port: %MONASCA_STATSD_PORT%
- prefix: monasca.storm.
- dimensions: !!map
- service : monitoring
- component : storm
-
-
-metricSpoutConfig:
- kafkaConsumerConfiguration:
- # See http://kafka.apache.org/documentation.html#api for semantics and defaults.
- topic: "metrics"
- numThreads: 1
- groupId: "thresh-metric"
- zookeeperConnect: "127.0.0.1:2181"
- consumerId: 1
- socketTimeoutMs: 30000
- socketReceiveBufferBytes : 65536
- fetchMessageMaxBytes: 1048576
- autoCommitEnable: true
- autoCommitIntervalMs: 60000
- queuedMaxMessageChunks: 10
- rebalanceMaxRetries: 4
- fetchMinBytes: 1
- fetchWaitMaxMs: 100
- rebalanceBackoffMs: 2000
- refreshLeaderBackoffMs: 200
- autoOffsetReset: largest
- consumerTimeoutMs: -1
- clientId : 1
- zookeeperSessionTimeoutMs : 60000
- zookeeperConnectionTimeoutMs : 60000
- zookeeperSyncTimeMs: 2000
-
-
-eventSpoutConfig:
- kafkaConsumerConfiguration:
- # See http://kafka.apache.org/documentation.html#api for semantics and defaults.
- topic: "events"
- numThreads: 1
- groupId: "thresh-event"
- zookeeperConnect: "127.0.0.1:2181"
- consumerId: 1
- socketTimeoutMs: 30000
- socketReceiveBufferBytes : 65536
- fetchMessageMaxBytes: 1048576
- autoCommitEnable: true
- autoCommitIntervalMs: 60000
- queuedMaxMessageChunks: 10
- rebalanceMaxRetries: 4
- fetchMinBytes: 1
- fetchWaitMaxMs: 100
- rebalanceBackoffMs: 2000
- refreshLeaderBackoffMs: 200
- autoOffsetReset: largest
- consumerTimeoutMs: -1
- clientId : 1
- zookeeperSessionTimeoutMs : 60000
- zookeeperConnectionTimeoutMs : 60000
- zookeeperSyncTimeMs: 2000
-
-
-kafkaProducerConfig:
- # See http://kafka.apache.org/documentation.html#api for semantics and defaults.
- topic: "alarm-state-transitions"
- metadataBrokerList: "%KAFKA_HOST%:9092"
- serializerClass: kafka.serializer.StringEncoder
- partitionerClass:
- requestRequiredAcks: 1
- requestTimeoutMs: 10000
- producerType: sync
- keySerializerClass:
- compressionCodec: none
- compressedTopics:
- messageSendMaxRetries: 3
- retryBackoffMs: 100
- topicMetadataRefreshIntervalMs: 600000
- queueBufferingMaxMs: 5000
- queueBufferingMaxMessages: 10000
- queueEnqueueTimeoutMs: -1
- batchNumMessages: 200
- sendBufferBytes: 102400
- clientId : Threshold_Engine
-
-
-sporadicMetricNamespaces:
- - foo
-
-database:
- driverClass: %MONASCA_THRESH_DATABASE_ENGINE%
- url: "jdbc:mariadb://%DATABASE_HOST%:%DATABASE_PORT%/mon"
- user: "%DATABASE_USER%"
- password: "%DATABASE_PASSWORD%"
- properties:
- ssl: false
- # the maximum amount of time to wait on an empty pool before throwing an exception
- maxWaitForConnection: 1s
-
- # the SQL query to run when validating a connection's liveness
- validationQuery: "/* %DATABASE_TYPE% Health Check */ SELECT 1"
-
- # the minimum number of connections to keep open
- minSize: 8
-
- # the maximum number of connections to keep open
- maxSize: 41
-
- # flag indicates if Hibernate support enabled
- hibernateSupport: %MONASCA_DATABASE_USE_ORM%
-
- # hibernate provider class
- providerClass: com.zaxxer.hikari.hibernate.HikariConnectionProvider
-
- # database name
- databaseName: mon
-
- # server name/address
- serverName: %DATABASE_HOST%
-
- # server port number
- portNumber: %DATABASE_PORT%
-
- # hibernate auto configuretion parameter
- autoConfig: validate
diff --git a/devstack/files/schema/influxdb_setup.py b/devstack/files/schema/influxdb_setup.py
deleted file mode 100644
index d18beb447..000000000
--- a/devstack/files/schema/influxdb_setup.py
+++ /dev/null
@@ -1,138 +0,0 @@
-#
-# (C) Copyright 2015,2016 Hewlett Packard Enterprise Development LP
-#
-# 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.
-#
-
-"""A simple script to setup influxdb user and roles. At some point this should
- become a more full featured module. Also this assumes that none of the
- python based influxdb clients are available on this system.
-"""
-
-import json
-import sys
-
-from oslo_utils.encodeutils import safe_decode
-from oslo_utils.encodeutils import safe_encode
-from six.moves import urllib
-import six.moves.urllib.parse as urlparse
-
-ADMIN = 'root'
-ADMIN_PASS = 'root'
-DBNAME = 'mon'
-USERS = {}
-USERS['mon_api'] = 'password'
-USERS['mon_persister'] = 'password'
-
-URL = 'http://127.0.0.1:8086'
-
-SHARDSPACE_NAME = 'persister_all'
-REPLICATION = 1
-RETENTION = '90d'
-
-
-def format_response(req):
- try:
- json_value = json.loads(req.read())
- if (len(json_value['results'][0]) > 0 and
- 'series' in json_value['results'][0] and
- 'values' in json_value['results'][0]['series'][0]):
- return json_value['results'][0]['series'][0]['values']
- else:
- return []
- except KeyError:
- print("Query returned a non-successful result: {0}".format(json_value['results']))
- raise
-
-
-def influxdb_get(uri, query, db=None):
- """Runs a query via HTTP GET and returns the response as a Python list."""
-
- getparams = {"q": query}
- if db:
- getparams['db'] = db
-
- try:
- params = urlparse.urlencode(getparams)
- uri = "{}&{}".format(uri, params)
- req = urllib.request.urlopen(uri)
- return format_response(req)
-
- except KeyError:
- sys.exit(1)
-
-
-def influxdb_get_post(uri, query, db=None):
- """Runs a query using HTTP GET or POST and returns the response as a Python list.
- At some InfluxDB release several ops changed from using GET to POST. For example,
- CREATE DATABASE. To maintain backward compatibility, this function first trys the
- query using POST and if that fails it retries again using GET.
- """
-
- query_params = {"q": query}
- if db:
- query_params['db'] = db
-
- try:
- encoded_params = safe_encode(urlparse.urlencode(query_params))
- try:
- req = urllib.request.urlopen(uri, encoded_params)
- return format_response(req)
-
- except urllib.error.HTTPError:
- uri = "{}&{}".format(uri, encoded_params)
- req = urllib.request.urlopen(uri)
- return format_response(req)
-
- except KeyError:
- sys.exit(1)
-
-
-def main(argv=None):
- """If necessary, create the database, retention policy, and users"""
- auth_str = '?u=%s&p=%s' % (ADMIN, ADMIN_PASS)
- api_uri = "{0}/query{1}".format(URL, auth_str)
-
- # List current databases
- dbs = influxdb_get(uri=api_uri, query="SHOW DATABASES")
- if [DBNAME] not in dbs:
- print("Creating database '{}'".format(DBNAME))
- influxdb_get_post(uri=api_uri, query="CREATE DATABASE {0}".format(DBNAME))
- print("...created!")
-
- # Check retention policy
- policies = influxdb_get(uri=api_uri,
- query="SHOW RETENTION POLICIES ON {0}".format(DBNAME))
- if not any(pol[0] == SHARDSPACE_NAME for pol in policies):
- # Set retention policy
- policy = ("CREATE RETENTION POLICY {0} ON {1} DURATION {2} "
- "REPLICATION {3} DEFAULT".format(SHARDSPACE_NAME,
- DBNAME,
- RETENTION,
- REPLICATION)
- )
- influxdb_get_post(uri=api_uri, db=DBNAME, query=policy)
-
- # Create the users
- users = influxdb_get(uri=api_uri, query="SHOW USERS", db=DBNAME)
- for name, password in USERS.items():
- if not any(user[0] == name for user in users):
- influxdb_get_post(uri=api_uri,
- query=safe_decode("CREATE USER {0} WITH PASSWORD '{1}'"
- .format(name, password)),
- db=DBNAME)
-
-
-if __name__ == "__main__":
- sys.exit(main())
diff --git a/devstack/files/storm.yaml b/devstack/files/storm.yaml
deleted file mode 100644
index 591838395..000000000
--- a/devstack/files/storm.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
-#
-# 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.
-#
-### base
-java.library.path: "/usr/local/lib:/opt/local/lib:/usr/lib"
-storm.local.dir: "/var/storm"
-
-### zookeeper.*
-storm.zookeeper.servers:
- - "127.0.0.1"
-storm.zookeeper.port: 2181
-storm.zookeeper.retry.interval: 5000
-storm.zookeeper.retry.times: 60
-storm.zookeeper.root: /storm
-storm.zookeeper.session.timeout: 3000
-
-### supervisor.* configs are for node supervisors
-supervisor.slots.ports:
- - 6701
- - 6702
-supervisor.childopts: -Xmx256m
-
-### worker.* configs are for task workers
-worker.childopts: -Xmx1280m -XX:+UseConcMarkSweepGC -Dcom.sun.management.jmxremote
-
-### nimbus.* configs are for the master
-nimbus.seeds: ["127.0.0.1"]
-nimbus.thrift.port: 6627
-nimbus.childopts: -Xmx256m
-
-### ui.* configs are for the master
-ui.host: %STORM_UI_HOST%
-ui.port: %STORM_UI_PORT%
-ui.childopts: -Xmx768m
-
-### logviewer.* configs are for the master
-logviewer.port: %STORM_LOGVIEWER_PORT%
-logviewer.childopts: -Xmx128m
-
-### drpc.* configs
-
-### transactional.* configs
-transactional.zookeeper.servers:
- - "127.0.0.1"
-transactional.zookeeper.port: 2181
-transactional.zookeeper.root: /storm-transactional
-
-### topology.* configs are for specific executing storms
-topology.acker.executors: 1
-topology.debug: False
diff --git a/devstack/files/vertica/mon_alarms.sql b/devstack/files/vertica/mon_alarms.sql
deleted file mode 100644
index 518d7af13..000000000
--- a/devstack/files/vertica/mon_alarms.sql
+++ /dev/null
@@ -1,14 +0,0 @@
-CREATE SCHEMA MonAlarms;
-
-CREATE TABLE MonAlarms.StateHistory(
- id AUTO_INCREMENT,
- tenant_id VARCHAR,
- alarm_id VARCHAR,
- metrics VARCHAR (65000),
- old_state VARCHAR,
- new_state VARCHAR,
- sub_alarms VARCHAR (65000),
- reason VARCHAR(65000),
- reason_data VARCHAR(65000),
- time_stamp TIMESTAMP NOT NULL
-) PARTITION BY EXTRACT('year' FROM time_stamp)*10000 + EXTRACT('month' FROM time_stamp)*100 + EXTRACT('day' FROM time_stamp);
diff --git a/devstack/files/vertica/mon_metrics.sql b/devstack/files/vertica/mon_metrics.sql
deleted file mode 100644
index c8b5a4ae5..000000000
--- a/devstack/files/vertica/mon_metrics.sql
+++ /dev/null
@@ -1,105 +0,0 @@
-DROP SCHEMA MonMetrics CASCADE;
-
-CREATE SCHEMA MonMetrics;
-
-CREATE TABLE MonMetrics.Measurements (
- definition_dimensions_id BINARY(20) NOT NULL,
- time_stamp TIMESTAMP NOT NULL,
- value FLOAT NOT NULL,
- value_meta VARCHAR(2048)
-) PARTITION BY EXTRACT('year' FROM time_stamp)*10000 + EXTRACT('month' FROM time_stamp)*100 + EXTRACT('day' FROM time_stamp);
-
-CREATE TABLE MonMetrics.Definitions(
- id BINARY(20) NOT NULL,
- name VARCHAR(255) NOT NULL,
- tenant_id VARCHAR(255) NOT NULL,
- region VARCHAR(255) NOT NULL,
- PRIMARY KEY(id),
- CONSTRAINT MetricsDefinitionsConstraint UNIQUE(name, tenant_id, region)
-);
-
-CREATE TABLE MonMetrics.Dimensions (
- dimension_set_id BINARY(20) NOT NULL,
- name VARCHAR(255) NOT NULL,
- value VARCHAR(255) NOT NULL,
- CONSTRAINT MetricsDimensionsConstraint UNIQUE(dimension_set_id, name, value)
-);
-
-CREATE TABLE MonMetrics.DefinitionDimensions (
- id BINARY(20) NOT NULL,
- definition_id BINARY(20) NOT NULL,
- dimension_set_id BINARY(20) NOT NULL,
- CONSTRAINT MetricsDefinitionDimensionsConstraint UNIQUE(definition_id, dimension_set_id)
- );
-
--- Projections
--- ** These are for a single node system with no k safety
-
-CREATE PROJECTION Measurements_DBD_1_rep_MonMetrics /*+createtype(D)*/
-(
- definition_dimensions_id ENCODING RLE,
- time_stamp ENCODING DELTAVAL,
- value ENCODING AUTO,
- value_meta ENCODING RLE
-)
-AS
- SELECT definition_dimensions_id,
- time_stamp,
- value,
- value_meta
- FROM MonMetrics.Measurements
- ORDER BY definition_dimensions_id,
- time_stamp,
- value_meta
-UNSEGMENTED ALL NODES;
-
-CREATE PROJECTION Definitions_DBD_2_rep_MonMetrics /*+createtype(D)*/
-(
- id ENCODING AUTO,
- name ENCODING AUTO,
- tenant_id ENCODING RLE,
- region ENCODING RLE
-)
-AS
- SELECT id,
- name,
- tenant_id,
- region
- FROM MonMetrics.Definitions
- ORDER BY region,
- tenant_id,
- name
-UNSEGMENTED ALL NODES;
-
-CREATE PROJECTION Dimensions_DBD_3_rep_MonMetrics /*+createtype(D)*/
-(
- dimension_set_id ENCODING AUTO,
- name ENCODING RLE,
- value ENCODING AUTO
-)
-AS
- SELECT dimension_set_id,
- name,
- value
- FROM MonMetrics.Dimensions
- ORDER BY name,
- value,
- dimension_set_id
-UNSEGMENTED ALL NODES;
-
-CREATE PROJECTION DefinitionDimensions_DBD_4_rep_MonMetrics /*+createtype(D)*/
-(
- id ENCODING AUTO,
- definition_id ENCODING RLE,
- dimension_set_id ENCODING AUTO
-)
-AS
- SELECT id,
- definition_id,
- dimension_set_id
- FROM MonMetrics.DefinitionDimensions
- ORDER BY definition_id,
- dimension_set_id
-UNSEGMENTED ALL NODES;
-
-select refresh('MonMetrics.Measurements, MonMetrics.Definitions, MonMetrics.Dimensions, MonMetrics.DefinitionDimensions');
diff --git a/devstack/files/vertica/roles.sql b/devstack/files/vertica/roles.sql
deleted file mode 100644
index bc9e30321..000000000
--- a/devstack/files/vertica/roles.sql
+++ /dev/null
@@ -1,18 +0,0 @@
-CREATE ROLE monasca_persister;
-CREATE ROLE monasca_api;
-
-GRANT USAGE ON SCHEMA MonMetrics TO monasca_persister;
-GRANT USAGE ON SCHEMA MonAlarms TO monasca_persister;
-GRANT ALL ON TABLE MonMetrics.Measurements TO monasca_persister;
-GRANT ALL ON TABLE MonMetrics.Definitions TO monasca_persister;
-GRANT ALL ON TABLE MonMetrics.Dimensions TO monasca_persister;
-GRANT ALL ON TABLE MonMetrics.DefinitionDimensions TO monasca_persister;
-GRANT ALL ON TABLE MonAlarms.StateHistory TO monasca_persister;
-
-GRANT USAGE ON SCHEMA MonMetrics TO monasca_api;
-GRANT USAGE ON SCHEMA MonAlarms TO monasca_api;
-GRANT SELECT ON TABLE MonMetrics.Measurements TO monasca_api;
-GRANT SELECT ON TABLE MonMetrics.Definitions TO monasca_api;
-GRANT SELECT ON TABLE MonMetrics.Dimensions TO monasca_api;
-GRANT SELECT ON TABLE MonMetrics.DefinitionDimensions TO monasca_api;
-GRANT ALL ON TABLE MonAlarms.StateHistory TO monasca_api;
diff --git a/devstack/files/vertica/users.sql b/devstack/files/vertica/users.sql
deleted file mode 100644
index f19413548..000000000
--- a/devstack/files/vertica/users.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-CREATE USER mon_api IDENTIFIED BY 'password';
-GRANT monasca_api TO mon_api;
-ALTER USER mon_api DEFAULT ROLE monasca_api;
-
-CREATE USER mon_persister IDENTIFIED BY 'password';
-GRANT monasca_persister TO mon_persister;
-ALTER USER mon_persister DEFAULT ROLE monasca_persister;
diff --git a/devstack/files/zookeeper/log4j.properties b/devstack/files/zookeeper/log4j.properties
deleted file mode 100644
index edce7b14a..000000000
--- a/devstack/files/zookeeper/log4j.properties
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
-# Copyright 2020 FUJITSU LIMITED
-#
-# 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.
-#
-
-# ZooKeeper Logging Configuration
-#
-
-# Format is " (, )+
-
-log4j.rootLogger=INFO, CONSOLE, ROLLINGFILE, TRACEFILE
-
-# Example: console appender only
-# log4j.rootLogger=INFO, CONSOLE
-
-# Example with rolling log file
-#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE
-
-# Example with rolling log file and tracing
-#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE
-
-#
-# Log INFO level and above messages to the console
-#
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.Threshold=INFO
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n
-
-#
-# Add ROLLINGFILE to rootLogger to get log file output
-# Log DEBUG level and above messages to a log file
-log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender
-log4j.appender.ROLLINGFILE.Threshold=WARN
-log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/zookeeper.log
-
-# Max log file size of 10MB
-log4j.appender.ROLLINGFILE.MaxFileSize=10MB
-# uncomment the next line to limit number of backup files
-#log4j.appender.ROLLINGFILE.MaxBackupIndex=10
-
-log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
-log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L] - %m%n
-
-
-#
-# Add TRACEFILE to rootLogger to get log file output
-# Log DEBUG level and above messages to a log file
-log4j.appender.TRACEFILE=org.apache.log4j.FileAppender
-log4j.appender.TRACEFILE.Threshold=TRACE
-log4j.appender.TRACEFILE.File=${zookeeper.log.dir}/zookeeper_trace.log
-
-log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout
-### Notice we are including log4j's NDC here (%x)
-log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p [%t:%C{1}@%L][%x] - %m%n
diff --git a/devstack/files/zookeeper/zoo.cfg b/devstack/files/zookeeper/zoo.cfg
deleted file mode 100644
index ded5d6962..000000000
--- a/devstack/files/zookeeper/zoo.cfg
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
-#
-# 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.
-#
-# http://hadoop.apache.org/zookeeper/docs/current/zookeeperAdmin.html
-
-# The number of milliseconds of each tick
-tickTime=2000
-# The number of ticks that the initial
-# synchronization phase can take
-initLimit=10
-# The number of ticks that can pass between
-# sending a request and getting an acknowledgement
-syncLimit=5
-# the directory where the snapshot is stored.
-dataDir=/var/lib/zookeeper
-# Place the dataLogDir to a separate physical disc for better performance
-# dataLogDir=/disk2/zookeeper
-
-# the port at which the clients will connect
-clientPort=2181
-
-# Maximum number of clients that can connect from one client
-maxClientCnxns=60
-
-# specify all zookeeper servers
-# The fist port is used by followers to connect to the leader
-# The second one is used for leader election
-
-server.0=127.0.0.1:2888:3888
-
-# To avoid seeks ZooKeeper allocates space in the transaction log file in
-# blocks of preAllocSize kilobytes. The default block size is 64M. One reason
-# for changing the size of the blocks is to reduce the block size if snapshots
-# are taken more often. (Also, see snapCount).
-#preAllocSize=65536
-
-# Clients can submit requests faster than ZooKeeper can process them,
-# especially if there are a lot of clients. To prevent ZooKeeper from running
-# out of memory due to queued requests, ZooKeeper will throttle clients so that
-# there is no more than globalOutstandingLimit outstanding requests in the
-# system. The default limit is 1,000.ZooKeeper logs transactions to a
-# transaction log. After snapCount transactions are written to a log file a
-# snapshot is started and a new transaction log file is started. The default
-# snapCount is 10,000.
-#snapCount=1000
-
-# If this option is defined, requests will be will logged to a trace file named
-# traceFile.year.month.day.
-#traceFile=
-
-# Leader accepts client connections. Default value is "yes". The leader machine
-# coordinates updates. For higher update throughput at thes slight expense of
-# read throughput the leader can be configured to not accept clients and focus
-# on coordination.
-#leaderServes=yes
-
-# Autopurge every hour to avoid using lots of disk in bursts
-# Order of the next 2 properties matters.
-# autopurge.snapRetainCount must be before autopurge.purgeInterval.
-autopurge.snapRetainCount=3
-autopurge.purgeInterval=1
diff --git a/devstack/files/zookeeper/zookeeper.service b/devstack/files/zookeeper/zookeeper.service
deleted file mode 100644
index 97f2e1da0..000000000
--- a/devstack/files/zookeeper/zookeeper.service
+++ /dev/null
@@ -1,20 +0,0 @@
-[Unit]
-Description=Zookeeper Daemon
-Documentation=http://zookeeper.apache.org
-Requires=network.target
-After=network.target
-
-[Service]
-Type=forking
-WorkingDirectory=/opt/zookeeper
-User=zookeeper
-Group=zookeeper
-Environment=ZOO_LOG_DIR=/var/log/zookeeper
-ExecStart=/opt/zookeeper/bin/zkServer.sh start /opt/zookeeper/conf/zoo.cfg
-ExecStop=/opt/zookeeper/bin/zkServer.sh stop /opt/zookeeper/conf/zoo.cfg
-ExecReload=/opt/zookeeper/bin/zkServer.sh restart /opt/zookeeper/conf/zoo.cfg
-TimeoutSec=30
-Restart=on-failure
-
-[Install]
-WantedBy=default.target
diff --git a/devstack/lib/client.sh b/devstack/lib/client.sh
deleted file mode 100644
index 5ae21fd18..000000000
--- a/devstack/lib/client.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-# Copyright 2017 FUJITSU LIMITED
-#
-# 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.
-
-_XTRACE_MON_CLIENT=$(set +o | grep xtrace)
-set +o xtrace
-
-install_monascaclient() {
- if python3_enabled; then
- enable_python3_package python-monascaclient
- fi
- git_clone $MONASCA_CLIENT_REPO $MONASCA_CLIENT_DIR $MONASCA_CLIENT_BRANCH
- setup_dev_lib "python-monascaclient"
-
- # install completion file
- monasca complete > /tmp/monasca.bash_completion
- sudo install -D -m 0644 -o $STACK_USER /tmp/monasca.bash_completion $MONASCA_COMPLETION_FILE
- rm -rf /tmp/monasca.bash_completion
-}
-
-clean_monascaclient() {
- sudo rm -rf $MONASCA_COMPLETION_FILE
-}
-
-${_XTRACE_MON_CLIENT}
diff --git a/devstack/lib/constants.sh b/devstack/lib/constants.sh
deleted file mode 100644
index d829aa33a..000000000
--- a/devstack/lib/constants.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-# Copyright 2017 FUJITSU LIMITED
-#
-# 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.
-
-_XTRACE_MON_CONST=$(set +o | grep xtrace)
-set +o xtrace
-
-# Location of python-monascaclient completion file
-MONASCA_COMPLETION_FILE=/etc/bash_completion.d/monasca.bash_completion
-
-# Location of monasca-profile
-MONASCA_PROFILE_FILE=/etc/profile.d/monasca.sh
-
-# monasca_service_type, used in:
-# keystone endpoint creation
-# configuration files
-MONASCA_SERVICE_TYPE=monitoring
-
-${_XTRACE_MON_CONST}
diff --git a/devstack/lib/monasca-log.sh b/devstack/lib/monasca-log.sh
deleted file mode 100644
index 5b8a86c1d..000000000
--- a/devstack/lib/monasca-log.sh
+++ /dev/null
@@ -1,804 +0,0 @@
-#!/bin/bash
-
-#
-# Copyright 2016-2017 FUJITSU LIMITED
-#
-# 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.
-#
-
-_XTRACE_MON_LOG=$(set +o | grep xtrace)
-set +o xtrace
-
-_ERREXIT_MON_LOG=$(set +o | grep errexit)
-set -o errexit
-
-# configuration bits of various services
-LOG_PERSISTER_DIR=$DEST/monasca-log-persister
-LOG_TRANSFORMER_DIR=$DEST/monasca-log-transformer
-LOG_METRICS_DIR=$DEST/monasca-log-metrics
-LOG_AGENT_DIR=$DEST/monasca-log-agent
-
-ELASTICSEARCH_DIR=$DEST/elasticsearch
-ELASTICSEARCH_CFG_DIR=$ELASTICSEARCH_DIR/config
-ELASTICSEARCH_LOG_DIR=$LOGDIR/elasticsearch
-ELASTICSEARCH_DATA_DIR=$DATA_DIR/elasticsearch
-
-KIBANA_DIR=$DEST/kibana
-KIBANA_CFG_DIR=$KIBANA_DIR/config
-KIBANA_DEV_DIR=$DEST/kibana_dev
-KIBANA_DEV_NODE_JS_VERSION=${KIBANA_DEV_NODE_JS_VERSION:-"10.15.2"}
-
-LOGSTASH_DIR=$DEST/logstash
-LOGSTASH_DATA_DIR=$DEST/logstash-data
-
-ES_SERVICE_BIND_HOST=${ES_SERVICE_BIND_HOST:-${SERVICE_HOST}}
-ES_SERVICE_BIND_PORT=${ES_SERVICE_BIND_PORT:-9200}
-ES_SERVICE_PUBLISH_HOST=${ES_SERVICE_PUBLISH_HOST:-${SERVICE_HOST}}
-ES_SERVICE_PUBLISH_PORT=${ES_SERVICE_PUBLISH_PORT:-9300}
-
-KIBANA_SERVICE_HOST=${KIBANA_SERVICE_HOST:-${SERVICE_HOST}}
-KIBANA_SERVICE_PORT=${KIBANA_SERVICE_PORT:-5601}
-KIBANA_SERVER_BASE_PATH=${KIBANA_SERVER_BASE_PATH:-"/dashboard/monitoring/logs_proxy"}
-
-# Settings needed for Elasticsearch
-# Elasticsearch uses a lot of file descriptors or file handles.
-# Increase the limit on the number of open files descriptors for the user running Elasticsearch to 65,536 or higher.
-LIMIT_NOFILE=${LIMIT_NOFILE:-65535}
-# Elasticsearch uses a mmapfs directory by default to store its indices.
-# The default operating system limits on mmap counts is likely to be too low,
-# which may result in out of memory exceptions, increase to at least 262144.
-VM_MAX_MAP_COUNT=${VM_MAX_MAP_COUNT:-262144}
-
-MONASCA_LOG_API_BASE_URI=https://${MONASCA_API_BASE_URI}/logs
-
-
-run_process_sleep() {
- local name=$1
- local cmd=$2
- local sleepTime=${3:-1}
- run_process "$name" "$cmd"
- sleep ${sleepTime}
-}
-
-is_logstash_required() {
- is_service_enabled monasca-log-persister \
- || is_service_enabled monasca-log-transformer \
- || is_service_enabled monasca-log-metrics \
- || is_service_enabled monasca-log-agent \
- && return 0
-}
-
-# TOP_LEVEL functions called from devstack coordinator
-###############################################################################
-function pre_install_logs_services {
- install_elk
- install_nodejs
- install_gate_config_holder
-}
-
-function install_monasca_log {
- configure_nvm
- configure_yarn
- build_kibana_plugin
- install_log_agent
- if $USE_OLD_LOG_API = true; then
- install_old_log_api
- fi
-}
-
-function install_elk {
- install_logstash
- install_elasticsearch
- install_kibana
-}
-
-function install_gate_config_holder {
- sudo install -d -o $STACK_USER $GATE_CONFIGURATION_DIR
-}
-
-function install_monasca_statsd {
- if use_library_from_git "monasca-statsd"; then
- git_clone_by_name "monasca-statsd"
- setup_dev_lib "monasca-statsd"
- fi
-}
-
-function configure_monasca_log {
- configure_kafka
- configure_elasticsearch
- configure_kibana
- install_kibana_plugin
- if $USE_OLD_LOG_API = true; then
- configure_old_monasca_log_api
- fi
- configure_monasca_log_api
- configure_monasca_log_transformer
- configure_monasca_log_metrics
- configure_monasca_log_persister
- configure_monasca_log_agent
-
-
-}
-
-function init_monasca_log {
- enable_log_management
-}
-
-function init_monasca_grafana_dashboards {
- if is_service_enabled horizon; then
- echo_summary "Init Grafana dashboards"
-
- sudo python "${PLUGIN_FILES}"/grafana/grafana.py "${PLUGIN_FILES}"/grafana/dashboards.d
- fi
-}
-
-function install_old_log_api {
-
- if python3_enabled; then
- enable_python3_package monasca-log-api
- fi
-
- echo_summary "Installing monasca-log-api"
-
- git_clone $MONASCA_LOG_API_REPO $MONASCA_LOG_API_DIR $MONASCA_LOG_API_BRANCH
- setup_develop $MONASCA_LOG_API_DIR
-
- install_keystonemiddleware
- install_monasca_statsd
-
- if [ "$MONASCA_LOG_API_DEPLOY" == "mod_wsgi" ]; then
- install_apache_wsgi
- elif [ "$MONASCA_LOG_API_DEPLOY" == "uwsgi" ]; then
- pip_install uwsgi
- else
- pip_install gunicorn
- fi
-
- if [ "$MONASCA_LOG_API_DEPLOY" != "gunicorn" ]; then
- if is_ssl_enabled_service "monasca-log-api"; then
- enable_mod_ssl
- fi
- fi
-
-}
-
-
-function configure_old_monasca_log_api {
- MONASCA_LOG_API_BIN_DIR=$(get_python_exec_prefix)
- MONASCA_LOG_API_WSGI=$MONASCA_LOG_API_BIN_DIR/monasca-log-api-wsgi
-
- if is_service_enabled monasca-log-api; then
- echo_summary "Configuring monasca-log-api"
- rm -rf $MONASCA_LOG_API_UWSGI_CONF
- install -m 600 $MONASCA_LOG_API_DIR/etc/monasca/log-api-uwsgi.ini $MONASCA_LOG_API_UWSGI_CONF
-
- write_uwsgi_config "$MONASCA_LOG_API_UWSGI_CONF" "$MONASCA_LOG_API_WSGI" "/logs"
-
- fi
-}
-
-function configure_old_monasca_log_api_core {
- # Put config files in ``$MONASCA_LOG_API_CONF_DIR`` for everyone to find
- sudo install -d -o $STACK_USER $MONASCA_LOG_API_CONF_DIR
- sudo install -m 700 -d -o $STACK_USER $MONASCA_LOG_API_CACHE_DIR
- sudo install -d -o $STACK_USER $MONASCA_LOG_API_LOG_DIR
-
- # ensure fresh installation of configuration files
- rm -rf $MONASCA_LOG_API_CONF $MONASCA_LOG_API_PASTE $MONASCA_LOG_API_LOGGING_CONF
-
- $MONASCA_LOG_API_BIN_DIR/oslo-config-generator \
- --config-file $MONASCA_LOG_API_DIR/config-generator/monasca-log-api.conf \
- --output-file /tmp/monasca-log-api.conf
-
- install -m 600 /tmp/monasca-log-api.conf $MONASCA_LOG_API_CONF && rm -rf /tmp/monasca-log-api.conf
- install -m 600 $MONASCA_LOG_API_DIR/etc/monasca/log-api-paste.ini $MONASCA_LOG_API_PASTE
- install -m 600 $MONASCA_LOG_API_DIR/etc/monasca/log-api-logging.conf $MONASCA_LOG_API_LOGGING_CONF
-
- # configure monasca-log-api.conf
- iniset "$MONASCA_LOG_API_CONF" DEFAULT log_config_append $MONASCA_LOG_API_LOGGING_CONF
- iniset "$MONASCA_LOG_API_CONF" service region $REGION_NAME
-
- iniset "$MONASCA_LOG_API_CONF" log_publisher kafka_url $KAFKA_SERVICE_HOST:$KAFKA_SERVICE_PORT
- iniset "$MONASCA_LOG_API_CONF" log_publisher topics log
-
- iniset "$MONASCA_LOG_API_CONF" kafka_healthcheck kafka_url $KAFKA_SERVICE_HOST:$KAFKA_SERVICE_PORT
- iniset "$MONASCA_LOG_API_CONF" kafka_healthcheck kafka_topics log
-
- iniset "$MONASCA_LOG_API_CONF" roles_middleware path "/v2.0/log"
- iniset "$MONASCA_LOG_API_CONF" roles_middleware default_roles monasca-user
- iniset "$MONASCA_LOG_API_CONF" roles_middleware agent_roles monasca-agent
- iniset "$MONASCA_LOG_API_CONF" roles_middleware delegate_roles admin
-
- # configure keystone middleware
- configure_auth_token_middleware "$MONASCA_LOG_API_CONF" "admin" $MONASCA_LOG_API_CACHE_DIR
- iniset "$MONASCA_LOG_API_CONF" keystone_authtoken region_name $REGION_NAME
- iniset "$MONASCA_LOG_API_CONF" keystone_authtoken project_name "admin"
- iniset "$MONASCA_LOG_API_CONF" keystone_authtoken password $ADMIN_PASSWORD
-
- # insecure
- if is_service_enabled tls-proxy; then
- iniset "$MONASCA_LOG_API_CONF" keystone_authtoken insecure False
- fi
-
- # configure log-api-paste.ini
- iniset "$MONASCA_LOG_API_PASTE" server:main bind $MONASCA_LOG_API_SERVICE_HOST:$MONASCA_LOG_API_SERVICE_PORT
- iniset "$MONASCA_LOG_API_PASTE" server:main chdir $MONASCA_LOG_API_DIR
- iniset "$MONASCA_LOG_API_PASTE" server:main workers $API_WORKERS
-}
-
-function init_agent {
- echo_summary "Init Monasca agent"
-
- sudo cp -f "${PLUGIN_FILES}"/monasca-agent/http_check.yaml /etc/monasca/agent/conf.d/http_check.yaml
- sudo cp -f "${PLUGIN_FILES}"/monasca-agent/process.yaml /etc/monasca/agent/conf.d/process.yaml
- sudo cp -f "${PLUGIN_FILES}"/monasca-agent/elastic.yaml /etc/monasca/agent/conf.d/elastic.yaml
-
- sudo sed -i "s/{{IP}}/$(ip -o -4 addr list eth1 | awk '{print $4}' | cut -d/ -f1 | head -1)/" /etc/monasca/agent/conf.d/*.yaml
- sudo sed -i "s/127\.0\.0\.1/$(hostname)/" /etc/monasca/agent/conf.d/*.yaml
- sudo systemctl restart monasca-collector
-}
-
-function stop_monasca_log {
- stop_process "monasca-log-agent" || true
- stop_monasca_log_api
- stop_process "monasca-log-metrics" || true
- stop_process "monasca-log-persister" || true
- stop_process "monasca-log-transformer" || true
- stop_process "kibana" || true
- stop_process "elasticsearch" || true
-}
-
-function start_monasca_log {
- start_elasticsearch
- start_kibana
- start_monasca_log_transformer
- start_monasca_log_metrics
- start_monasca_log_persister
- if $USE_OLD_LOG_API = true; then
- start_monasca_log_api
- fi
- start_monasca_log_agent
-}
-
-function clean_monasca_log {
- clean_monasca_log_agent
- clean_monasca_log_api
- clean_monasca_log_persister
- clean_monasca_log_transformer
- clean_kibana
- clean_elasticsearch
- clean_logstash
- clean_nodejs
- clean_nvm
- clean_yarn
- clean_gate_config_holder
-}
-###############################################################################
-
-function configure_monasca_log_api {
- if is_service_enabled monasca-log; then
- echo_summary "Configuring monasca-api"
- iniset "$MONASCA_API_CONF" DEFAULT enable_logs_api "true"
- iniset "$MONASCA_API_CONF" kafka logs_topics "log"
-
- create_log_management_accounts
- fi
-}
-
-function install_logstash {
- if is_logstash_required; then
- echo_summary "Installing Logstash ${LOGSTASH_VERSION}"
-
- local logstash_tarball=logstash-oss-${LOGSTASH_VERSION}.tar.gz
- local logstash_url=https://artifacts.elastic.co/downloads/logstash/${logstash_tarball}
-
- local logstash_dest
- logstash_dest=`get_extra_file ${logstash_url}`
-
- tar xzf ${logstash_dest} -C $DEST
-
- sudo chown -R $STACK_USER $DEST/logstash-${LOGSTASH_VERSION}
- sudo ln -sf $DEST/logstash-${LOGSTASH_VERSION} $LOGSTASH_DIR
-
- sudo mkdir -p $LOGSTASH_DATA_DIR
- sudo chown $STACK_USER:monasca $LOGSTASH_DATA_DIR
- fi
-}
-
-function clean_logstash {
- if is_logstash_required; then
- echo_summary "Cleaning Logstash ${LOGSTASH_VERSION}"
-
- sudo rm -rf $LOGSTASH_DIR || true
- sudo rm -rf $FILES/logstash-${LOGSTASH_VERSION}.tar.gz || true
- sudo rm -rf $DEST/logstash-${LOGSTASH_VERSION} || true
- fi
-}
-
-function install_elasticsearch {
- if is_service_enabled elasticsearch; then
- echo_summary "Installing ElasticSearch ${ELASTICSEARCH_VERSION}"
-
- local es_tarball=elasticsearch-oss-${ELASTICSEARCH_VERSION}-linux-x86_64.tar.gz
- local es_url=https://artifacts.elastic.co/downloads/elasticsearch/${es_tarball}
-
- local es_dest
- es_dest=`get_extra_file ${es_url}`
-
- tar xzf ${es_dest} -C $DEST
-
- sudo chown -R $STACK_USER $DEST/elasticsearch-${ELASTICSEARCH_VERSION}
- sudo ln -sf $DEST/elasticsearch-${ELASTICSEARCH_VERSION} $ELASTICSEARCH_DIR
- fi
-}
-
-function configure_elasticsearch {
- if is_service_enabled elasticsearch; then
- echo_summary "Configuring ElasticSearch ${ELASTICSEARCH_VERSION}"
-
- local templateDir=$ELASTICSEARCH_CFG_DIR/templates
-
- for dir in $ELASTICSEARCH_LOG_DIR $templateDir $ELASTICSEARCH_DATA_DIR; do
- sudo install -m 755 -d -o $STACK_USER $dir
- done
-
- sudo cp -f "${PLUGIN_FILES}"/elasticsearch/elasticsearch.yml $ELASTICSEARCH_CFG_DIR/elasticsearch.yml
- sudo chown -R $STACK_USER $ELASTICSEARCH_CFG_DIR/elasticsearch.yml
- sudo chmod 0644 $ELASTICSEARCH_CFG_DIR/elasticsearch.yml
-
- sudo sed -e "
- s|%ES_SERVICE_BIND_HOST%|$ES_SERVICE_BIND_HOST|g;
- s|%ES_SERVICE_BIND_PORT%|$ES_SERVICE_BIND_PORT|g;
- s|%ES_DATA_DIR%|$ELASTICSEARCH_DATA_DIR|g;
- s|%ES_LOG_DIR%|$ELASTICSEARCH_LOG_DIR|g;
- " -i $ELASTICSEARCH_CFG_DIR/elasticsearch.yml
-
- sudo ln -sf $ELASTICSEARCH_CFG_DIR/elasticsearch.yml $GATE_CONFIGURATION_DIR/elasticsearch.yml
-
- echo "[Service]" | sudo tee --append /etc/systemd/system/devstack\@elasticsearch.service > /dev/null
- echo "LimitNOFILE=$LIMIT_NOFILE" | sudo tee --append /etc/systemd/system/devstack\@elasticsearch.service > /dev/null
-
- echo "vm.max_map_count=$VM_MAX_MAP_COUNT" | sudo tee --append /etc/sysctl.conf > /dev/null
- sudo sysctl -w vm.max_map_count=$VM_MAX_MAP_COUNT
- fi
-}
-
-function clean_elasticsearch {
- if is_service_enabled elasticsearch; then
- echo_summary "Cleaning Elasticsearch ${ELASTICSEARCH_VERSION}"
-
- sudo rm -rf ELASTICSEARCH_DIR || true
- sudo rm -rf ELASTICSEARCH_CFG_DIR || true
- sudo rm -rf ELASTICSEARCH_LOG_DIR || true
- sudo rm -rf ELASTICSEARCH_DATA_DIR || true
- sudo rm -rf $FILES/elasticsearch-${ELASTICSEARCH_VERSION}.tar.gz || true
- sudo rm -rf $DEST/elasticsearch-${ELASTICSEARCH_VERSION} || true
- fi
-}
-
-function start_elasticsearch {
- if is_service_enabled elasticsearch; then
- echo_summary "Starting ElasticSearch ${ELASTICSEARCH_VERSION}"
- # 5 extra seconds to ensure that ES started properly
- local esSleepTime=${ELASTICSEARCH_SLEEP_TIME:-5}
- run_process_sleep "elasticsearch" "$ELASTICSEARCH_DIR/bin/elasticsearch -E logger.org.elasticsearch=DEBUG" $esSleepTime
- fi
-}
-
-function _get_kibana_version_name {
- echo "kibana-${KIBANA_VERSION}-linux-x86_64"
-}
-
-function _get_kibana_oss_version_name {
- echo "kibana-oss-${KIBANA_VERSION}-linux-x86_64"
-}
-
-function install_kibana {
- if is_service_enabled kibana; then
- echo_summary "Installing Kibana ${KIBANA_VERSION}"
-
- local kibana_oss_version_name
- kibana_oss_version_name=`_get_kibana_oss_version_name`
- local kibana_tarball=${kibana_oss_version_name}.tar.gz
- local kibana_tarball_url=https://artifacts.elastic.co/downloads/kibana/${kibana_tarball}
- local kibana_tarball_dest
- kibana_tarball_dest=`get_extra_file ${kibana_tarball_url}`
-
- tar xzf ${kibana_tarball_dest} -C $DEST
-
- local kibana_version_name
- kibana_version_name=`_get_kibana_version_name`
- sudo chown -R $STACK_USER $DEST/${kibana_version_name}
- sudo ln -sf $DEST/${kibana_version_name} $KIBANA_DIR
- fi
-}
-
-function configure_kibana {
- if is_service_enabled kibana; then
- echo_summary "Configuring Kibana ${KIBANA_VERSION}"
-
- sudo install -m 755 -d -o $STACK_USER $KIBANA_CFG_DIR
-
- sudo cp -f "${PLUGIN_FILES}"/kibana/kibana.yml $KIBANA_CFG_DIR/kibana.yml
- sudo chown -R $STACK_USER $KIBANA_CFG_DIR/kibana.yml
- sudo chmod 0644 $KIBANA_CFG_DIR/kibana.yml
-
- sudo sed -e "
- s|%KIBANA_SERVICE_HOST%|$KIBANA_SERVICE_HOST|g;
- s|%KIBANA_SERVICE_PORT%|$KIBANA_SERVICE_PORT|g;
- s|%ES_SERVICE_BIND_HOST%|$ES_SERVICE_BIND_HOST|g;
- s|%ES_SERVICE_BIND_PORT%|$ES_SERVICE_BIND_PORT|g;
- s|%KIBANA_SERVER_BASE_PATH%|$KIBANA_SERVER_BASE_PATH|g;
- s|%KEYSTONE_AUTH_URI%|$KEYSTONE_AUTH_URI|g;
- " -i $KIBANA_CFG_DIR/kibana.yml
-
- sudo ln -sf $KIBANA_CFG_DIR/kibana.yml $GATE_CONFIGURATION_DIR/kibana.yml
- fi
-}
-
-function clean_kibana {
- if is_service_enabled kibana; then
- echo_summary "Cleaning Kibana ${KIBANA_VERSION}"
-
- local kibana_tarball
- kibana_tarball=`_get_kibana_oss_version_name`.tar.gz
- sudo rm -rf $KIBANA_DIR || true
- sudo rm -rf $FILES/${kibana_tarball} || true
- sudo rm -rf $KIBANA_CFG_DIR || true
- fi
-}
-
-function start_kibana {
- if is_service_enabled kibana; then
- echo_summary "Starting Kibana ${KIBANA_VERSION}"
- local kibanaSleepTime=${KIBANA_SLEEP_TIME:-120} # kibana takes some time to load up
- local kibanaCFG="$KIBANA_CFG_DIR/kibana.yml"
- run_process_sleep "kibana" "$KIBANA_DIR/bin/kibana --config $kibanaCFG" $kibanaSleepTime
- fi
-}
-
-function configure_nvm {
- if is_service_enabled kibana; then
- echo_summary "Configuring NVM"
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install $KIBANA_DEV_NODE_JS_VERSION
- nvm use $KIBANA_DEV_NODE_JS_VERSION
- fi
-}
-
-function configure_yarn {
- if is_service_enabled kibana; then
- echo_summary "Configuring Yarn"
- REPOS_UPDATED=False
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | \
- sudo tee /etc/apt/sources.list.d/yarn.list
- apt_get_update
- apt_get install yarn
- fi
-}
-
-function clean_nvm {
- if is_service_enabled kibana; then
- echo_summary "Cleaning NVM"
- rm -rf ~/.nvm
- rm -rf ~/.bower
- fi
-}
-
-function clean_yarn {
- if is_service_enabled kibana; then
- echo_summary "Cleaning Yarn"
- apt_get purge yarn
- fi
-}
-
-function build_kibana_plugin {
- if is_service_enabled kibana; then
- echo "Building Kibana plugin"
-
- echo_summary "Cloning and initializing Kibana development environment"
-
- git clone $KIBANA_DEV_REPO $KIBANA_DEV_DIR --branch $KIBANA_DEV_BRANCH --depth 1
-
- git_clone $MONASCA_KIBANA_PLUGIN_REPO $MONASCA_KIBANA_PLUGIN_DIR $MONASCA_KIBANA_PLUGIN_BRANCH
- cd $MONASCA_KIBANA_PLUGIN_DIR
- git_update_branch $MONASCA_KIBANA_PLUGIN_BRANCH
- cp -r $MONASCA_KIBANA_PLUGIN_DIR "$KIBANA_DEV_DIR/plugins"
- local plugin_dir="$KIBANA_DEV_DIR/plugins/monasca-kibana-plugin"
-
- yarn --cwd $KIBANA_DEV_DIR kbn bootstrap
- yarn --cwd $plugin_dir build
-
- local get_version_script="import json; obj = json.load(open('$plugin_dir/package.json')); print(obj['version'])"
- local monasca_kibana_plugin_version
- monasca_kibana_plugin_version=$(python -c "$get_version_script")
- local pkg="$plugin_dir/build/monasca-kibana-plugin-$monasca_kibana_plugin_version.zip"
- local easyPkg=$DEST/monasca-kibana-plugin.zip
- ln $pkg $easyPkg
- rm -rf $KIBANA_DEV_DIR
- fi
-}
-
-function install_kibana_plugin {
- if is_service_enabled kibana; then
- echo_summary "Install Kibana plugin"
- # note(trebskit) that needs to happen after kibana received
- # its configuration otherwise the plugin fails to be installed
- local pkg=file://$DEST/monasca-kibana-plugin.zip
- $KIBANA_DIR/bin/kibana-plugin install $pkg
- fi
-}
-
-function configure_monasca_log_persister {
- if is_service_enabled monasca-log-persister; then
- echo_summary "Configuring monasca-log-persister"
-
- sudo install -m 755 -d -o $STACK_USER $LOG_PERSISTER_DIR
-
- sudo cp -f "${PLUGIN_FILES}"/monasca-log-persister/persister.conf $LOG_PERSISTER_DIR/persister.conf
- sudo chown $STACK_USER $LOG_PERSISTER_DIR/persister.conf
- sudo chmod 0640 $LOG_PERSISTER_DIR/persister.conf
-
- sudo sed -e "
- s|%ES_SERVICE_BIND_HOST%|$ES_SERVICE_BIND_HOST|g;
- s|%KAFKA_SERVICE_HOST%|$KAFKA_SERVICE_HOST|g;
- s|%KAFKA_SERVICE_PORT%|$KAFKA_SERVICE_PORT|g;
- " -i $LOG_PERSISTER_DIR/persister.conf
-
- ln -sf $LOG_PERSISTER_DIR/persister.conf $GATE_CONFIGURATION_DIR/log-persister.conf
- fi
-}
-
-function clean_monasca_log_persister {
- if is_service_enabled monasca-log-persister; then
- echo_summary "Cleaning monasca-log-persister"
- sudo rm -rf $LOG_PERSISTER_DIR || true
- fi
-}
-
-function start_monasca_log_persister {
- if is_service_enabled monasca-log-persister; then
- echo_summary "Starting monasca-log-persister"
- local logstash="$LOGSTASH_DIR/bin/logstash"
- run_process "monasca-log-persister" "$logstash -f $LOG_PERSISTER_DIR/persister.conf --path.data $LOGSTASH_DATA_DIR/monasca-log-persister"
- fi
-}
-
-function configure_monasca_log_transformer {
- if is_service_enabled monasca-log-transformer; then
- echo_summary "Configuring monasca-log-transformer"
-
- sudo install -m 755 -d -o $STACK_USER $LOG_TRANSFORMER_DIR
-
- sudo cp -f "${PLUGIN_FILES}"/monasca-log-transformer/transformer.conf $LOG_TRANSFORMER_DIR/transformer.conf
- sudo chown $STACK_USER $LOG_TRANSFORMER_DIR/transformer.conf
- sudo chmod 0640 $LOG_TRANSFORMER_DIR/transformer.conf
-
- sudo sed -e "
- s|%KAFKA_SERVICE_HOST%|$KAFKA_SERVICE_HOST|g;
- s|%KAFKA_SERVICE_PORT%|$KAFKA_SERVICE_PORT|g;
- " -i $LOG_TRANSFORMER_DIR/transformer.conf
-
- ln -sf $LOG_TRANSFORMER_DIR/transformer.conf $GATE_CONFIGURATION_DIR/log-transformer.conf
- fi
-}
-
-function clean_monasca_log_transformer {
- if is_service_enabled monasca-log-transformer; then
- echo_summary "Cleaning monasca-log-transformer"
- sudo rm -rf $LOG_TRANSFORMER_DIR || true
- fi
-}
-
-function start_monasca_log_transformer {
- if is_service_enabled monasca-log-transformer; then
- echo_summary "Starting monasca-log-transformer"
- local logstash="$LOGSTASH_DIR/bin/logstash"
- run_process "monasca-log-transformer" "$logstash -f $LOG_TRANSFORMER_DIR/transformer.conf --path.data $LOGSTASH_DATA_DIR/monasca-log-transformer"
- fi
-}
-
-function configure_monasca_log_metrics {
- if is_service_enabled monasca-log-metrics; then
- echo_summary "Configuring monasca-log-metrics"
-
- sudo install -m 755 -d -o $STACK_USER $LOG_METRICS_DIR
-
- sudo cp -f "${PLUGIN_FILES}"/monasca-log-metrics/log-metrics.conf $LOG_METRICS_DIR/log-metrics.conf
- sudo chown $STACK_USER $LOG_METRICS_DIR/log-metrics.conf
- sudo chmod 0640 $LOG_METRICS_DIR/log-metrics.conf
-
- sudo sed -e "
- s|%KAFKA_SERVICE_HOST%|$KAFKA_SERVICE_HOST|g;
- s|%KAFKA_SERVICE_PORT%|$KAFKA_SERVICE_PORT|g;
- " -i $LOG_METRICS_DIR/log-metrics.conf
-
- ln -sf $LOG_METRICS_DIR/log-metrics.conf $GATE_CONFIGURATION_DIR/log-metrics.conf
- fi
-}
-
-function clean_monasca_log_metrics {
- if is_service_enabled monasca-log-metrics; then
- echo_summary "Cleaning monasca-log-metrics"
- sudo rm -rf $LOG_METRICS_DIR || true
- fi
-}
-
-function start_monasca_log_metrics {
- if is_service_enabled monasca-log-metrics; then
- echo_summary "Starting monasca-log-metrics"
- local logstash="$LOGSTASH_DIR/bin/logstash"
- run_process "monasca-log-metrics" "$logstash -f $LOG_METRICS_DIR/log-metrics.conf --path.data $LOGSTASH_DATA_DIR/monasca-log-metrics"
- fi
-}
-
-function install_log_agent {
- if is_service_enabled monasca-log-agent; then
- echo_summary "Installing monasca-log-agent [logstash-output-monasca-plugin]"
-
- $LOGSTASH_DIR/bin/logstash-plugin install --version \
- "${LOGSTASH_OUTPUT_MONASCA_VERSION}" logstash-output-monasca_log_api
- fi
-}
-
-function configure_monasca_log_agent {
- if is_service_enabled monasca-log-agent; then
- echo_summary "Configuring monasca-log-agent"
-
- sudo install -m 755 -d -o $STACK_USER $LOG_AGENT_DIR
-
- sudo cp -f "${PLUGIN_FILES}"/monasca-log-agent/agent.conf $LOG_AGENT_DIR/agent.conf
- sudo chown $STACK_USER $LOG_AGENT_DIR/agent.conf
- sudo chmod 0640 $LOG_AGENT_DIR/agent.conf
-
- sudo sed -e "
- s|%MONASCA_API_URI_V2%|$MONASCA_API_URI_V2|g;
- s|%KEYSTONE_AUTH_URI%|$KEYSTONE_AUTH_URI_V3|g;
- " -i $LOG_AGENT_DIR/agent.conf
-
- ln -sf $LOG_AGENT_DIR/agent.conf $GATE_CONFIGURATION_DIR/log-agent.conf
-
- fi
-}
-
-function clean_monasca_log_agent {
- if is_service_enabled monasca-log-agent; then
- echo_summary "Cleaning monasca-log-agent"
- sudo rm -rf $LOG_AGENT_DIR || true
- fi
-}
-
-
-function start_monasca_log_api {
- if is_service_enabled monasca-log-api; then
- echo_summary "Starting monasca-log-api"
-
- local service_port=$MONASCA_LOG_API_SERVICE_PORT
- local service_protocol=$MONASCA_LOG_API_SERVICE_PROTOCOL
- if is_service_enabled tls-proxy; then
- service_port=$MONASCA_LOG_API_SERVICE_PORT_INT
- service_protocol="http"
- fi
- local service_uri
-
- if [ "$MONASCA_LOG_API_DEPLOY" == "mod_wsgi" ]; then
- local enabled_site_file
- enabled_site_file=$(apache_site_config_for monasca-log-api)
- service_uri=$service_protocol://$MONASCA_LOG_API_SERVICE_HOST/logs/v3.0
- if [ -f ${enabled_site_file} ]; then
- enable_apache_site monasca-log-api
- restart_apache_server
- tail_log monasca-log-api /var/log/$APACHE_NAME/monasca-log-api.log
- fi
- elif [ "$MONASCA_LOG_API_DEPLOY" == "uwsgi" ]; then
- service_uri=$service_protocol://$MONASCA_LOG_API_SERVICE_HOST/logs/v3.0
- run_process "monasca-log-api" "$MONASCA_LOG_API_BIN_DIR/uwsgi --ini $MONASCA_LOG_API_UWSGI_CONF" ""
- else
- service_uri=$service_protocol://$MONASCA_LOG_API_SERVICE_HOST:$service_port
- run_process "monasca-log-api" "$MONASCA_LOG_API_BIN_DIR/gunicorn --paste $MONASCA_LOG_API_PASTE" ""
- fi
-
- echo "Waiting for monasca-log-api to start..."
- if ! wait_for_service $SERVICE_TIMEOUT $service_uri; then
- die $LINENO "monasca-log-api did not start"
- fi
-
- if is_service_enabled tls-proxy; then
- start_tls_proxy monasca-log-api '*' $MONASCA_LOG_API_SERVICE_PORT $MONASCA_LOG_API_SERVICE_HOST $MONASCA_LOG_API_SERVICE_PORT_INT
- fi
-
- restart_service memcached
- fi
-}
-
-function start_monasca_log_agent {
- if is_service_enabled monasca-log-agent; then
- echo_summary "Starting monasca-log-agent"
- local logstash="$LOGSTASH_DIR/bin/logstash"
- run_process "monasca-log-agent" "$logstash -f $LOG_AGENT_DIR/agent.conf --path.data $LOGSTASH_DATA_DIR/monasca-log-agent" "root" "root"
- fi
-}
-
-function clean_gate_config_holder {
- sudo rm -rf $GATE_CONFIGURATION_DIR || true
-}
-
-function configure_kafka {
- echo_summary "Configuring Kafka topics"
- for topic in ${KAFKA_SERVICE_LOG_TOPICS//,/ }; do
- /opt/kafka/bin/kafka-topics.sh --create \
- --bootstrap-server $KAFKA_SERVICE_HOST:$KAFKA_SERVICE_PORT \
- --replication-factor 1 \
- --partitions 4 \
- --topic $topic
- done
-}
-
-function delete_kafka_topics {
- echo_summary "Deleting Kafka topics"
- for topic in ${KAFKA_SERVICE_LOG_TOPICS//,/ }; do
- /opt/kafka/bin/kafka-topics.sh --delete \
- --bootstrap-server $KAFKA_SERVICE_HOST:$KAFKA_SERVICE_PORT \
- --replication-factor 1 \
- --partitions 4 \
- --topic $topic || true
- done
-}
-
-function create_log_management_accounts {
- if is_service_enabled monasca-log; then
- echo_summary "Enable Log Management in Keystone"
-
- # note(trebskit) following points to Kibana which is bad,
- # but we do not have search-api in monasca-log-api now
- # this code will be removed in future
- local log_search_url="http://$KIBANA_SERVICE_HOST:$KIBANA_SERVICE_PORT/"
-
- get_or_create_service "logs" "logs" "Monasca Log service"
-
- if $USE_OLD_LOG_API = true; then
- get_or_create_endpoint \
- "logs" \
- "$REGION_NAME" \
- "$MONASCA_LOG_API_BASE_URI" \
- "$MONASCA_LOG_API_BASE_URI" \
- "$MONASCA_LOG_API_BASE_URI"
- else
- get_or_create_endpoint \
- "logs" \
- "$REGION_NAME" \
- "$MONASCA_API_URI_V2" \
- "$MONASCA_API_URI_V2" \
- "$MONASCA_API_URI_V2"
-
- fi
-
- get_or_create_service "logs-search" "logs-search" "Monasca Log search service"
- get_or_create_endpoint \
- "logs-search" \
- "$REGION_NAME" \
- "$log_search_url" \
- "$log_search_url" \
- "$log_search_url"
-
- fi
-}
-
-#Restore errexit
-${_ERREXIT_MON_LOG}
-
-# Restore xtrace
-${_XTRACE_MON_LOG}
diff --git a/devstack/lib/notification.sh b/devstack/lib/notification.sh
deleted file mode 100644
index 8de615a97..000000000
--- a/devstack/lib/notification.sh
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/bin/bash
-
-# Copyright 2017 FUJITSU LIMITED
-#
-# 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 reqmonasca_notificationred 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.
-
-_XTRACE_MON_NOTIFICATION=$(set +o | grep xtrace)
-set +o xtrace
-
-MONASCA_NOTIFICATION_CONF_DIR=${MONASCA_NOTIFICATION_CONF_DIR:-/etc/monasca}
-MONASCA_NOTIFICATION_LOG_DIR=${MONASCA_NOTIFICATION_LOG_DIR:-/var/log/monasca/notification}
-MONASCA_NOTIFICATION_CONF=${MONASCA_NOTIFICATION_CONF:-$MONASCA_NOTIFICATION_CONF_DIR/monasca-notification.conf}
-MONASCA_NOTIFICATION_GATE_CFG_LINK=/etc/monasca-notification
-
-if [[ ${USE_VENV} = True ]]; then
- PROJECT_VENV["monasca-notification"]=${MONASCA_NOTIFICATION_DIR}.venv
- MONASCA_NOTIFICATION_BIN_DIR=${PROJECT_VENV["monasca-notification"]}/bin
-else
- MONASCA_NOTIFICATION_BIN_DIR=$(get_python_exec_prefix)
-fi
-
-is_monasca_notification_enabled() {
- is_service_enabled monasca-notification && return 0
- return 1
-}
-
-# NOTE(trebskit) ref: stack_install_service from devstack
-install_monasca-notification() {
- if ! is_monasca_notification_enabled; then
- return
- fi
- echo_summary "Installing monasca-notification"
-
- git_clone ${MONASCA_NOTIFICATION_REPO} ${MONASCA_NOTIFICATION_DIR} \
- ${MONASCA_NOTIFICATION_BRANCH}
- if python3_enabled; then
- enable_python3_package monasca-notification
- fi
- setup_develop ${MONASCA_NOTIFICATION_DIR} jira_plugin
- # see devstack/plugin.sh
- install_monasca_common
- install_monasca_statsd
- # see devstack/plugin.sh
-
- if is_service_enabled postgresql; then
- apt_get -y install libpq-dev
- pip_install_gr psycopg2
- elif is_service_enabled mysql; then
- apt_get -y install python-mysqldb libmysqlclient-dev
- pip_install_gr PyMySQL
- fi
-
- if [[ ${MONASCA_DATABASE_USE_ORM} == "True" ]]; then
- pip_install_gr sqlalchemy
- fi
-}
-
-configure_monasca-notification() {
- if ! is_monasca_notification_enabled; then
- return
- fi
-
- echo_summary "Configuring monasca-notification"
-
- sudo install -d -o $STACK_USER ${MONASCA_NOTIFICATION_CONF_DIR}
- sudo install -d -o $STACK_USER ${MONASCA_NOTIFICATION_LOG_DIR}
-
- local dbDriver
- local dbEngine
- local dbPort
- if is_service_enabled postgresql; then
- dbDriver="monasca_notification.common.repositories.postgres.pgsql_repo:PostgresqlRepo"
- dbEngine="postgres"
- dbPort=5432
- else
- dbDriver="monasca_notification.common.repositories.mysql.mysql_repo:MysqlRepo"
- dbEngine="mysql"
- dbPort=3306
- fi
- if [[ ${MONASCA_DATABASE_USE_ORM} == "True" ]]; then
- dbDriver="monasca_notification.common.repositories.orm.orm_repo:OrmRepo"
- fi
-
- iniset "${MONASCA_NOTIFICATION_CONF}" kafka url ${SERVICE_HOST}:9092
- iniset "${MONASCA_NOTIFICATION_CONF}" database repo_driver ${dbDriver}
- iniset "${MONASCA_NOTIFICATION_CONF}" email_notifier grafana_url ${SERVICE_HOST}:3000
- iniset "${MONASCA_NOTIFICATION_CONF}" keystone auth_url ${SERVICE_HOST}/identity/v3
- if is_service_enabled postgresql; then
- iniset "${MONASCA_NOTIFICATION_CONF}" postgresql host ${DATABASE_HOST}
- iniset "${MONASCA_NOTIFICATION_CONF}" postgresql port ${dbPort}
- iniset "${MONASCA_NOTIFICATION_CONF}" postgresql user ${DATABASE_USER}
- iniset "${MONASCA_NOTIFICATION_CONF}" postgresql passwd ${DATABASE_PASSWORD}
- iniset "${MONASCA_NOTIFICATION_CONF}" postgresql db mon
- else
- iniset "${MONASCA_NOTIFICATION_CONF}" mysql host ${DATABASE_HOST}
- iniset "${MONASCA_NOTIFICATION_CONF}" mysql user ${DATABASE_USER}
- iniset "${MONASCA_NOTIFICATION_CONF}" mysql passwd ${DATABASE_PASSWORD}
- iniset "${MONASCA_NOTIFICATION_CONF}" mysql db mon
- fi
- if [[ ${MONASCA_DATABASE_USE_ORM} == "True" ]]; then
- iniset "${MONASCA_NOTIFICATION_CONF}" orm url ${dbEngine}://${DATABASE_USER}:${DATABASE_PASSWORD}%${DATABASE_HOST}:${dbPort}/mon
- fi
-
- sudo install -d -o ${STACK_USER} ${MONASCA_NOTIFICATION_GATE_CFG_LINK}
- ln -sf ${MONASCA_NOTIFICATION_CONF} ${MONASCA_NOTIFICATION_GATE_CFG_LINK}
-
- echo "postfix postfix/mailname string localhost" | sudo debconf-set-selections -v
- echo "postfix postfix/main_mailer_type string 'Local only'" | sudo debconf-set-selections -v
-
-}
-
-start_monasca-notification(){
- if is_monasca_notification_enabled; then
- echo_summary "Starting monasca-notification"
- run_process "monasca-notification" "$MONASCA_NOTIFICATION_BIN_DIR/monasca-notification"
- fi
-}
-
-stop_monasca-notification(){
- if is_monasca_notification_enabled; then
- echo_summary "Stopping monasca-notification"
- stop_process "monasca-notification" || true
- fi
-}
-
-clean_monasca-notification() {
- if ! is_monasca_notification_enabled; then
- return
- fi
-
- echo_summary "Configuring monasca-notification"
-
- sudo rm -rf ${MONASCA_NOTIFICATION_CONF} ${MONASCA_NOTIFICATION_CONF_DIR} \
- ${MONASCA_NOTIFICATION_LOG_DIR} \
- ${MONASCA_NOTIFICATION_GATE_CFG_LINK}
-
- if is_service_enabled postgresql; then
- apt_get -y purge libpq-dev
- elif is_service_enabled mysql; then
- apt_get -y purge libmysqlclient-dev
- apt_get -y purge python-mysqldb
- fi
-}
-
-${_XTRACE_MON_NOTIFICATION}
diff --git a/devstack/lib/persister.sh b/devstack/lib/persister.sh
deleted file mode 100644
index 2233b7afc..000000000
--- a/devstack/lib/persister.sh
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/bin/bash
-
-# Copyright 2017 FUJITSU LIMITED
-# (C) Copyright 2017 SUSE LLC
-
-# 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 reqmonasca_PERSISTERred 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.
-
-_XTRACE_MON_PERSISTER=$(set +o | grep xtrace)
-set +o xtrace
-
-MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-python}
-
-MONASCA_PERSISTER_CONF_DIR=${MONASCA_PERSISTER_CONF_DIR:-/etc/monasca}
-MONASCA_PERSISTER_LOG_DIR=${MONASCA_PERSISTER_LOG_DIR:-/var/log/monasca/persister}
-MONASCA_PERSISTER_GATE_CONFIG=/etc/monasca-persister
-
-if [ "$MONASCA_PERSISTER_IMPLEMENTATION_LANG" == "python" ]; then
- if [[ ${USE_VENV} = True ]]; then
- PROJECT_VENV["monasca-persister"]=${MONASCA_PERSISTER_DIR}.venv
- MONASCA_PERSISTER_BIN_DIR=${PROJECT_VENV["monasca-persister"]}/bin
- else
- MONASCA_PERSISTER_BIN_DIR=$(get_python_exec_prefix)
- fi
- MONASCA_PERSISTER_CONF=${MONASCA_PERSISTER_CONF:-$MONASCA_PERSISTER_CONF_DIR/monasca-persister.conf}
- MONASCA_PERSISTER_LOGGING_CONF=${MONASCA_PERSISTER_LOGGING_CONF:-$MONASCA_PERSISTER_CONF_DIR/persister-logging.conf}
-
- M_REPO_DRIVER_BASE=monasca_persister.repositories.${MONASCA_METRICS_DB}.metrics_repository
- M_REPO_DRIVER_INFLUX=$M_REPO_DRIVER_BASE:MetricInfluxdbRepository
- M_REPO_DRIVER_CASSANDRA=$M_REPO_DRIVER_BASE:MetricCassandraRepository
-
- AH_REPO_DRIVER_BASE=monasca_persister.repositories.${MONASCA_METRICS_DB}.alarm_state_history_repository
- AH_REPO_DRIVER_INFLUX=$AH_REPO_DRIVER_BASE:AlarmStateHistInfluxdbRepository
- AH_REPO_DRIVER_CASSANDRA=$AH_REPO_DRIVER_BASE:AlarmStateHistCassandraRepository
-
- MONASCA_PERSISTER_CMD="$MONASCA_PERSISTER_BIN_DIR/monasca-persister --config-file=$MONASCA_PERSISTER_CONF"
-else
- MONASCA_PERSISTER_APP_PORT=${MONASCA_PERSISTER_APP_PORT:-8090}
- MONASCA_PERSISTER_ADMIN_PORT=${MONASCA_PERSISTER_ADMIN_PORT:-8091}
- MONASCA_PERSISTER_BIND_HOST=${MONASCA_PERSISTER_BIND_HOST:-$SERVICE_HOST}
-
- MONASCA_PERSISTER_CONF=${MONASCA_PERSISTER_CONF:-$MONASCA_PERSISTER_CONF_DIR/persister.yml}
- MONASCA_PERSISTER_JAVA_OPTS="-Dfile.encoding=UTF-8 -Xmx128m"
- MONASCA_PERSISTER_JAR="/opt/monasca/monasca-persister.jar"
- MONASCA_PERSISTER_CMD="/usr/bin/java ${MONASCA_PERSISTER_JAVA_OPTS} -cp ${MONASCA_PERSISTER_JAR} monasca.persister.PersisterApplication server ${MONASCA_PERSISTER_CONF}"
-fi
-
-if [[ "${MONASCA_METRICS_DB,,}" == 'cassandra' ]]; then
- MONASCA_PERSISTER_BATCH_SIZE=100
- MONASCA_PERSISTER_MAX_BATCH_TIME=10
- MONASCA_PERSISTER_METRIC_THREADS=2
- MONASCA_PERSISTER_COMMIT_BATCH_TIME=10000
-else
- MONASCA_PERSISTER_BATCH_SIZE=100
- MONASCA_PERSISTER_MAX_BATCH_TIME=15
- MONASCA_PERSISTER_METRIC_THREADS=10
- MONASCA_PERSISTER_COMMIT_BATCH_TIME=0
-fi
-
-is_monasca_persister_enabled() {
- is_service_enabled monasca-persister && return 0
- return 1
-}
-
-# common
-pre_monasca-persister() {
- if ! is_monasca_persister_enabled; then
- return
- fi
- sudo install -d -o ${STACK_USER} ${MONASCA_PERSISTER_GATE_CONFIG}
-}
-
-install_monasca-persister() {
- echo_summary "Installing monasca-persister"
-
- git_clone ${MONASCA_PERSISTER_REPO} ${MONASCA_PERSISTER_DIR} \
- ${MONASCA_PERSISTER_BRANCH}
-
- install_monasca_persister_$MONASCA_PERSISTER_IMPLEMENTATION_LANG
-}
-configure_monasca-persister() {
- if ! is_monasca_persister_enabled; then
- return
- fi
-
- echo_summary "Configuring monasca-persister"
-
- sudo install -d -o $STACK_USER ${MONASCA_PERSISTER_CONF_DIR}
- sudo install -d -o $STACK_USER ${MONASCA_PERSISTER_LOG_DIR}
-
- configure_monasca_persister_$MONASCA_PERSISTER_IMPLEMENTATION_LANG
-}
-start_monasca-persister() {
- if ! is_monasca_persister_enabled; then
- return
- fi
-
- local cmd=${MONASCA_PERSISTER_CMD}
- local systemd_service="devstack@monasca-persister.service"
- local unitfile="$SYSTEMD_DIR/$systemd_service"
-
- # sanity check the command
- _common_systemd_pitfalls "$cmd"
-
- # Restart monasca-persister when exited with error code
- iniset -sudo $unitfile "Service" "Restart" "on-failure"
- write_user_unit_file $systemd_service "$cmd" "" "$STACK_USER"
-
- echo_summary "Starting monasca-persister"
- $SYSTEMCTL enable $systemd_service
- $SYSTEMCTL start $systemd_service
-}
-stop_monasca-persister() {
- if ! is_monasca_persister_enabled; then
- return
- fi
- echo_summary "Stopping monasca-persister"
- stop_process "monasca-persister"
-}
-clean_monasca-persister() {
- if ! is_monasca_persister_enabled; then
- return
- fi
- echo_summary "Cleaning monasca-persister"
- clean_monasca_persister_$MONASCA_PERSISTER_IMPLEMENTATION_LANG
- rm -rf ${MONASCA_PERSISTER_GATE_CONFIG}
-}
-# common
-
-# python
-install_monasca_persister_python() {
- echo_summary "Installing monasca-persister"
- if python3_enabled; then
- enable_python3_package monasca-persister
- fi
- setup_develop ${MONASCA_PERSISTER_DIR}
-
- install_monasca_common
- if [[ "${MONASCA_METRICS_DB,,}" == 'influxdb' ]]; then
- pip_install_gr influxdb
- elif [[ "${MONASCA_METRICS_DB,,}" == 'cassandra' ]]; then
- pip_install_gr cassandra-driver
- fi
-}
-
-configure_monasca_persister_python() {
- # ensure fresh installation of configuration files
- rm -rf ${MONASCA_PERSISTER_CONF} ${MONASCA_PERSISTER_LOGGING_CONF}
-
- $MONASCA_PERSISTER_BIN_DIR/oslo-config-generator \
- --config-file $MONASCA_PERSISTER_DIR/config-generator/persister.conf \
- --output-file /tmp/monasca-persister.conf
-
- install -m 600 /tmp/monasca-persister.conf ${MONASCA_PERSISTER_CONF} && rm -rf /tmp/monasca-persister.conf
-
- # Set up logging
- iniset $MONASCA_PERSISTER_CONF DEFAULT use_syslog $SYSLOG
-
- # Format logging
- setup_logging $MONASCA_PERSISTER_CONF
- iniset $MONASCA_PERSISTER_CONF DEFAULT default_log_levels \
- "monasca_common.kafka_lib.client=INFO"
- iniset $MONASCA_PERSISTER_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
-
- iniset "$MONASCA_PERSISTER_CONF" kafka num_processors 1
-
- iniset "$MONASCA_PERSISTER_CONF" kafka_metrics uri $SERVICE_HOST:9092
- iniset "$MONASCA_PERSISTER_CONF" kafka_metrics group_id 1_metrics
- iniset "$MONASCA_PERSISTER_CONF" kafka_metrics topic metrics
- iniset "$MONASCA_PERSISTER_CONF" kafka_metrics batch_size 30
-
- iniset "$MONASCA_PERSISTER_CONF" kafka_alarm_history uri $SERVICE_HOST:9092
- iniset "$MONASCA_PERSISTER_CONF" kafka_alarm_history group_id 1_alarm-state-transitions
- iniset "$MONASCA_PERSISTER_CONF" kafka_alarm_history topic alarm-state-transitions
- iniset "$MONASCA_PERSISTER_CONF" kafka_alarm_history batch_size 1
-
- iniset "$MONASCA_PERSISTER_CONF" zookeeper uri $SERVICE_HOST:2181
-
- if [[ "${MONASCA_METRICS_DB,,}" == 'influxdb' ]]; then
- iniset "$MONASCA_PERSISTER_CONF" influxdb database_name mon
- iniset "$MONASCA_PERSISTER_CONF" influxdb ip_address ${SERVICE_HOST}
- iniset "$MONASCA_PERSISTER_CONF" influxdb port 8086
- iniset "$MONASCA_PERSISTER_CONF" influxdb password password
- iniset "$MONASCA_PERSISTER_CONF" repositories metrics_driver ${M_REPO_DRIVER_INFLUX}
- iniset "$MONASCA_PERSISTER_CONF" repositories alarm_state_history_driver ${AH_REPO_DRIVER_INFLUX}
- elif [[ "${MONASCA_METRICS_DB,,}" == 'cassandra' ]]; then
- iniset "$MONASCA_PERSISTER_CONF" cassandra contact_points ${SERVICE_HOST}
- iniset "$MONASCA_PERSISTER_CONF" cassandra port 9042
- # iniset "$MONASCA_PERSISTER_CONF" cassandra user monasca
- # iniset "$MONASCA_PERSISTER_CONF" cassandra password password
- iniset "$MONASCA_PERSISTER_CONF" cassandra keyspace monasca
- iniset "$MONASCA_PERSISTER_CONF" cassandra local_data_center datacenter1
- iniset "$MONASCA_PERSISTER_CONF" cassandra connection_timeout 5
- iniset "$MONASCA_PERSISTER_CONF" cassandra read_timeout 60
- iniset "$MONASCA_PERSISTER_CONF" cassandra max_write_retries 5
- iniset "$MONASCA_PERSISTER_CONF" cassandra max_batches 250
- iniset "$MONASCA_PERSISTER_CONF" cassandra max_definition_cache_size 1000000
- # consistency level names:
- # ANY(0),
- # ONE(1),
- # TWO(2),
- # THREE(3),
- # QUORUM(4),
- # ALL(5),
- # LOCAL_QUORUM(6),
- # EACH_QUORUM(7),
- # SERIAL(8),
- # LOCAL_SERIAL(9),
- # LOCAL_ONE(10);
- iniset "$MONASCA_PERSISTER_CONF" cassandra consistency_level ONE
- iniset "$MONASCA_PERSISTER_CONF" cassandra retention_policy 45
- iniset "$MONASCA_PERSISTER_CONF" repositories metrics_driver ${M_REPO_DRIVER_CASSANDRA}
- iniset "$MONASCA_PERSISTER_CONF" repositories alarm_state_history_driver ${AH_REPO_DRIVER_CASSANDRA}
- fi
-
- ln -sf ${MONASCA_PERSISTER_CONF} ${MONASCA_PERSISTER_GATE_CONFIG}
-}
-
-clean_monasca_persister_python() {
- rm -rf ${MONASCA_PERSISTER_CONF} ${MONASCA_PERSISTER_LOGGING_CONF}
-}
-# python
-
-# java
-install_monasca_persister_java() {
- (cd "${MONASCA_PERSISTER_DIR}"/java ; sudo mvn clean package -DskipTests)
-
- local version=""
- version="$(get_version_from_pom "${MONASCA_PERSISTER_DIR}"/java)"
- sudo cp -f "${MONASCA_PERSISTER_DIR}"/java/target/monasca-persister-${version}-shaded.jar \
- ${MONASCA_PERSISTER_JAR}
-}
-
-configure_monasca_persister_java() {
- # ensure fresh installation of configuration file
- rm -rf $MONASCA_PERSISTER_CONF
-
- install -m 600 "${MONASCA_API_DIR}"/devstack/files/monasca-persister/persister.yml ${MONASCA_PERSISTER_CONF}
- sudo sed -e "
- s|%ZOOKEEPER_HOST%|${SERVICE_HOST}|g;
- s|%VERTICA_HOST%|${SERVICE_HOST}|g;
- s|%INFLUXDB_HOST%|${SERVICE_HOST}|g;
- s|%CASSANDRADB_HOST%|${SERVICE_HOST}|g;
- s|%MONASCA_PERSISTER_DB_TYPE%|${MONASCA_METRICS_DB}|g;
- s|%MONASCA_PERSISTER_BIND_HOST%|${MONASCA_PERSISTER_BIND_HOST}|g;
- s|%MONASCA_PERSISTER_APP_PORT%|${MONASCA_PERSISTER_APP_PORT}|g;
- s|%MONASCA_PERSISTER_ADMIN_PORT%|${MONASCA_PERSISTER_ADMIN_PORT}|g;
- s|%MONASCA_PERSISTER_LOG_DIR%|${MONASCA_PERSISTER_LOG_DIR}|g;
- s|%MONASCA_PERSISTER_BATCH_SIZE%|${MONASCA_PERSISTER_BATCH_SIZE}|g;
- s|%MONASCA_PERSISTER_MAX_BATCH_TIME%|${MONASCA_PERSISTER_MAX_BATCH_TIME}|g;
- s|%MONASCA_PERSISTER_COMMIT_BATCH_TIME%|${MONASCA_PERSISTER_COMMIT_BATCH_TIME}|g;
- s|%MONASCA_PERSISTER_METRIC_THREADS%|${MONASCA_PERSISTER_METRIC_THREADS}|g;
- " -i ${MONASCA_PERSISTER_CONF}
-
- ln -sf ${MONASCA_PERSISTER_CONF} ${MONASCA_PERSISTER_GATE_CONFIG}
-}
-
-clean_monasca_persister_java() {
- rm -rf ${MONASCA_PERSISTER_CONF} ${MONASCA_PERSISTER_LOGGING_CONF} \
- ${MONASCA_PERSISTER_JAR}
-}
-# java
-
-${_XTRACE_MON_PERSISTER}
diff --git a/devstack/lib/profile.sh b/devstack/lib/profile.sh
deleted file mode 100644
index 884c2a3a7..000000000
--- a/devstack/lib/profile.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-
-# Copyright 2017 FUJITSU LIMITED
-#
-# 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.
-
-_XTRACE_MON_PROFILE=$(set +o | grep xtrace)
-set +o xtrace
-
-function install_monasca_profile {
-
- echo_summary "Install Monasca Bash Profile"
-
- touch /tmp/monasca_cli.sh
- cat > /tmp/monasca_cli.sh << EOF
-# signalize we're in shape to use monasca here
-export PS1='[\u@\h \W(monasca)]\$ '
-# set monasca client bash_completion
-source ${MONASCA_COMPLETION_FILE}
-# set OS_* variables
-source $TOP_DIR/openrc mini-mon mini-mon
-# override password for mini-mon (guy is not using SERVICE_PASSWORD)
-export OS_PASSWORD=password
-EOF
-
- if [[ "${MONASCA_METRICS_DB,,}" == 'cassandra' ]]; then
- cat >> /tmp/monasca_cli.sh << EOF
-# allow to use cassandra cli
-export CQLSH_NO_BUNDLED=true
-export CQLSH_HOST=${SERVICE_HOST}
-EOF
- fi
-
- sudo install -D -m 0644 -o ${STACK_USER} \
- /tmp/monasca_cli.sh ${MONASCA_PROFILE_FILE}
- rm /tmp/monasca_cli.sh
-}
-
-function clean_monasca_profile {
- echo_summary "Clean Monasca CLI Creds"
- sudo rm -f ${MONASCA_PROFILE_FILE}
-}
-
-${_XTRACE_DASHBOARD}
diff --git a/devstack/lib/storm.sh b/devstack/lib/storm.sh
deleted file mode 100644
index 1c899692d..000000000
--- a/devstack/lib/storm.sh
+++ /dev/null
@@ -1,166 +0,0 @@
-#!/bin/bash
-
-# Copyright 2017 FUJITSU LIMITED
-#
-# 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.
-
-# call_order:
-# - is_storm_enabled
-# - install_storm
-# - configure_storm
-# - clean_storm
-
-_XTRACE_STORM=$(set +o | grep xtrace)
-set +o xtrace
-
-STORM_USER="storm"
-STORM_GROUP="storm"
-
-STORM_DIR="/opt/storm"
-STORM_CURRENT_DIR="${STORM_DIR}/current"
-STORM_BIN="${STORM_CURRENT_DIR}/bin/storm"
-STORM_WORK_DIR="/var/storm"
-STORM_LOG_DIR="/var/log/storm"
-
-STORM_TARBALL="apache-storm-${STORM_VERSION}.tar.gz"
-STORM_TARBALL_DEST="${FILES}/${STORM_TARBALL}"
-
-STORM_NIMBUS_CMD="${STORM_BIN} nimbus"
-STORM_SUPERVISOR_CMD="${STORM_BIN} supervisor"
-STORM_UI_CMD="${STORM_BIN} ui"
-STORM_LOGVIEWER_CMD="${STORM_BIN} logviewer"
-
-function is_storm_enabled {
- [[ ,${ENABLED_SERVICES} =~ ,"monasca-storm" ]] && return 0
- return 1
-}
-
-function start_storm {
- if is_storm_enabled; then
- echo_summary "Starting storm"
-
- run_process "monasca-storm-nimbus" "${STORM_NIMBUS_CMD}" "${STORM_GROUP}" "${STORM_USER}"
- run_process "monasca-storm-supervisor" "${STORM_SUPERVISOR_CMD}" "${STORM_GROUP}" "${STORM_USER}"
- run_process "monasca-storm-ui" "${STORM_UI_CMD}" "${STORM_GROUP}" "${STORM_USER}"
- run_process "monasca-storm-logviewer" "${STORM_LOGVIEWER_CMD}" "${STORM_GROUP}" "${STORM_USER}"
- fi
-}
-
-function stop_storm {
- if is_storm_enabled; then
- echo_summary "Stopping storm"
-
- stop_process "monasca-storm-nimbus"
- stop_process "monasca-storm-supervisor"
- stop_process "monasca-storm-ui"
- stop_process "monasca-storm-logviewer"
- fi
-}
-
-function clean_storm {
- if is_storm_enabled; then
- echo_summary "Cleaning storm"
-
- sudo unlink "${DEST}/logs/storm-workers" || true
- sudo unlink "${STORM_CURRENT_DIR}/logs"|| true
- sudo unlink "${STORM_CURRENT_DIR}"|| true
-
- sudo rm -rf "${DEST}/logs/storm-workers" || true
- sudo rm -rf "${STORM_CURRENT_DIR}"|| true
- sudo rm -rf "${STORM_DIR}" || true
- sudo rm -rf "${STORM_WORK_DIR}" || true
- sudo rm -rf "${STORM_LOG_DIR}" || true
-
- sudo userdel "${STORM_USER}" || true
- sudo groupdel "${STORM_GROUP}" || true
- fi
-}
-
-function configure_storm {
- if is_storm_enabled; then
- echo_summary "Configuring storm"
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/storm.yaml "${STORM_CURRENT_DIR}/conf/storm.yaml"
- sudo chown "${STORM_USER}":"${STORM_GROUP}" "${STORM_CURRENT_DIR}/conf/storm.yaml"
- sudo chmod 0644 "${STORM_CURRENT_DIR}/conf/storm.yaml"
-
- sudo sed -e "
- s|%STORM_UI_HOST%|${STORM_UI_HOST}|g;
- s|%STORM_UI_PORT%|${STORM_UI_PORT}|g;
- s|%STORM_LOGVIEWER_PORT%|${STORM_LOGVIEWER_PORT}|g;
- " -i "${STORM_CURRENT_DIR}/conf/storm.yaml"
-
- fi
-}
-
-function install_storm {
- if is_storm_enabled; then
- echo_summary "Installing storm"
- _download_storm
- _setup_user_group
- _create_directories
- _install_storm
- fi
-}
-
-function post_storm {
- if is_storm_enabled; then
- echo "Post configuring storm"
- # if inside the gate, make the visible there too
- if [ -n "${LOGDIR}" ]; then
- sudo ln -sfd "${STORM_LOG_DIR}/workers-artifacts" "${LOGDIR}/storm-workers"
- fi
- fi
-}
-
-# helpers
-
-function _download_storm {
- local storm_tarball_url="${APACHE_ARCHIVES}storm/apache-storm-${STORM_VERSION}/${STORM_TARBALL}"
- local storm_dest
-
- storm_dest=`get_extra_file ${storm_tarball_url}`
-
- if [ "${storm_dest}" != "${STORM_TARBALL_DEST}" ]; then
- mv -f "${storm_dest}" "${STORM_TARBALL_DEST}"
- fi
-}
-
-function _setup_user_group {
- sudo groupadd --system "${STORM_GROUP}" || true
- sudo useradd --system -g "${STORM_GROUP}" "${STORM_USER}" || true
-}
-
-function _install_storm {
- # unpack (i.e. install) downloaded tarball
- sudo tar -xzf ${STORM_TARBALL_DEST} -C "${STORM_DIR}"
-
- # link the versioned folder to more suitable one
- sudo ln -sfd "${STORM_DIR}/apache-storm-${STORM_VERSION}" "${STORM_CURRENT_DIR}"
-
- # make them visible in standard location
- sudo ln -sfd "${STORM_LOG_DIR}" "${STORM_CURRENT_DIR}/logs"
-}
-
-function _create_directories {
- for dir in "${STORM_DIR}" "${STORM_WORK_DIR}" "${STORM_LOG_DIR}"; do
- if [ ! -d "${dir}" ]; then
- sudo mkdir -p "${dir}" || true
- fi
- sudo chown "${STORM_USER}":"${STORM_GROUP}" "${dir}"
- sudo chmod 0775 "${dir}"
- done
-}
-
-# helpers
-
-$_XTRACE_STORM
diff --git a/devstack/lib/ui.sh b/devstack/lib/ui.sh
deleted file mode 100644
index a48de381a..000000000
--- a/devstack/lib/ui.sh
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/bash
-
-# Copyright 2017 FUJITSU LIMITED
-#
-# 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.
-
-_XTRACE_DASHBOARD=$(set +o | grep xtrace)
-set +o xtrace
-
-function is_ui_enabled {
- is_service_enabled horizon && return 0
- return 1
-}
-
-function clean_ui {
- if is_ui_enabled; then
- rm -rf "${HORIZON_DIR}/monitoring" \
- "${HORIZON_DIR}/openstack_dashboard/local/enabled/_50_admin_add_monitoring_panel.py" \
- "${HORIZON_DIR}/openstack_dashboard/conf/monitoring_policy.json"
- fi
-}
-
-function configure_ui {
- if is_ui_enabled; then
- _link_ui_files
-
- cp $MONASCA_UI_DIR/monitoring/config/local_settings.py \
- $HORIZON_DIR/openstack_dashboard/local/local_settings.d/_50_monasca_ui_settings.py
-
- local localSettings=$HORIZON_DIR/openstack_dashboard/local/local_settings.d/_50_monasca_ui_settings.py
-
- sed -e "
- s#getattr(settings, 'GRAFANA_URL', None)#{'RegionOne': \"http:\/\/${SERVICE_HOST}:3000\", }#g;
- " -i ${localSettings}
-
- if is_service_enabled horizon && is_service_enabled kibana && is_service_enabled monasca-log; then
- echo_summary "Configure Horizon with Kibana access"
- sudo sed -e "
- s|KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://192.168.10.6:5601/')|KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://${KIBANA_SERVICE_HOST}:${KIBANA_SERVICE_PORT}/')|g;
- " -i ${localSettings}
-
- sudo sed -e "
- s|'ENABLE_LOG_MANAGEMENT_BUTTON', False|'ENABLE_LOG_MANAGEMENT_BUTTON', True|g;
- " -i ${localSettings}
- fi
- if python3_enabled; then
- DJANGO_SETTINGS_MODULE=openstack_dashboard.settings python3 "${MONASCA_BASE}"/horizon/manage.py collectstatic --noinput
- DJANGO_SETTINGS_MODULE=openstack_dashboard.settings python3 "${MONASCA_BASE}"/horizon/manage.py compress --force
- else
- DJANGO_SETTINGS_MODULE=openstack_dashboard.settings python "${MONASCA_BASE}"/horizon/manage.py collectstatic --noinput
- DJANGO_SETTINGS_MODULE=openstack_dashboard.settings python "${MONASCA_BASE}"/horizon/manage.py compress --force
- fi
- restart_service apache2 || true
- fi
-}
-
-function install_ui {
- if is_ui_enabled; then
- git_clone $MONASCA_UI_REPO $MONASCA_UI_DIR $MONASCA_UI_BRANCH
- git_clone $MONASCA_CLIENT_REPO $MONASCA_CLIENT_DIR $MONASCA_CLIENT_BRANCH
- if python3_enabled; then
- enable_python3_package monasca-ui
- fi
-
- setup_develop $MONASCA_UI_DIR
- setup_dev_lib "python-monascaclient"
-
- fi
-}
-
-function _link_ui_files {
- ln -f "${MONASCA_UI_DIR}/monitoring/enabled/_50_admin_add_monitoring_panel.py" \
- "${HORIZON_DIR}/openstack_dashboard/local/enabled/_50_admin_add_monitoring_panel.py"
- ln -f "${MONASCA_UI_DIR}/monitoring/conf/monitoring_policy.json" \
- "${HORIZON_DIR}/openstack_dashboard/conf/monitoring_policy.json"
- ln -sfF "${MONASCA_UI_DIR}"/monitoring "${HORIZON_DIR}/monitoring"
-}
-
-$_XTRACE_DASHBOARD
diff --git a/devstack/lib/zookeeper.sh b/devstack/lib/zookeeper.sh
deleted file mode 100644
index 2b16da010..000000000
--- a/devstack/lib/zookeeper.sh
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/bash
-
-# Copyright 2020 FUJITSU LIMITED
-#
-# 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.
-
-_XTRACE_ZOOKEEPER=$(set +o | grep xtrace)
-set +o xtrace
-
-function is_zookeeper_enabled {
- is_service_enabled monasca-zookeeper && return 0
- return 1
-}
-
-function clean_zookeeper {
-
- if is_zookeeper_enabled; then
- echo_summary "Cleaning Monasca Zookeeper"
-
- sudo systemctl disable zookeeper
- sudo systemctl stop zookeeper
- sudo rm -rf /var/log/zookeeper
- sudo rm -rf /var/lib/zookeeper
- sudo rm -rf /opt/zookeeper
- sudo rm -rf /opt/apache-zookeeper-${ZOOKEEPER_VERSION}-bin
- sudo rm -rf /etc/systemd/system/zookeeper.service
- sudo systemctl daemon-reload
- fi
-}
-
-function install_zookeeper {
-
- if is_zookeeper_enabled; then
- echo_summary "Install Monasca Zookeeper"
-
- local zookeeper_tarball=apache-zookeeper-${ZOOKEEPER_VERSION}-bin.tar.gz
- local zookeeper_tarball_url=${APACHE_ARCHIVES}zookeeper/zookeeper-${ZOOKEEPER_VERSION}/${zookeeper_tarball}
- local zookeeper_tarball_dest
- zookeeper_tarball_dest=`get_extra_file ${zookeeper_tarball_url}`
-
- sudo groupadd --system zookeeper || true
- sudo useradd --system -g zookeeper zookeeper || true
- sudo tar -xzf ${zookeeper_tarball_dest} -C /opt
- sudo ln -sf /opt/apache-zookeeper-${ZOOKEEPER_VERSION}-bin /opt/zookeeper
- sudo cp $PLUGIN_FILES/zookeeper/* /opt/zookeeper/conf
- sudo chown -R zookeeper:zookeeper /opt/zookeeper/
-
- sudo mkdir /var/log/zookeeper
- sudo chown -R zookeeper:zookeeper /var/log/zookeeper
-
- sudo mkdir /var/lib/zookeeper
- sudo chown -R zookeeper:zookeeper /var/lib/zookeeper
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/zookeeper/zookeeper.service /etc/systemd/system/zookeeper.service
- sudo chmod 644 /etc/systemd/system/zookeeper.service
-
- sudo systemctl daemon-reload
- sudo systemctl enable zookeeper
- sudo systemctl start zookeeper || sudo systemctl restart zookeeper
- fi
-}
-
-$_XTRACE_ZOOKEEPER
diff --git a/devstack/override-defaults b/devstack/override-defaults
deleted file mode 100644
index 5e7a0f6fa..000000000
--- a/devstack/override-defaults
+++ /dev/null
@@ -1,3 +0,0 @@
-if [[ "${MONASCA_API_IMPLEMENTATION_LANG,,}" == 'java' ]]; then
- WSGI_MODE=mod_wsgi
-fi
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
deleted file mode 100755
index c6c92e9c5..000000000
--- a/devstack/plugin.sh
+++ /dev/null
@@ -1,1555 +0,0 @@
-#
-# (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
-# Copyright 2017 FUJITSU LIMITED
-# (C) Copyright 2017 SUSE LLC
-#
-# 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.
-#
-
-# Monasca DevStack plugin
-#
-# Install and start Monasca service in devstack
-#
-# To enable Monasca in devstack add an entry to local.conf that
-# looks like
-#
-# [[local|localrc]]
-# enable_plugin monasca https://git.openstack.org/openstack/monasca-api
-#
-# By default all Monasca services are started (see
-# devstack/settings). To disable a specific service use the
-# disable_service function. For example to turn off notification:
-#
-# disable_service monasca-notification
-#
-# Several variables set in the localrc section adjust common behaviors
-# of Monasca (see within for additional settings):
-#
-# EXAMPLE VARS HERE
-
-# Save trace setting
-XTRACE=$(set +o | grep xtrace)
-set -o xtrace
-
-ERREXIT=$(set +o | grep errexit)
-set -o errexit
-
-# source lib/*
-source ${MONASCA_API_DIR}/devstack/lib/constants.sh
-source ${MONASCA_API_DIR}/devstack/lib/zookeeper.sh
-source ${MONASCA_API_DIR}/devstack/lib/ui.sh
-source ${MONASCA_API_DIR}/devstack/lib/notification.sh
-source ${MONASCA_API_DIR}/devstack/lib/profile.sh
-source ${MONASCA_API_DIR}/devstack/lib/client.sh
-source ${MONASCA_API_DIR}/devstack/lib/persister.sh
-source ${MONASCA_API_DIR}/devstack/lib/storm.sh
-source ${MONASCA_API_DIR}/devstack/lib/monasca-log.sh
-# source lib/*
-
-# Set default implementations to python
-export MONASCA_API_IMPLEMENTATION_LANG=${MONASCA_API_IMPLEMENTATION_LANG:-python}
-
-# Set default persistent layer settings
-export MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-influxdb}
-# Make sure we use ORM mapping as default if postgresql is enabled
-if is_service_enabled mysql; then
- MONASCA_DATABASE_USE_ORM=${MONASCA_DATABASE_USE_ORM:-false}
-elif is_service_enabled postgresql; then
- MONASCA_DATABASE_USE_ORM=true
-fi
-MONASCA_DATABASE_USE_ORM=$(trueorfalse False MONASCA_DATABASE_USE_ORM)
-
-# Set INFLUXDB_VERSION
-if [[ "${MONASCA_API_IMPLEMENTATION_LANG,,}" == 'java' ]]; then
-
- INFLUXDB_VERSION=${INFLUXDB_VERSION:-${INFLUXDB_JAVA_VERSION}}
-
-elif [[ "${MONASCA_API_IMPLEMENTATION_LANG,,}" == 'python' ]]; then
-
- INFLUXDB_VERSION=${INFLUXDB_VERSION:-${INFLUXDB_PYTHON_VERSION}}
-
-else
-
- echo "Found invalid value for variable MONASCA_API_IMPLEMENTATION_LANG: $MONASCA_API_IMPLEMENTATION_LANG"
- echo "Valid values for MONASCA_API_IMPLEMENTATION_LANG are \"java\" and \"python\""
- die "Please set MONASCA_API_IMPLEMENTATION_LANG to either \"java'' or \"python\""
-
-fi
-
-# monasca-api settings
-if [[ ${USE_VENV} = True ]]; then
- PROJECT_VENV["monasca-api"]=${MONASCA_API_DIR}.venv
- MONASCA_API_BIN_DIR=${PROJECT_VENV["monasca-api"]}/bin
-else
- MONASCA_API_BIN_DIR=$(get_python_exec_prefix)
-fi
-
-if [[ "${MONASCA_API_USE_MOD_WSGI}" == 'True' && "${MONASCA_API_IMPLEMENTATION_LANG}" == "python" ]]; then
- MONASCA_API_BASE_URI=${MONASCA_API_SERVICE_PROTOCOL}://${MONASCA_API_SERVICE_HOST}/metrics
-else
- MONASCA_API_BASE_URI=${MONASCA_API_SERVICE_PROTOCOL}://${MONASCA_API_SERVICE_HOST}:${MONASCA_API_SERVICE_PORT}
-fi
-
-
-MONASCA_API_URI_V2=${MONASCA_API_BASE_URI}/v2.0
-
-# Files inside this directory will be visible in gates log
-MON_API_GATE_CONFIGURATION_DIR=/etc/monasca-api
-
-function pre_install_monasca {
- echo_summary "Pre-Installing Monasca Components"
- find_nearest_apache_mirror
- install_gate_config_holder
- configure_system_encoding_format
- install_zookeeper
- install_kafka
- install_storm
-
- install_monasca_virtual_env
- install_monasca_$MONASCA_METRICS_DB
-
- pre_monasca-persister
-}
-
-function install_monasca {
-
- echo_summary "Installing Monasca"
-
- install_monasca_common_java
- if is_service_enabled monasca-persister; then
- stack_install_service monasca-persister
- fi
- if is_service_enabled monasca-notification; then
- stack_install_service monasca-notification
- fi
-
- if is_service_enabled monasca-thresh; then
- if ! is_storm_enabled; then
- die "monasca-thresh requires monasca-storm service to be enabled"
- fi
- install_monasca_thresh
- fi
-
- if is_service_enabled monasca-api; then
- if [ "$MONASCA_API_IMPLEMENTATION_LANG" == "python" ]; then
- stack_install_service monasca-api
- else
- install_monasca_api_java
- sudo systemctl enable monasca-api
- fi
- fi
-
- install_ui
-}
-
-function configure_monasca {
- echo_summary "Configuring Monasca"
-
- configure_storm
- configure_ui
- configure_monasca_api
- configure_monasca-notification
- configure_monasca-persister
- install_schema
-}
-
-function configure_system_encoding_format {
- # This is needed to build monasca-common
- export LANGUAGE=en_US.UTF-8
- export LC_ALL=en_US.UTF-8
- export LANG=en_US.UTF-8
- export LC_TYPE=en_US.UTF-8
-}
-
-function extra_monasca {
- echo_summary "Installing additional monasca components"
-
- create_accounts
- install_monasca_agent
- install_monascaclient
- install_monasca_profile
-
- if is_service_enabled horizon; then
- install_nodejs
- install_go
- install_monasca_grafana
- fi
-
- start_monasca_services
- init_collector_service
- post_storm
-
- if is_service_enabled horizon; then
- init_monasca_grafana
- fi
-}
-
-function start_monasca_services {
- start_storm
- if is_service_enabled monasca-api; then
- start_monasca_api
- fi
- start_monasca-notification
- start_monasca-persister
- if is_service_enabled monasca-thresh; then
- start_service monasca-thresh || restart_service monasca-thresh
- fi
- if is_service_enabled horizon; then
- start_service grafana-server || restart_service grafana-server
- fi
- if is_service_enabled monasca-agent; then
- sudo /usr/local/bin/monasca-reconfigure
- if is_service_enabled nova && [ "$VIRT_DRIVER" = "libvirt" ]; then
- sudo /opt/monasca-agent/bin/monasca-setup -d libvirt
- fi
- fi
-}
-
-function delete_kafka_topics {
-
- for topic in ${KAFKA_SERVICE_TOPICS//,/ }; do
- /opt/kafka/bin/kafka-topics.sh --delete \
- --bootstrap-server $KAFKA_SERVICE_HOST:$KAFKA_SERVICE_PORT \
- --replication-factor 1 \
- --partitions 3 \
- --topic $topic || true
- done
-}
-
-function unstack_monasca {
- stop_service grafana-server || true
-
- [[ -f /etc/systemd/system/monasca-agent.target ]] && stop_service monasca-agent.target || true
-
- stop_service monasca-thresh || true
-
- stop_storm
- stop_monasca-notification
- stop_monasca-persister
- stop_monasca_api
-
- delete_kafka_topics
- stop_service kafka || true
-
- stop_service influxdb || true
-
- stop_service verticad || true
-
- stop_service vertica_agent || true
-
- stop_service cassandra || true
-}
-
-function clean_monasca {
-
- set +o errexit
-
- unstack_monasca
- clean_ui
-
- if is_service_enabled horizon; then
- clean_nodejs
- clean_monasca_grafana
- clean_go
- fi
-
- if is_service_enabled monasca-agent; then
- clean_monasca_agent
- fi
- if is_service_enabled monasca-thresh; then
- clean_monasca_thresh
- fi
- clean_storm
- if is_service_enabled monasca-api; then
- clean_monasca_api_$MONASCA_API_IMPLEMENTATION_LANG
- fi
-
- clean_monasca-persister
- clean_monasca-notification
- clean_monasca_common_java
-
- clean_schema
-
- clean_monasca_profile
- clean_monascaclient
-
- clean_monasca_$MONASCA_METRICS_DB
-
- clean_kafka
-
- clean_zookeeper
-
- clean_monasca_virtual_env
-
- #Restore errexit
- set -o errexit
-}
-
-function install_monasca_virtual_env {
-
- echo_summary "Install Monasca Virtual Environment"
-
- sudo groupadd --system monasca || true
-
- sudo mkdir -p /opt/monasca || true
-
- sudo chown $STACK_USER:monasca /opt/monasca
-
- (cd /opt/monasca ; virtualenv .)
-}
-
-function clean_monasca_virtual_env {
-
- echo_summary "Clean Monasca Virtual Environment"
-
- sudo rm -rf /opt/monasca
-
- sudo groupdel monasca
-
-}
-
-function install_kafka {
-
- echo_summary "Install Monasca Kafka"
-
- local kafka_tarball=kafka_${KAFKA_VERSION}.tgz
- local kafka_tarball_url=${APACHE_ARCHIVES}kafka/${BASE_KAFKA_VERSION}/${kafka_tarball}
-
- local kafka_tarball_dest
- kafka_tarball_dest=`get_extra_file ${kafka_tarball_url}`
-
- sudo groupadd --system kafka || true
-
- sudo useradd --system -g kafka kafka || true
-
- sudo tar -xzf ${kafka_tarball_dest} -C /opt
-
- sudo ln -sf /opt/kafka_${KAFKA_VERSION} /opt/kafka
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/kafka/kafka-server-start.sh /opt/kafka_${KAFKA_VERSION}/bin/kafka-server-start.sh
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/kafka/kafka.service /etc/systemd/system/kafka.service
-
- sudo chown root:root /etc/systemd/system/kafka.service
-
- sudo chmod 644 /etc/systemd/system/kafka.service
-
- sudo mkdir -p /var/kafka || true
-
- sudo chown kafka:kafka /var/kafka
-
- sudo chmod 755 /var/kafka
-
- sudo rm -rf /var/kafka/lost+found
-
- sudo mkdir -p /var/log/kafka || true
-
- sudo chown kafka:kafka /var/log/kafka
-
- sudo chmod 755 /var/log/kafka
-
- sudo ln -sf /opt/kafka/config /etc/kafka
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/kafka/server.properties /etc/kafka/server.properties
-
- sudo chown kafka:kafka /etc/kafka/server.properties
-
- sudo chmod 644 /etc/kafka/server.properties
-
- # set kafka listeners address.
- sudo sed -i "s/listeners = PLAINTEXT:\/\/your.host.name:9092/listeners = PLAINTEXT:\/\/your.host.name:9092\nlisteners=PLAINTEXT:\/\/${SERVICE_HOST}:9092/"\
- /etc/kafka/server.properties
-
- sudo systemctl enable kafka
-
- sudo systemctl start kafka || sudo systemctl restart kafka
-
-}
-
-function clean_kafka {
-
- echo_summary "Clean Monasca Kafka"
-
- sudo rm -rf /var/kafka
-
- sudo rm -rf /var/log/kafka
-
- sudo rm -rf /etc/kafka
-
- sudo rm -rf /opt/kafka
-
- sudo systemctl disable kafka
-
- sudo rm -rf /etc/systemd/system/kafka.service
-
- sudo userdel kafka
-
- sudo groupdel kafka
-
- sudo rm -rf /opt/kafka_${KAFKA_VERSION}
-
- sudo rm -rf ${FILES}/kafka_${KAFKA_VERSION}.tgz
-
-}
-
-function install_monasca_influxdb {
-
- if is_service_enabled monasca-persister; then
- echo_summary "Install Monasca Influxdb"
-
- local influxdb_deb=influxdb_${INFLUXDB_VERSION}_amd64.deb
- local influxdb_deb_url=${INFLUXDB_DEB_URL}${influxdb_deb}
- echo "influxdb deb url: ${influxdb_deb_url}"
-
- local influxdb_deb_dest
- influxdb_deb_dest=`get_extra_file ${influxdb_deb_url}`
-
- sudo dpkg --skip-same-version -i ${influxdb_deb_dest}
-
- # Validate INFLUXDB_VERSION
- validate_version ${INFLUXDB_VERSION}
-
- if [[ $? -ne 0 ]]; then
- echo "Found invalid value for variable INFLUXDB_VERSION: $INFLUXDB_VERSION"
- echo "Valid values for INFLUXDB_VERSION must be in the form of 1.0.0"
- die "Please set INFLUXDB_VERSION to a correct value"
- fi
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/influxdb/influxdb.conf /etc/influxdb/influxdb.conf
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/influxdb/influxdb /etc/default/influxdb
-
- sudo systemctl start influxdb || sudo systemctl restart influxdb
- fi
-
-}
-
-function install_monasca_vertica {
-
- echo_summary "Install Monasca Vertica"
-
- apt_get install dialog
-
- sudo dpkg --skip-same-version -i /vagrant_home/vertica_${VERTICA_VERSION}_amd64.deb
-
- # Download Vertica JDBC driver
- # local vertica_jar=vertica-jdbc-${VERTICA_VERSION}.jar
- # local vertica_jar_url=https://my.vertica.com/client_drivers/7.2.x/${VERTICA_VERSION}/${vertica_jar}
-
- # local vertica_jar_dest
- # vertica_jar_dest=`get_extra_file ${vertica_jar_url}`
-
- # Current version of Vertica 8.0.0 doesn't support Ubuntu Xenial, so fake a version
- sudo cp -p /etc/debian_version /etc/debian_version.org
- sudo sh -c "echo 'jessie/sid' > /etc/debian_version"
-
- sudo /opt/vertica/sbin/install_vertica --hosts "127.0.0.1" --deb /vagrant_home/vertica_${VERTICA_VERSION}_amd64.deb --dba-user-password password --license CE --accept-eula --failure-threshold NONE
-
- sudo su dbadmin -c '/opt/vertica/bin/admintools -t create_db -s "127.0.0.1" -d mon -p password'
-
- # Bring back Ubuntu version
- sudo mv /etc/debian_version.org /etc/debian_version
-
- # Copy Vertica JDBC driver to /opt/monasca
- # sudo cp ${FILES}/vertica-jdbc-${VERTICA_VERSION}.jar /opt/monasca/vertica-jdbc-${VERTICA_VERSION}.jar
- sudo cp /vagrant_home/vertica-jdbc-${VERTICA_VERSION}.jar /opt/monasca/vertica-jdbc-${VERTICA_VERSION}.jar
-
-}
-
-function install_monasca_cassandra {
-
- if is_service_enabled monasca-persister; then
- echo_summary "Install Monasca Cassandra"
-
- if [[ "$OFFLINE" != "True" ]]; then
- sudo sh -c "echo 'deb [signed-by=/etc/apt/keyrings/apache-cassandra.asc] https://debian.cassandra.apache.org ${CASSANDRA_VERSION} main' > /etc/apt/sources.list.d/cassandra.sources.list"
- REPOS_UPDATED=False
- mkdir -p /etc/apt/keyrings
- curl -o /etc/apt/keyrings/apache-cassandra.asc https://downloads.apache.org/cassandra/KEYS
- PUBLIC_KEY=`sudo apt_get update 2>&1 | awk '/NO_PUBKEY/ {print $NF}'`
- if [ -n "${PUBLIC_KEY}" ]; then
- sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key ${PUBLIC_KEY}
- fi
- fi
-
- REPOS_UPDATED=False
- apt_get_update
- apt_get install cassandra
-
- if [[ ${SERVICE_HOST} ]]; then
-
- # set cassandra server listening ip address
- sudo sed -i "s/^rpc_address: localhost/rpc_address: ${SERVICE_HOST}/g" /etc/cassandra/cassandra.yaml
-
- fi
-
- # set batch size larger
- sudo sed -i "s/^batch_size_warn_threshold_in_kb: 5/batch_size_warn_threshold_in_kb: 50/g" /etc/cassandra/cassandra.yaml
-
- sudo sed -i "s/^batch_size_fail_threshold_in_kb: 50/batch_size_fail_threshold_in_kb: 500/g" /etc/cassandra/cassandra.yaml
-
- sudo service cassandra restart
-
- echo "Sleep for 15 seconds to wait starting up Cassandra"
- sleep 15s
-
- export CQLSH_NO_BUNDLED=true
-
- # always needed for Monasca api
- pip_install_gr cassandra-driver
- fi
-}
-
-function clean_monasca_influxdb {
-
- echo_summary "Clean Monasca Influxdb"
-
- sudo rm -f /etc/default/influxdb
-
- sudo rm -f /etc/influxdb/influxdb.conf
-
- sudo dpkg --purge influxdb
-
- sudo rm -rf /var/log/influxdb
-
- sudo rm -rf /tmp/influxdb
-
- sudo rm -rf /var/lib/influxdb
-
- sudo rm -rf /etc/init.d/influxdb
-
- sudo rm -rf /opt/staging/influxdb/influxdb-package
-
- sudo rm -rf /etc/influxdb
-
- sudo rm -rf /tmp/bootstrap*
-
- sudo rm -rf /run/influxdb
-
- sudo rm -f ${FILES}/influxdb_${INFLUXDB_VERSION}_amd64.deb
-
- sudo rm -f /etc/init.d/influxdb
-}
-
-function clean_monasca_vertica {
-
- echo_summary "Clean Monasca Vertica"
-
- sudo rm -rf /opt/vertica
-
- sudo dpkg --purge vertica
-
- sudo userdel dbadmin
-
- sudo groupdel verticadba
-
- sudo rm -rf /home/dbadmin
-
- apt_get purge dialog
-}
-
-function clean_monasca_cassandra {
-
- echo_summary "Clean Monasca Cassandra"
-
- apt_get purge cassandra
-
- apt_get autoremove
-
- sudo rm -rf /var/lib/cassandra
-
- sudo rm -rf /var/log/cassandra
-
- sudo rm -rf /etc/cassandra
-
- sudo rm -f /etc/apt/sources.list.d/cassandra.list
-
- sudo rm -f /etc/apt/trusted.gpg.d/cassandra.gpg
-}
-
-function install_schema {
- echo_summary "Install Monasca Schema"
-
- sudo mkdir -p $MONASCA_SCHEMA_DIR || true
- sudo chmod 0755 $MONASCA_SCHEMA_DIR
-
- install_schema_metric_database_$MONASCA_METRICS_DB
- install_schema_alarm_database
- install_schema_kafka_topics
-}
-
-function install_schema_metric_database_influxdb {
- # sudo cp -f "${MONASCA_API_DIR}"/devstack/files/schema/influxdb_setup.py $MONASCA_SCHEMA_DIR/influxdb_setup.py
- # sudo chmod 0750 $MONASCA_SCHEMA_DIR/influxdb_setup.py
- # sudo chown root:root $MONASCA_SCHEMA_DIR/influxdb_setup.py
- # if python3_enabled; then
- # sudo python3 $MONASCA_SCHEMA_DIR/influxdb_setup.py
- # else
- # sudo python $MONASCA_SCHEMA_DIR/influxdb_setup.py
- # fi
- curl --user root:root \
- -XPOST 'http://127.0.0.1:8086/query' \
- --data-urlencode 'q=CREATE DATABASE "mon"'
- curl --user root:root \
- -XPOST 'http://127.0.0.1:8086/query' \
- --data-urlencode 'db=mon' \
- --data-urlencode 'q=CREATE RETENTION POLICY "persister_all" ON mon DURATION 90d REPLICATION 1 DEFAULT'
- curl --user root:root \
- -XPOST 'http://127.0.0.1:8086/query' \
- --data-urlencode 'db=mon' \
- --data-urlencode "q=CREATE USER mon_api WITH PASSWORD 'password'"
- curl --user root:root \
- -XPOST 'http://127.0.0.1:8086/query' \
- --data-urlencode 'db=mon' \
- --data-urlencode "q=CREATE USER mon_persister WITH PASSWORD 'password'"
-}
-
-function install_schema_metric_database_vertica {
- /opt/vertica/bin/vsql -U dbadmin -w password < "${MONASCA_API_DIR}"/devstack/files/vertica/mon_metrics.sql
- /opt/vertica/bin/vsql -U dbadmin -w password < "${MONASCA_API_DIR}"/devstack/files/vertica/mon_alarms.sql
- /opt/vertica/bin/vsql -U dbadmin -w password < "${MONASCA_API_DIR}"/devstack/files/vertica/roles.sql
- /opt/vertica/bin/vsql -U dbadmin -w password < "${MONASCA_API_DIR}"/devstack/files/vertica/users.sql
-}
-
-function install_schema_metric_database_cassandra {
- if is_service_enabled monasca-persister; then
- local CASSANDRA_CONNECT_TIMEOUT=300
- local CASSANDRA_REQUEST_TIMEOUT=300
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/cassandra/*.cql $MONASCA_SCHEMA_DIR
- /usr/bin/cqlsh ${SERVICE_HOST} -f $MONASCA_SCHEMA_DIR/monasca_schema.cql \
- --connect-timeout="${CASSANDRA_CONNECT_TIMEOUT}" \
- --request-timeout="${CASSANDRA_REQUEST_TIMEOUT}"
- fi
-}
-
-function install_schema_kafka_topics {
- sudo mkdir -p /opt/kafka/logs || true
- sudo chown kafka:kafka /opt/kafka/logs
- sudo chmod 0766 /opt/kafka/logs
- # Right number of partition is crucial for performance optimization,
- # in high load(real world) deployment this number should be increased.
- for topic in ${KAFKA_SERVICE_TOPICS//,/ }; do
- /opt/kafka/bin/kafka-topics.sh --create \
- --bootstrap-server $KAFKA_SERVICE_HOST:$KAFKA_SERVICE_PORT \
- --replication-factor 1 \
- --partitions 3 \
- --topic $topic
- done
-}
-
-function install_schema_alarm_database {
- local databaseName="mon"
-
- if is_service_enabled mysql postgresql; then
- recreate_database $databaseName
- $MONASCA_API_BIN_DIR/monasca_db upgrade
- fi
-}
-
-function clean_schema {
-
- echo_summary "Clean Monasca Schema"
-
- if is_service_enabled mysql; then
- sudo echo "drop database mon;" | mysql -u$DATABASE_USER -p$DATABASE_PASSWORD
- elif is_service_enabled postgresql; then
- sudo -u postgres psql -c "DROP DATABASE mon;"
- fi
-
- sudo rm -rf $MONASCA_SCHEMA_DIR
-
-}
-
-function install_monasca_common_java {
- echo_summary "Install monasca_common Java"
-
- git_clone $MONASCA_COMMON_REPO $MONASCA_COMMON_DIR $MONASCA_COMMON_BRANCH
- (cd "${MONASCA_COMMON_DIR}"/java ; sudo mvn clean install -DskipTests)
-}
-
-function clean_monasca_common_java {
- echo_summary "Clean Monasca monasca_common"
-
- (cd "${MONASCA_COMMON_DIR}" ; sudo mvn clean)
-}
-
-function install_monasca_api_java {
-
- echo_summary "Install Monasca monasca_api_java"
-
- (cd "${MONASCA_API_DIR}"/java ; sudo mvn clean package -DskipTests)
-
- local version=""
- version="$(get_version_from_pom "${MONASCA_API_DIR}"/java)"
-
- sudo cp -f "${MONASCA_API_DIR}"/java/target/monasca-api-${version}-shaded.jar \
- /opt/monasca/monasca-api.jar
-
- sudo useradd --system -g monasca mon-api || true
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-api/monasca-api.service /etc/systemd/system/monasca-api.service
-
- if [[ "${MONASCA_METRICS_DB,,}" == 'vertica' ]]; then
-
- # Add the Vertica JDBC to the class path.
- sudo sed -i "s/-cp \/opt\/monasca\/monasca-api.jar/-cp \/opt\/monasca\/monasca-api.jar:\/opt\/monasca\/vertica-jdbc-${VERTICA_VERSION}.jar/g" /etc/systemd/system/monasca-api.service
-
- sudo sed -i "s/influxdb.service/vertica.service/g" /etc/systemd/system/monasca-api.service
-
- fi
-
- sudo chown root:root /etc/systemd/system/monasca-api.service
-
- sudo chmod 0644 /etc/systemd/system/monasca-api.service
-
- sudo mkdir -p /var/log/monasca || true
-
- sudo chown root:monasca /var/log/monasca
-
- sudo chmod 0755 /var/log/monasca
-
- sudo mkdir -p /var/log/monasca/api || true
-
- sudo chown root:monasca /var/log/monasca/api
-
- sudo chmod 0775 /var/log/monasca/api
-
- sudo mkdir -p /etc/monasca || true
-
- sudo chown root:monasca /etc/monasca
-
- sudo chmod 0775 /etc/monasca
-
- local dbEngine="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
- local dbPort=3306
-
- if [[ ${MONASCA_DATABASE_USE_ORM} == "True" ]]; then
- if is_service_enabled postgresql; then
- dbEngine="org.postgresql.ds.PGPoolingDataSource"
- dbPort=5432
- fi
- fi
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-api/api-config.yml /etc/monasca/api-config.yml
- sudo chown mon-api:root /etc/monasca/api-config.yml
- sudo chmod 0640 /etc/monasca/api-config.yml
-
- sudo sed -e "
- s|%KAFKA_HOST%|$SERVICE_HOST|g;
- s|%MONASCA_DATABASE_USE_ORM%|$MONASCA_DATABASE_USE_ORM|g;
- s|%MONASCA_API_DATABASE_ENGINE%|$dbEngine|g;
- s|%MONASCA_API_SERVICE_HOST%|$MONASCA_API_SERVICE_HOST|g;
- s|%MONASCA_API_SERVICE_PORT%|$MONASCA_API_SERVICE_PORT|g;
- s|%MONASCA_API_ADMIN_PORT%|$MONASCA_API_ADMIN_PORT|g;
- s|%DATABASE_USER%|$DATABASE_USER|g;
- s|%DATABASE_HOST%|$DATABASE_HOST|g;
- s|%DATABASE_PORT%|$dbPort|g;
- s|%MYSQL_HOST%|$MYSQL_HOST|g;
- s|%MYSQL_PORT%|$dbPort|g;
- s|%DATABASE_PASSWORD%|$DATABASE_PASSWORD|g;
- s|%MONASCA_METRICS_DB%|$MONASCA_METRICS_DB|g;
- s|%INFLUXDB_HOST%|$SERVICE_HOST|g;
- s|%INFLUXDB_PORT%|8086|g;
- s|%VERTICA_HOST%|$SERVICE_HOST|g;
- s|%ADMIN_PASSWORD%|$ADMIN_PASSWORD|g;
- s|%KEYSTONE_SERVICE_PORT%|$KEYSTONE_SERVICE_PORT|g;
- s|%KEYSTONE_SERVICE_HOST%|$KEYSTONE_SERVICE_HOST|g;
- " -i /etc/monasca/api-config.yml
-
-}
-function install_monasca-api {
- echo_summary "Install Monasca monasca_api "
-
- git_clone $MONASCA_API_REPO $MONASCA_API_DIR $MONASCA_API_BRANCH
-
- if python3_enabled; then
- enable_python3_package monasca-api
- fi
- setup_develop $MONASCA_API_DIR
-
- install_monasca_common
-
- if [[ "${MONASCA_API_USE_MOD_WSGI}" == 'True' ]]; then
- pip_install uwsgi
- else
- pip_install_gr gunicorn
- fi
-
- if [[ "${MONASCA_METRICS_DB,,}" == 'influxdb' ]]; then
- pip_install_gr influxdb
- fi
- if [[ "${MONASCA_METRICS_DB,,}" == 'cassandra' ]]; then
- pip_install_gr cassandra-driver
- fi
- if is_service_enabled postgresql; then
- apt_get install libpq-dev
- pip_install_gr psycopg2
- elif is_service_enabled mysql; then
- apt_get install libmysqlclient-dev
- pip_install_gr PyMySQL
- fi
-
-}
-
-function configure_monasca_api_python {
- if is_service_enabled monasca-api; then
- echo_summary "Configuring monasca-api python"
- sudo install -d -o $STACK_USER $MONASCA_API_CONF_DIR
-
- sudo mkdir -p /var/log/monasca || true
-
- sudo chown $STACK_USER:monasca /var/log/monasca
-
- sudo chmod 0755 /var/log/monasca
-
- sudo mkdir -p /var/log/monasca/api || true
-
- sudo chown $STACK_USER:monasca /var/log/monasca/api
-
- sudo chmod 0775 /var/log/monasca/api
-
- # create configuration files in target locations
- rm -rf $MONASCA_API_CONF $MONASCA_API_PASTE_INI $MONASCA_API_LOGGING_CONF
- $MONASCA_API_BIN_DIR/oslo-config-generator \
- --config-file $MONASCA_API_DIR/config-generator/monasca-api.conf \
- --output-file /tmp/monasca-api.conf
-
- install -m 600 /tmp/monasca-api.conf $MONASCA_API_CONF && rm -rf /tmp/monasca-api.conf
- install -m 600 $MONASCA_API_DIR/etc/api-logging.conf $MONASCA_API_LOGGING_CONF
- install -m 600 $MONASCA_API_DIR/etc/api-config.ini $MONASCA_API_PASTE_INI
- # create configuration files in target locations
-
- local dbAlarmUrl
- local dbMetricDriver
- if [[ "${MONASCA_METRICS_DB,,}" == 'cassandra' ]]; then
- dbMetricDriver="monasca_api.common.repositories.cassandra.metrics_repository:MetricsRepository"
- else
- dbMetricDriver="monasca_api.common.repositories.influxdb.metrics_repository:MetricsRepository"
- fi
- dbAlarmUrl=`database_connection_url mon`
-
- # default settings
- iniset "$MONASCA_API_CONF" DEFAULT region $REGION_NAME
- iniset "$MONASCA_API_CONF" DEFAULT log_config_append $MONASCA_API_LOGGING_CONF
- if $USE_OLD_LOG_API = true; then
- iniset "$MONASCA_API_CONF" DEFAULT enable_logs_api false
- else
- if is_service_enabled monasca-log; then
- iniset "$MONASCA_API_CONF" DEFAULT enable_logs_api true
- else
- iniset "$MONASCA_API_CONF" DEFAULT enable_logs_api false
- fi
- fi
-
- # logging
- iniset "$MONASCA_API_LOGGING_CONF" handler_file args "('$MONASCA_API_LOG_DIR/monasca-api.log', 'a', 104857600, 5)"
-
- # messaging
- iniset "$MONASCA_API_CONF" messaging driver "monasca_api.common.messaging.kafka_publisher:KafkaPublisher"
- iniset "$MONASCA_API_CONF" kafka uri "$SERVICE_HOST:9092"
-
- # databases
- iniset "$MONASCA_API_CONF" database connection $dbAlarmUrl
- iniset "$MONASCA_API_CONF" repositories metrics_driver $dbMetricDriver
- iniset "$MONASCA_API_CONF" cassandra contact_points $(ipv6_unquote $SERVICE_HOST)
- iniset "$MONASCA_API_CONF" influxdb ip_address $(ipv6_unquote $SERVICE_HOST)
- iniset "$MONASCA_API_CONF" influxdb port 8086
-
- # keystone & security
- configure_auth_token_middleware $MONASCA_API_CONF "admin"
- iniset "$MONASCA_API_CONF" keystone_authtoken region_name $REGION_NAME
- iniset "$MONASCA_API_CONF" keystone_authtoken project_name "admin"
- iniset "$MONASCA_API_CONF" keystone_authtoken password $ADMIN_PASSWORD
-
- iniset "$MONASCA_API_CONF" security default_authorized_roles "monasca-user"
- iniset "$MONASCA_API_CONF" security agent_authorized_roles "monasca-agent"
- iniset "$MONASCA_API_CONF" security read_only_authorized_roles "monasca-read-only-user"
- iniset "$MONASCA_API_CONF" security delegate_authorized_roles "monasca-agent"
-
- # server setup
- iniset "$MONASCA_API_PASTE_INI" server:main host $MONASCA_API_SERVICE_HOST
- iniset "$MONASCA_API_PASTE_INI" server:main port $MONASCA_API_SERVICE_PORT
- iniset "$MONASCA_API_PASTE_INI" server:main workers $API_WORKERS
-
- # link configuration for the gate
- ln -sf $MONASCA_API_CONF $MON_API_GATE_CONFIGURATION_DIR
- ln -sf $MONASCA_API_PASTE_INI $MON_API_GATE_CONFIGURATION_DIR
- ln -sf $MONASCA_API_LOGGING_CONF $MON_API_GATE_CONFIGURATION_DIR
-
- if [ "${MONASCA_API_USE_MOD_WSGI}" == 'True' ]; then
- configure_monasca_api_python_uwsgi
- fi
-
- fi
-}
-
-function configure_monasca_api_python_uwsgi {
- rm -rf $MONASCA_API_UWSGI_CONF
-
- install -m 600 $MONASCA_API_DIR/etc/api-uwsgi.ini $MONASCA_API_UWSGI_CONF
- write_uwsgi_config "$MONASCA_API_UWSGI_CONF" "$MONASCA_API_BIN_DIR/monasca-api-wsgi" "/metrics"
-}
-
-function start_monasca_api_python {
- if is_service_enabled monasca-api; then
- echo_summary "Starting monasca-api"
-
- local service_port=$MONASCA_API_SERVICE_PORT
- local service_protocol=$MONASCA_API_SERVICE_PROTOCOL
- local gunicorn="$MONASCA_API_BIN_DIR/gunicorn"
-
- restart_service memcached
- if [ "${MONASCA_API_USE_MOD_WSGI}" == 'True' ]; then
- service_uri=$service_protocol://$MONASCA_API_SERVICE_HOST/api/v2.0
- run_process "monasca-api" "$MONASCA_API_BIN_DIR/uwsgi --ini $MONASCA_API_UWSGI_CONF" ""
- else
- service_uri=$service_protocol://$MONASCA_API_SERVICE_HOST:$service_port
- run_process "monasca-api" "$gunicorn --paste $MONASCA_API_PASTE_INI"
- fi
-
- echo "Waiting for monasca-api to start..."
- if ! wait_for_service $SERVICE_TIMEOUT $service_uri; then
- die $LINENO "monasca-api did not start"
- fi
- fi
-}
-
-function stop_monasca_api_python {
- if is_service_enabled monasca-api; then
- stop_process "monasca-api" || true
- fi
-}
-
-function clean_monasca_api_java {
-
- echo_summary "Clean Monasca monasca_api_java"
-
- (cd "${MONASCA_API_DIR}" ; sudo mvn clean)
-
- sudo rm /etc/monasca/api-config.yml
-
- sudo rm -rf /var/log/monasca/api
-
- sudo systemctl disable monasca-api
-
- sudo rm /etc/systemd/system/monasca-api.service
-
- sudo rm /opt/monasca/monasca-api.jar
-
- sudo rm /var/log/upstart/monasca-api.log*
-
- sudo userdel mon-api
-}
-
-function clean_monasca_api_python {
-
- echo_summary "Clean Monasca monasca_api_python"
-
- sudo rm -rf /etc/monasca/monasca-api.conf
- sudo rm -rf /etc/monasca/api-logging.conf
- sudo rm -rf /etc/monasca/api-config.ini
- sudo rm -rf $MON_API_GATE_CONFIGURATION_DIR
- sudo rm -rf $MONASCA_API_LOG_DIR
-
- if is_service_enabled postgresql; then
- apt_get purge libpq-dev
- elif is_service_enabled mysql; then
- apt_get purge libmysqlclient-dev
- fi
-
- if [ "$MONASCA_API_USE_MOD_WSGI" == "True" ]; then
- clean_monasca_api_uwsgi
- fi
-
-}
-
-function clean_monasca_api_uwsgi {
- sudo rm -rf $MONASCA_API_UWSGI_CONF
-}
-
-function start_monasca_api {
- if [[ "${MONASCA_API_IMPLEMENTATION_LANG,,}" == 'java' ]]; then
- start_service monasca-api || restart_service monasca-api
- elif [[ "${MONASCA_API_IMPLEMENTATION_LANG,,}" == 'python' ]]; then
- start_monasca_api_python
- fi
-}
-
-function stop_monasca_api {
- if [[ "${MONASCA_API_IMPLEMENTATION_LANG,,}" == 'java' ]]; then
- stop_service monasca-api || true
- elif [[ "${MONASCA_API_IMPLEMENTATION_LANG,,}" == 'python' ]]; then
- stop_monasca_api_python
- fi
-}
-
-function configure_monasca_api {
- if [[ "${MONASCA_API_IMPLEMENTATION_LANG,,}" == 'python' ]]; then
- configure_monasca_api_python
- fi
- #NOTE(basiaka) Refactor of monasca-api in Java version will be handled in another change
-}
-
-function install_monasca_thresh {
-
- echo_summary "Install Monasca monasca_thresh"
-
- git_clone $MONASCA_THRESH_REPO $MONASCA_THRESH_DIR $MONASCA_THRESH_BRANCH
- (cd "${MONASCA_THRESH_DIR}"/thresh ; sudo mvn clean package -DskipTests)
-
- local version=""
- version="$(get_version_from_pom "${MONASCA_THRESH_DIR}"/thresh)"
-
- sudo cp -f "${MONASCA_THRESH_DIR}"/thresh/target/monasca-thresh-${version}-shaded.jar \
- /opt/monasca/monasca-thresh.jar
-
- sudo useradd --system -g monasca mon-thresh || true
-
- sudo mkdir -p /etc/monasca || true
-
- sudo chown root:monasca /etc/monasca
-
- sudo chmod 0775 /etc/monasca
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-thresh/thresh-config.yml /etc/monasca/thresh-config.yml
-
- sudo chown root:monasca /etc/monasca/thresh-config.yml
-
- sudo chmod 0640 /etc/monasca/thresh-config.yml
-
- local dbEngine="org.mariadb.jdbc.Driver"
- local dbPort=3306
-
- if [[ ${MONASCA_DATABASE_USE_ORM} == "True" ]]; then
- if is_service_enabled postgresql; then
- dbEngine="org.postgresql.ds.PGPoolingDataSource"
- dbPort=5432
- fi
- fi
-
- sudo sed -e "
- s|%KAFKA_HOST%|$SERVICE_HOST|g;
- s|%MONASCA_THRESH_DATABASE_ENGINE%|$dbEngine|g;
- s|%DATABASE_USER%|$DATABASE_USER|g;
- s|%MONASCA_DATABASE_USE_ORM%|$MONASCA_DATABASE_USE_ORM|g;
- s|%DATABASE_TYPE%|$DATABASE_TYPE|g;
- s|%DATABASE_HOST%|$DATABASE_HOST|g;
- s|%DATABASE_PASSWORD%|$DATABASE_PASSWORD|g;
- s|%DATABASE_PORT%|$dbPort|g;
- s|%MONASCA_STATSD_PORT%|$MONASCA_STATSD_PORT|g;
- " -i /etc/monasca/thresh-config.yml
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-thresh/monasca-thresh /etc/init.d/monasca-thresh
-
- sudo chown root:root /etc/init.d/monasca-thresh
-
- sudo chmod 0744 /etc/init.d/monasca-thresh
-
- sudo systemctl enable monasca-thresh
-
-}
-
-function clean_monasca_thresh {
-
- echo_summary "Clean Monasca monasca_thresh"
-
- (cd "${MONASCA_THRESH_DIR}"/thresh ; sudo mvn clean)
-
- sudo systemctl disable monasca-thresh
-
- sudo rm /etc/init.d/monasca-thresh
-
- sudo rm /etc/monasca/thresh-config.yml
-
- sudo userdel mon-thresh || true
-
- sudo rm /opt/monasca/monasca-thresh.jar
-
-}
-
-function create_accounts {
-
- local projects=("mini-mon" "admin" "demo")
- declare -A users=(
- ["mini-mon"]="password"
- ["monasca-agent"]="password"
- ["admin"]="${ADMIN_PASSWORD}"
- ["demo"]="${ADMIN_PASSWORD}"
- ["monasca-read-only-user"]="password"
- )
- local roles=("monasca-user" "monasca-agent" "admin" "monasca-read-only-user")
-
- for project in "${projects[@]}"; do
- get_or_create_project "${project}"
- done
- for user in "${!users[@]}"; do
- local password
- password="${users[$user]}"
- get_or_create_user "${user}" "${password}"
- done
- for role in "${roles[@]}"; do
- get_or_create_role "${role}"
- done
-
- # create assignments
- # args=>
- get_or_add_user_project_role "monasca-user" "mini-mon" "mini-mon"
- get_or_add_user_project_role "monasca-user" "admin" "admin"
- get_or_add_user_project_role "monasca-user" "demo" "demo"
-
- get_or_add_user_project_role "admin" "mini-mon" "mini-mon"
-
- get_or_add_user_project_role "monasca-agent" "monasca-agent" "mini-mon"
-
- get_or_add_user_project_role "monasca-read-only-user" "monasca-read-only-user" "mini-mon"
-
- # crate service
- get_or_create_service "monasca" "${MONASCA_SERVICE_TYPE}" "Monasca Monitoring Service"
-
- # create endpoint
- get_or_create_endpoint \
- "monasca" \
- "${REGION_NAME}" \
- "${MONASCA_API_URI_V2}" \
- "${MONASCA_API_URI_V2}" \
- "${MONASCA_API_URI_V2}"
-
- if is_service_enabled monasca-log; then
- local log_search_url="http://$KIBANA_SERVICE_HOST:$KIBANA_SERVICE_PORT/"
-
- get_or_create_service "logs" "logs" "Monasca Log service"
- get_or_create_endpoint \
- "logs" \
- "{$REGION_NAME}" \
- "{$MONASCA_API_URI_V2}" \
- "{$MONASCA_API_URI_V2}" \
- "{$MONASCA_API_URI_V2}"
-
- get_or_create_service "logs-search" "logs-search" "Monasca Log search service"
- get_or_create_endpoint \
- "logs-search" \
- "$REGION_NAME" \
- "$log_search_url" \
- "$log_search_url" \
- "$log_search_url"
-
- fi
-}
-
-function install_keystone_client {
- PIP_VIRTUAL_ENV=/opt/monasca
-
- install_keystoneclient
- install_keystoneauth
-
- unset PIP_VIRTUAL_ENV
-}
-
-function install_monasca_agent {
-
- if is_service_enabled monasca-agent; then
- echo_summary "Install Monasca monasca_agent"
-
- apt_get install python3-yaml libxml2-dev libxslt1-dev
-
- MONASCA_AGENT_EXTRAS="kafka_plugin"
- if is_service_enabled nova && [ "$VIRT_DRIVER" = "libvirt" ]; then
- apt_get install libvirt-dev
- MONASCA_AGENT_EXTRAS=${MONASCA_AGENT_EXTRAS},libvirt
- fi
-
- git_clone $MONASCA_CLIENT_REPO $MONASCA_CLIENT_DIR $MONASCA_CLIENT_BRANCH
- git_clone $MONASCA_AGENT_REPO $MONASCA_AGENT_DIR $MONASCA_AGENT_BRANCH
-
- sudo mkdir -p /opt/monasca-agent || true
- sudo chown $STACK_USER:monasca /opt/monasca-agent
-
- # TODO: remove the trailing pip version when a proper fix
- # arrives for handling this bug https://github.com/pypa/pip/issues/8210
- # Similar issue: https://bugs.launchpad.net/devstack/+bug/1906322
- if python3_enabled; then
- (cd /opt/monasca-agent ;
- virtualenv -p python3 . ;
- bin/python3 -m pip install --upgrade pip==20.2.3)
- sudo rm -rf /opt/stack/monasca-common/.eggs/
- else
- (cd /opt/monasca-agent ; virtualenv .)
- fi
-
- PIP_VIRTUAL_ENV=/opt/monasca-agent
-
- setup_install $MONASCA_AGENT_DIR $MONASCA_AGENT_EXTRAS
- setup_dev_lib "python-monascaclient"
-
- unset PIP_VIRTUAL_ENV
-
- sudo mkdir -p /etc/monasca/agent/conf.d || true
-
- sudo chown root:root /etc/monasca/agent/conf.d
-
- sudo chmod 0755 /etc/monasca/agent/conf.d
-
- sudo mkdir -p /usr/lib/monasca/agent/custom_checks.d || true
-
- sudo chown root:root /usr/lib/monasca/agent/custom_checks.d
-
- sudo chmod 0755 /usr/lib/monasca/agent/custom_checks.d
-
- sudo mkdir -p /usr/lib/monasca/agent/custom_detect.d || true
-
- sudo chown root:root /usr/lib/monasca/agent/custom_detect.d
-
- sudo chmod 0755 /usr/lib/monasca/agent/custom_detect.d
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-agent/host_alive.yaml /etc/monasca/agent/conf.d/host_alive.yaml
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-agent/http_check.yaml /etc/monasca/agent/conf.d/http_check.yaml
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-agent/kafka_consumer.yaml /etc/monasca/agent/conf.d/kafka_consumer.yaml
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-agent/mysql.yaml /etc/monasca/agent/conf.d/mysql.yaml
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-agent/process.yaml /etc/monasca/agent/conf.d/process.yaml
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-agent/zk.yaml /etc/monasca/agent/conf.d/zk.yaml
-
- sudo sed -i "s/127\.0\.0\.1/$(hostname)/" /etc/monasca/agent/conf.d/*.yaml
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/monasca-agent/monasca-reconfigure /usr/local/bin/monasca-reconfigure
-
- sudo chown root:root /usr/local/bin/monasca-reconfigure
-
- sudo chmod 0750 /usr/local/bin/monasca-reconfigure
-
- sudo sed -e "
- s|%MONASCA_STATSD_PORT%|$MONASCA_STATSD_PORT|g;
- s|%MONASCA_SERVICE_TYPE%|$MONASCA_SERVICE_TYPE|g;
- s|%KEYSTONE_AUTH_URI%|$KEYSTONE_AUTH_URI|g;
- s|%SERVICE_DOMAIN_NAME%|$SERVICE_DOMAIN_NAME|g;
- s|%REGION_NAME%|$REGION_NAME|g;
- " -i /usr/local/bin/monasca-reconfigure
- fi
-}
-
-function clean_monasca_agent {
-
- if is_service_enabled monasca-agent; then
- echo_summary "Clean Monasca monasca_agent"
-
- sudo rm /etc/init.d/monasca-agent
-
- sudo rm /usr/local/bin/monasca-reconfigure
-
- sudo rm /etc/monasca/agent/conf.d/host_alive.yaml
-
- sudo chown root:root /etc/monasca/agent/conf.d/host_alive.yaml
-
- chmod 0644 /etc/monasca/agent/conf.d/host_alive.yaml
-
- sudo rm -rf /usr/lib/monasca/agent/custom_detect.d
-
- sudo rm -rf /usr/lib/monasca/agent/custom_checks.d
-
- sudo rm -rf /etc/monasca/agent/conf.d
-
- sudo rm -rf /etc/monasca/agent
-
- sudo rm -rf /opt/monasca-agent
-
- [[ -f /etc/systemd/system/monasca-agent.target ]] && sudo rm /etc/systemd/system/monasca-agent.target
- [[ -f /etc/systemd/system/monasca-collector.service ]] && sudo rm /etc/systemd/system/monasca-collector.service
- [[ -f /etc/systemd/system/monasca-forwarder.service ]] && sudo rm /etc/systemd/system/monasca-forwarder.service
- [[ -f /etc/systemd/system/monasca-statsd.service ]] && sudo rm /etc/systemd/system/monasca-statsd.service
-
- apt_get purge libxslt1-dev
- apt_get purge libxml2-dev
- apt_get purge python3-yaml
- fi
-}
-
-# install nodejs and npm packages, works behind corporate proxy
-# and does not result in gnutsl_handshake error
-function install_nodejs {
-
- echo_summary "Install Node.js"
- curl -sL https://deb.nodesource.com/setup_18.x | sudo bash -
-
- apt_get install nodejs
- npm config set registry "http://registry.npmjs.org/"; \
- npm config set proxy "${HTTP_PROXY}"; \
- npm set strict-ssl false;
-}
-
-function init_monasca_grafana {
- echo_summary "Init Grafana"
-
- sudo cp -f -r "${MONASCA_API_DIR}"/devstack/files/grafana/dashboards.d "${DASHBOARDS_DIR}"
- sudo chown -R root:root "${DASHBOARDS_DIR}"
- sudo chmod -R 0644 "${DASHBOARDS_DIR}"
-
-
- if python3_enabled; then
- sudo python3 "${MONASCA_API_DIR}"/devstack/files/grafana/grafana-init.py
- else
- sudo python "${MONASCA_API_DIR}"/devstack/files/grafana/grafana-init.py
- fi
-
- sudo rm -rf "${DASHBOARDS_DIR}"
-}
-
-function install_monasca_grafana {
-
- echo_summary "Install Grafana"
-
- if [ ! -d "${GRAFANA_DIR}" ]; then
- git_timed clone $GRAFANA_REPO $GRAFANA_DIR --branch $GRAFANA_BRANCH --depth 1
- fi
-
- npm config set python /usr/bin/python3
-
- cd "${MONASCA_BASE}"
-
- mkdir grafana-build || true
- cd grafana-build
- export GOPATH=`pwd`
- mkdir -p $GOPATH/src/github.com/grafana
- cd $GOPATH/src/github.com/grafana
- cp -rf "${GRAFANA_DIR}" .
-
- cd grafana
- cp "${MONASCA_UI_DIR}"/grafana-dashboards/* ./public/dashboards/
-
- go run build.go build
-
- npm config set unsafe-perm true
- npm install
- sudo npm install -g grunt-cli
- grunt --force
-
- cd "${MONASCA_BASE}"
- sudo rm -r grafana
-
- sudo useradd grafana || true
- sudo mkdir /etc/grafana || true
- sudo mkdir /var/lib/grafana || true
- sudo mkdir /var/lib/grafana/plugins || true
- sudo mkdir /var/log/grafana || true
-
- git_clone $MONASCA_GRAFANA_DATASOURCE_REPO $MONASCA_GRAFANA_DATASOURCE_DIR $MONASCA_GRAFANA_DATASOURCE_BRANCH
- sudo ln -sfF "${MONASCA_GRAFANA_DATASOURCE_DIR}" /var/lib/grafana/plugins/monasca-grafana-datasource
-
- sudo chown -R grafana:grafana /var/lib/grafana /var/log/grafana
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/grafana/grafana.ini /etc/grafana/grafana.ini
- sudo sed -e "
- s|%KEYSTONE_AUTH_URI%|$KEYSTONE_AUTH_URI|g;
- " -i /etc/grafana/grafana.ini
-
- sudo cp -f "${MONASCA_API_DIR}"/devstack/files/grafana/grafana-server /etc/init.d/grafana-server
- sudo sed -i "s#/usr/sbin#"${MONASCA_BASE}"/grafana-build/src/github.com/grafana/grafana/bin#g" /etc/init.d/grafana-server
- sudo sed -i "s#/usr/share#"${MONASCA_BASE}"/grafana-build/src/github.com/grafana#g" /etc/init.d/grafana-server
-
- sudo systemctl enable grafana-server
-}
-
-function clean_nodejs {
- apt_get purge nodejs npm
-}
-
-function clean_monasca_grafana {
-
- sudo rm -f "${MONASCA_BASE}"/grafana-build
-
- sudo systemctl disable grafana-server
-
- sudo rm /etc/init.d/grafana-server
-
- sudo rm -r /etc/grafana
-
- sudo rm -r /var/lib/grafana
-
- sudo rm -r /var/log/grafana
-
-}
-
-function install_go {
- echo_summary "Install Go ${GO_VERSION}"
-
- local go_tarball=go${GO_VERSION}.linux-amd64.tar.gz
- local go_tarball_url=https://storage.googleapis.com/golang/${go_tarball}
-
- local go_tarball_dest
- go_tarball_dest=`get_extra_file ${go_tarball_url}`
-
- sudo tar -C /usr/local -xzf ${go_tarball_dest}
- export PATH=$PATH:/usr/local/go/bin
-}
-
-function clean_go {
- echo_summary "Clean Go ${GO_VERSION}"
-
- sudo rm -f ${FILES}/go${GO_VERSION}*
- sudo rm -rf /usr/local/go*
- export PATH=$(echo $PATH | sed -e 's|:/usr/local/go/bin||')
-}
-
-###### extra functions
-
-# Validate a program version string is of the form 1.0.0.
-# Return 0 if a valid program version string, otherwise 1.
-function validate_version {
- version_regex="^([0-9]+\.)?([0-9]+\.)?([0-9]+)$"
-
- if [[ $1 =~ $version_regex ]]; then
- return 0
- else
- return 1
- fi
-}
-
-# Prints the version specified in the pom.xml file in the directory given by
-# the argument
-function get_version_from_pom {
- python -c "import xml.etree.ElementTree as ET; \
- print(ET.parse(open('$1/pom.xml')).getroot().find( \
- '{http://maven.apache.org/POM/4.0.0}version').text)"
-}
-
-function install_monasca_common {
- git_clone $MONASCA_COMMON_REPO $MONASCA_COMMON_DIR $MONASCA_COMMON_BRANCH
- setup_dev_lib "monasca-common"
-}
-
-function install_monasca_statsd {
- git_clone $MONASCA_STATSD_REPO $MONASCA_STATSD_DIR $MONASCA_STATSD_BRANCH
- setup_dev_lib "monasca-statsd"
-}
-
-function install_gate_config_holder {
- sudo install -d -o $STACK_USER $MON_API_GATE_CONFIGURATION_DIR
-}
-
-function find_nearest_apache_mirror {
- if [ -z $APACHE_MIRROR ]; then
- local mirror;
- mirror=`curl -s 'https://www.apache.org/dyn/closer.cgi?as_json=1' | jq --raw-output '.preferred'`
- APACHE_MIRROR=$mirror
- fi
-}
-
-# This solution fixes problem with privileges for agent
-# to gather metrics from services started as root user.
-function init_collector_service {
- if is_service_enabled monasca-agent; then
- echo_summary "Init Monasca collector service"
- sudo systemctl stop monasca-collector
- sudo sed -i "s/User=mon-agent/User=root/g" /etc/systemd/system/monasca-collector.service
- sudo sed -i "s/Group=mon-agent/Group=root/g" /etc/systemd/system/monasca-collector.service
- sudo systemctl daemon-reload
- sudo systemctl restart monasca-collector
- fi
-}
-
-function configure_tempest_for_monasca {
- iniset $TEMPEST_CONFIG monitoring kibana_version $KIBANA_VERSION
-}
-
-# check for service enabled
-if is_service_enabled monasca; then
-
- if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
- # Set up system services
- echo_summary "Configuring Monasca system services"
- pre_install_monasca
-
- elif [[ "$1" == "stack" && "$2" == "install" ]]; then
- # Perform installation of service source
- echo_summary "Installing Monasca"
- install_monasca
-
- elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
- if is_service_enabled tempest; then
- echo_summary "Configuring Tempest for Monasca"
- configure_tempest_for_monasca
- fi
-
- elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
- # Configure after the other layer 1 and 2 services have been configured
- echo_summary "Configuring Monasca"
- configure_monasca
-
- elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
- # Initialize and start the Monasca service
- echo_summary "Initializing Monasca"
- extra_monasca
- fi
-
- if [[ "$1" == "unstack" ]]; then
- # Shut down Monasca services
- echo_summary "Unstacking Monasca"
- unstack_monasca
- fi
-
- if [[ "$1" == "clean" ]]; then
- # Remove state and transient data
- # Remember clean.sh first calls unstack.sh
- echo_summary "Cleaning Monasca"
- clean_monasca
- fi
-fi
-
-# check for service enabled
-if is_service_enabled monasca-log; then
-
- if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
- # Set up system services
- echo_summary "Configuring Monasca Log Management system services"
- pre_install_logs_services
-
- elif [[ "$1" == "stack" && "$2" == "install" ]]; then
- # Perform installation of service source
- echo_summary "Installing Monasca Log Management"
- install_monasca_log
-
- elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
- # Configure after the other layer 1 and 2 services have been configured
- echo_summary "Configuring Monasca Log Management"
- configure_monasca_log
-
- elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
- # Initialize and start the Monasca service
- echo_summary "Initializing Monasca Log Management"
- init_monasca_log
- init_monasca_grafana_dashboards
- if is_service_enabled monasca-agent; then
- init_agent
- fi
- start_monasca_log
- fi
-
- if [[ "$1" == "unstack" ]]; then
- # Shut down Monasca services
- echo_summary "Unstacking Monasca Log Management"
- stop_monasca_log
- delete_kafka_topics
- fi
-
- if [[ "$1" == "clean" ]]; then
- # Remove state and transient data
- # Remember clean.sh first calls unstack.sh
- echo_summary "Cleaning Monasca Log Management"
- clean_monasca_log
- fi
-fi
-
-#Restore errexit
-$ERREXIT
-
-# Restore xtrace
-$XTRACE
diff --git a/devstack/settings b/devstack/settings
deleted file mode 100644
index 0ed2398bf..000000000
--- a/devstack/settings
+++ /dev/null
@@ -1,259 +0,0 @@
-#
-# (C) Copyright 2015 Hewlett Packard Enterprise Development LP
-# Copyright 2017 FUJITSU LIMITED
-#
-# 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.
-#
-
-# The following two variables allow switching between java and python for the implementations
-# of the Monasca API and the Monasca Persister. These variables can be set here
-# or in the DevStack local.conf file.
-
-# MONASCA_API_IMPLEMENTATION_LANG=${MONASCA_API_IMPLEMENTATION_LANG:-java}
-MONASCA_API_IMPLEMENTATION_LANG=${MONASCA_API_IMPLEMENTATION_LANG:-python}
-
-# MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-java}
-MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-python}
-
-# MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-vertica}
-# MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-cassandra}
-MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-influxdb}
-
-# Turn on all the Monasca services by default. Currently enabling specific services
-# has no effect. All services are enabled by default. There is currently no mechanism
-# implemented to turn off specific Monasca services.
-
-#
-# Monasca top level service that enables all other services
-#
-enable_service monasca
-
-#
-# Monasca infrastructure services
-#
-
-# devstack zookeeper
-enable_service monasca-zookeeper
-
-# Monasca databases
-# MySQL is already enabled in devstack
-enable_service monasca-influxdb
-
-# Apache Storm
-enable_service monasca-storm
-enable_service monasca-storm-nimbus
-enable_service monasca-storm-supervisor
-disable_service monasca-storm-ui
-disable_service monasca-storm-logviewer
-
-# monasca-kafka depends on monasca-zookeeper
-enable_service monasca-kafka
-
-#
-# Monasca core services
-#
-
-# monasca-api depends on monasca-influxdb, MySQL, monasca-kafka
-enable_service monasca-api
-
-# monasca-persister depends on monasca-influxdb, monasca-kafka
-enable_service monasca-persister
-
-# monasca-notification depends on MySQL, monasca-kafka
-enable_service monasca-notification
-
-# monasca-thresh depends on MySQL, monasca-kafka, monasca-storm
-enable_service monasca-thresh
-
-# monasca-agent depends on monasca-api
-enable_service monasca-agent
-
-# monasca-cli depends on monasca-api
-enable_service monasca-cli
-
-#
-# Monasca logs services
-#
-
-enable_service kibana
-enable_service elasticsearch
-enable_service monasca-log
-enable_service monasca-log-persister
-enable_service monasca-log-transformer
-enable_service monasca-log-metrics
-enable_service monasca-log-agent
-
-#
-# Dependent Software Versions
-#
-
-# Set the InfluxDB version to use for the Java and Python API
-# InfluxDB has modified the result sets for SHOW SERIES. The
-# Python API has been modified to support those changes, but the
-# Java API hasn't yet. These two environment variables allow you
-# to deploy either the Java or Python API without having to
-# also set the INFLUXDB_VERSION when switching between the two.
-INFLUXDB_JAVA_VERSION=${INFLUXDB_JAVA_VERSION:-0.9.5}
-INFLUXDB_PYTHON_VERSION=${INFLUXDB_PYTHON_VERSION:-1.7.6}
-
-# To set the same version of InfluxDB for both languages use the
-# following variable. This will override both the Java and Python
-# specific variables above.
-# INFLUXDB_VERSION=${INFLUXDB_VERSION:-0.9.5}
-INFLUXDB_DEB_URL=${INFLUXDB_DEB_URL:-https://dl.influxdata.com/influxdb/releases/}
-
-VERTICA_VERSION=${VERTICA_VERSION:-8.0.0-0}
-CASSANDRA_VERSION=${CASSANDRA_VERSION:-311x}
-ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION:-3.8.4} # 3.4.13 default in Focal; 3.4.10 default in Bionic
-# Kafka deb consists of the version of scala plus the version of kafka
-BASE_KAFKA_VERSION=${BASE_KAFKA_VERSION:-3.7.2}
-SCALA_VERSION=${SCALA_VERSION:-2.13}
-KAFKA_VERSION=${KAFKA_VERSION:-${SCALA_VERSION}-${BASE_KAFKA_VERSION}}
-STORM_VERSION=${STORM_VERSION:-1.2.2}
-GO_VERSION=${GO_VERSION:-"1.7.1"}
-NODE_JS_VERSION=${NODE_JS_VERSION:-"4.0.0"}
-NVM_VERSION=${NVM_VERSION:-"0.32.1"}
-KIBANA_VERSION=${KIBANA_VERSION:-7.3.0}
-LOGSTASH_VERSION=${LOGSTASH_VERSION:-7.3.0}
-ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION:-7.3.0}
-LOGSTASH_OUTPUT_MONASCA_VERSION=${LOGSTASH_OUTPUT_MONASCA_VERSION:-2.0.0}
-
-# Needed for plugin build environment initialization
-KIBANA_DEV_BRANCH=${KIBANA_DEV_BRANCH:-7.3}
-KIBANA_DEV_REPO="https://github.com/elastic/kibana"
-
-MONASCA_KIBANA_PLUGIN_REPO=${MONASCA_KIBANA_PLUGIN_REPO:-${GIT_BASE}/openstack/monasca-kibana-plugin.git}
-MONASCA_KIBANA_PLUGIN_BRANCH=${MONASCA_KIBANA_PLUGIN_BRANCH:-master}
-MONASCA_KIBANA_PLUGIN_DIR=${DEST}/monasca-kibana-plugin
-
-# Path settings
-MONASCA_BASE=${DEST}
-MONASCA_SCHEMA_DIR=${DEST}/monasca/schema
-
-# Repository settings
-MONASCA_API_REPO=${MONASCA_API_REPO:-${GIT_BASE}/openstack/monasca-api.git}
-MONASCA_API_BRANCH=${MONASCA_API_BRANCH:-master}
-MONASCA_API_DIR=${MONASCA_BASE}/monasca-api
-
-MONASCA_PERSISTER_REPO=${MONASCA_PERSISTER_REPO:-${GIT_BASE}/openstack/monasca-persister.git}
-MONASCA_PERSISTER_BRANCH=${MONASCA_PERSISTER_BRANCH:-master}
-MONASCA_PERSISTER_DIR=${MONASCA_BASE}/monasca-persister
-
-MONASCA_NOTIFICATION_REPO=${MONASCA_NOTIFICATION_REPO:-${GIT_BASE}/openstack/monasca-notification.git}
-MONASCA_NOTIFICATION_BRANCH=${MONASCA_NOTIFICATION_BRANCH:-master}
-MONASCA_NOTIFICATION_DIR=${MONASCA_BASE}/monasca-notification
-
-MONASCA_THRESH_REPO=${MONASCA_THRESH_REPO:-${GIT_BASE}/openstack/monasca-thresh.git}
-MONASCA_THRESH_BRANCH=${MONASCA_THRESH_BRANCH:-master}
-MONASCA_THRESH_DIR=${MONASCA_BASE}/monasca-thresh
-
-MONASCA_CLIENT_REPO=${MONASCA_CLIENT_REPO:-${GIT_BASE}/openstack/python-monascaclient.git}
-MONASCA_CLIENT_BRANCH=${MONASCA_CLIENT_BRANCH:-master}
-MONASCA_CLIENT_DIR=${MONASCA_BASE}/python-monascaclient
-
-MONASCA_AGENT_REPO=${MONASCA_AGENT_REPO:-${GIT_BASE}/openstack/monasca-agent.git}
-MONASCA_AGENT_BRANCH=${MONASCA_AGENT_BRANCH:-master}
-MONASCA_AGENT_DIR=${MONASCA_BASE}/monasca-agent
-
-MONASCA_UI_REPO=${MONASCA_UI_REPO:-${GIT_BASE}/openstack/monasca-ui.git}
-MONASCA_UI_BRANCH=${MONASCA_UI_BRANCH:-master}
-MONASCA_UI_DIR=${MONASCA_BASE}/monasca-ui
-
-MONASCA_COMMON_REPO=${MONASCA_COMMON_REPO:-${GIT_BASE}/openstack/monasca-common.git}
-MONASCA_COMMON_BRANCH=${MONASCA_COMMON_BRANCH:-master}
-MONASCA_COMMON_DIR=${MONASCA_BASE}/monasca-common
-
-MONASCA_STATSD_REPO=${MONASCA_STATSD_REPO:-${GIT_BASE}/openstack/monasca-statsd.git}
-MONASCA_STATSD_BRANCH=${MONASCA_STATSD_BRANCH:-master}
-MONASCA_STATSD_DIR=${MONASCA_BASE}/monasca-statsd
-
-MONASCA_GRAFANA_DATASOURCE_REPO=${MONASCA_GRAFANA_DATASOURCE_REPO:-${GIT_BASE}/openstack/monasca-grafana-datasource.git}
-MONASCA_GRAFANA_DATASOURCE_BRANCH=${MONASCA_GRAFANA_DATASOURCE_BRANCH:-master}
-MONASCA_GRAFANA_DATASOURCE_DIR=${MONASCA_BASE}/monasca-grafana-datasource
-
-GRAFANA_REPO=${GRAFANA_REPO:-"https://github.com/monasca/grafana.git"}
-GRAFANA_BRANCH=${GRAFANA_BRANCH:-"grafana4"}
-GRAFANA_DIR=${MONASCA_BASE}/grafana
-GRAFANA_INIT_LOG_LEVEL=DEBUG
-GRAFANA_URL=http://localhost:3000
-GRAFANA_USERNAME=mini-mon
-GRAFANA_PASSWORD=password
-DATASOURCE_TYPE=monasca
-DATASOURCE_URL=http://localhost/metrics
-DATASOURCE_ACCESS_MODE=proxy
-DATASOURCE_AUTH=Keystone
-DASHBOARDS_DIR=/dashboards.d
-
-GITDIR["python-monascaclient"]=${MONASCA_CLIENT_DIR}
-GITDIR["monasca-common"]=${MONASCA_COMMON_DIR}
-GITDIR["monasca-statsd"]=${MONASCA_STATSD_DIR}
-
-# Database settings
-MONASCA_DATABASE_USE_ORM=false
-
-# Other settings
-DOWNLOAD_FILE_TIMEOUT=${DOWNLOAD_FILE_TIMEOUT:-30}
-PLUGIN_FILES=$MONASCA_API_DIR/devstack/files
-# APACHE_MIRROR= # force specific APACHE_MIRROR if the one that got picked fails
-# Apache Kafka 0.9.0.1 is only available in Apache Archives
-APACHE_ARCHIVES=${APACHE_ARCHIVES:-"https://archive.apache.org/dist/"}
-
-# Public configuration
-## monasca-statsd
-MONASCA_STATSD_PORT=${MONASCA_STATSD_PORT:-8125}
-
-## monasca-api
-MONASCA_API_SERVICE_HOST=${MONASCA_API_SERVICE_HOST:-${SERVICE_HOST}}
-MONASCA_API_SERVICE_PORT=${MONASCA_API_SERVICE_PORT:-8070}
-MONASCA_API_ADMIN_PORT=${MONASCA_API_ADMIN_PORT:-8081} # for java
-MONASCA_API_SERVICE_PROTOCOL=${MONASCA_API_SERVICE_PROTOCOL:-${SERVICE_PROTOCOL}}
-MONASCA_API_SERVICE_TIMEOUT=${MONASCA_API_SERVICE_TIMEOUT:-${SERVICE_TIMEOUT}}
-
-MONASCA_API_CONF_DIR=${MONASCA_API_CONF_DIR:-/etc/monasca}
-MONASCA_API_CONF=${MONASCA_API_CONF:-$MONASCA_API_CONF_DIR/monasca-api.conf}
-MONASCA_API_PASTE_INI=${MONASCA_API_PASTE_INI:-$MONASCA_API_CONF_DIR/api-config.ini}
-MONASCA_API_LOGGING_CONF=${MONASCA_API_LOGGING_CONF:-$MONASCA_API_CONF_DIR/api-logging.conf}
-MONASCA_API_LOG_DIR=${MONASCA_API_LOG_DIR:-/var/log/monasca/api}
-MONASCA_API_USE_MOD_WSGI=${MONASCA_API_USE_MOD_WSGI:-$ENABLE_HTTPD_MOD_WSGI_SERVICES}
-MONASCA_API_UWSGI_CONF=${MONASCA_API_UWSGI_CONF:-$MONASCA_API_CONF_DIR/api-uwsgi.ini}
-
-# OLD LOG-API CONFIGURATION
-MONASCA_LOG_API_SERVICE_HOST=${MONASCA_LOG_API_SERVICE_HOST:-${SERVICE_HOST}}
-MONASCA_LOG_API_SERVICE_PORT=${MONASCA_LOG_API_SERVICE_PORT:-5607}
-MONASCA_LOG_API_REPO=${MONASCA_LOG_API_REPO:-${GIT_BASE}/openstack/monasca-log-api.git}
-MONASCA_LOG_API_BRANCH=${MONASCA_LOG_API_BRANCH:-master}
-MONASCA_LOG_API_DIR=${DEST}/monasca-log-api
-MONASCA_LOG_API_DEPLOY=uwsgi
-MONASCA_LOG_API_CONF_DIR=${MONASCA_LOG_API_CONF_DIR:-/etc/monasca}
-MONASCA_LOG_API_LOG_DIR=${MONASCA_LOG_API_LOG_DIR:-/var/log/monasca}
-MONASCA_LOG_API_CACHE_DIR=${MONASCA_LOG_API_CACHE_DIR:-/var/cache/monasca-log-api}
-MONASCA_LOG_API_WSGI_DIR=${MONASCA_LOG_API_WSGI_DIR:-/var/www/monasca-log-api}
-
-MONASCA_LOG_API_CONF=${MONASCA_LOG_API_CONF:-$MONASCA_LOG_API_CONF_DIR/monasca-log-api.conf}
-MONASCA_LOG_API_PASTE=${MONASCA_LOG_API_PASTE:-$MONASCA_LOG_API_CONF_DIR/log-api-paste.ini}
-MONASCA_LOG_API_LOGGING_CONF=${MONASCA_LOG_API_LOGGING_CONF:-$MONASCA_LOG_API_CONF_DIR/log-api-logging.conf}
-MONASCA_LOG_API_UWSGI_CONF=${MONASCA_LOG_API_UWSGI_CONF:-$MONASCA_LOG_API_CONF_DIR/log-api-uwsgi.ini}
-
-USE_PYTHON3=${USE_PYTHON3:-true}
-USE_OLD_LOG_API=${USE_OLD_LOG_API:-false}
-
-## storm settings
-STORM_UI_HOST=${STORM_UI_HOST:-${SERVICE_HOST}}
-STORM_UI_PORT=${STORM_UI_PORT:-8089}
-STORM_LOGVIEWER_PORT=${STORM_LOGVIEWER_PORT:-8090}
-
-KAFKA_SERVICE_HOST=${KAFKA_SERVICE_HOST:-${SERVICE_HOST}}
-KAFKA_SERVICE_PORT=${KAFKA_SERVICE_PORT:-9092}
-KAFKA_SERVICE_TOPICS=${KAFKA_SERVICE_TOPICS:-metrics,events,alarm-state-transitions,alarm-notifications,retry-notifications,60-seconds-notifications}
-KAFKA_SERVICE_LOG_TOPICS=${KAFKA_SERVICE_LOG_TOPICS:-log,transformed-log}
diff --git a/doc/api-samples/.gitkeep b/doc/api-samples/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/doc/api-samples/empty.json b/doc/api-samples/empty.json
deleted file mode 100644
index c267aa9bd..000000000
--- a/doc/api-samples/empty.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "test": {}
-}
diff --git a/doc/requirements.txt b/doc/requirements.txt
deleted file mode 100644
index c35efa85d..000000000
--- a/doc/requirements.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# documentation
-sphinx>=2.0.0,!=2.1.0 # BSD
-os-api-ref>=1.4.0 # Apache-2.0
-reno>=3.1.0 # Apache-2.0
-openstackdocstheme>=2.2.1 # Apache-2.0
-SQLAlchemy>=1.3.0 # MIT
-oslo.config>=6.8.0 # Apache-2.0
diff --git a/doc/source/.gitkeep b/doc/source/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/doc/source/_static/images/architecture.png b/doc/source/_static/images/architecture.png
deleted file mode 100644
index b5dd78a06..000000000
Binary files a/doc/source/_static/images/architecture.png and /dev/null differ
diff --git a/doc/source/_static/images/architecture.svg b/doc/source/_static/images/architecture.svg
deleted file mode 100644
index b22a677e5..000000000
--- a/doc/source/_static/images/architecture.svg
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/doc/source/admin/index.rst b/doc/source/admin/index.rst
deleted file mode 100644
index 0e041340d..000000000
--- a/doc/source/admin/index.rst
+++ /dev/null
@@ -1,89 +0,0 @@
-====================
-Administration guide
-====================
-
-.. toctree::
- :maxdepth: 2
-
-Schema Setup
-~~~~~~~~~~~~
-
-For setting up the Monasca configuration database, we provide ``monasca_db``,
-an Alembic based database migration tool. Historically, the schema for the
-configuration database was created by a SQL script. This SQL was changed a
-couple of times, so ``monasca_db`` comes with a mechanism to detect the SQL
-script revision being used to create it and stamp the database with the
-matching Alembic revision.
-
-Setting up a new database
--------------------------
-
-If you are deploying Monasca from scratch, database setup is quite
-straightforward:
-
-1. Create a database and configure access credentials with ``ALL PRIVILEGES``
- permission level on it in the Monasca API configuration file's
- ``[database]`` section.
-
-2. Run schema migrations: ``monasca_db upgrade``. It will run all migrations up
- to and including the most recent one (``head``) unless a revision to migrate
- to is explicitly specified.
-
-
-Upgrading Existing Database from Legacy Schema
-----------------------------------------------
-
-If you have been running an older version of Monasca, you can attempt to
-identify and stamp its database schema:
-
-::
-
- monasca_db stamp --from-fingerprint
-
-This command will generate a unique fingerprint for the database schema in
-question and match that fingerprint with an in-code map of fingerprints to
-database schema revisions. This should work for all official (shipped as part
-of the ``monasca-api`` repository) schema scripts. If you used a custom
-third-party schema script to set up the database, it may not be listed and
-you'll get an error message similar to this one (the fingerprint hash will
-vary):
-
-::
-
- Schema fingerprint 3d45493070e3b8e6fc492d2369e51423ca4cc1ac does not match any known legacy revision.
-
-If this happens to you, please create a Storyboard story against the
-`openstack/monasca-api project `_.
-Provide the following alongside the story:
-
-1. A copy of or pointer to the schema SQL script being used to set up the
- database.
-
-2. The fingerprint shown in the error message.
-
-3. The output of ``monasca_db fingerprint --raw``.
-
-Time Series Databases Setup
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Enabling InfluxDB Time Series Index in existing deployments
------------------------------------------------------------
-
-If enabling TSI on an existing InfluxDB install please follow the instructions
-for migrating existing data here:
-https://docs.influxdata.com/influxdb/v1.7/administration/upgrading/#upgrading-influxdb-1-3-1-4-no-tsi-preview-to-1-7-x-tsi-enabled
-
-Database Per Tenant
--------------------
-
-It is envisaged that separate database per tenant will be the default
-behaviour in a future release of Monasca. Not only would it make queries
-faster for tenants, it would also allow administrators to define
-retention policy per tenancy. To enable this, set
-`influxdb.db_per_tenant` to `True` in `monasca-{api,persister}` config
-(it defaults to `False` at the moment if not set).
-
-To migrate existing data to database per tenant, refer to README.rst
-under the following URL which also contains the Python script to
-facilitate migration:
-https://opendev.org/openstack/monasca-persister/src/branch/master/monasca_persister/tools/db-per-tenant/
diff --git a/doc/source/cli/index.rst b/doc/source/cli/index.rst
deleted file mode 100644
index 37a38160b..000000000
--- a/doc/source/cli/index.rst
+++ /dev/null
@@ -1,53 +0,0 @@
-======================
-Command Line Interface
-======================
-
-monasca (python-monascaclient)
-==============================
-This is the main command line interface for working with the
-Monasca services, including retrieving metrics from storage.
-
-See the https://docs.openstack.org/python-monascaclient/latest/ for details.
-
-
-monasca_db
-==========
-CLI for Monasca database management.
-::
-
- usage: api [-h] [--config-dir DIR] [--config-file PATH] [--version]
- {fingerprint,detect-revision,stamp,upgrade,version} ...
-
-
-monasca-status
-==============
-CLI for checking the status of Monasca.
-
-Use the command `monasca-status upgrade check` to check
-the readiness of the system for an upgrade.
-
-**Return Codes**
-
- .. list-table::
- :widths: 20 80
- :header-rows: 1
-
- * - Return code
- - Description
- * - 0
- - All upgrade readiness checks passed successfully and there is nothing
- to do.
- * - 1
- - At least one check encountered an issue and requires further
- investigation. This is considered a warning but the upgrade may be OK.
- * - 2
- - There was an upgrade status check failure that needs to be
- investigated. This should be considered something that stops an
- upgrade.
- * - 255
- - An unexpected error occurred.
-
-**History**
-
-Introduced in the Stein cycle as part of the OpenStack Community wide goal.
-https://governance.openstack.org/tc/goals/stein/upgrade-checkers.html
diff --git a/doc/source/conf.py b/doc/source/conf.py
deleted file mode 100644
index ed1c6b078..000000000
--- a/doc/source/conf.py
+++ /dev/null
@@ -1,242 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# monasca-api documentation build configuration file, created by
-# sphinx-quickstart on Wed Nov 18 12:02:03 2015.
-#
-# This file is execfile()d with the current directory set to its
-# containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import os
-import sys
-
-sys.path = [
- os.path.abspath('../..'),
- os.path.abspath('../../bin')
-] + sys.path
-
-# -- General configuration ------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-needs_sphinx = '1.6'
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = [
- 'sphinx.ext.coverage',
- 'sphinx.ext.ifconfig',
- 'sphinx.ext.graphviz',
- 'sphinx.ext.autodoc',
- 'sphinx.ext.viewcode',
- 'oslo_config.sphinxconfiggen',
- 'oslo_config.sphinxext',
- 'openstackdocstheme',
-]
-
-# geeneral information about project
-openstackdocs_repo_name = u'openstack/monasca-api'
-openstackdocs_pdf_link = True
-openstackdocs_use_storyboard = True
-copyright = u'2014-present, OpenStack Foundation'
-author = u'OpenStack Foundation'
-
-# sample config
-config_generator_config_file = [
- ('config-generator/monasca-api.conf', '_static/monasca-api')
-]
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix(es) of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-source_encoding = 'utf-8'
-
-# The master toctree document.
-master_doc = 'index'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = [
- 'common',
- 'doc',
- 'documentation',
- 'etc',
- 'java'
-]
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-show_authors = True
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'native'
-
-# A list of ignored prefixes for module index sorting.
-modindex_common_prefix = ['monasca_api.', 'monasca']
-
-# -- Options for HTML output ----------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-html_theme = 'openstackdocs'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-# html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-# html_theme_path = []
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# " v documentation".
-# html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-# html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-# html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# doc. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-# html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# Add any extra paths that contain custom files (such as robots.txt or
-# .htaccess) here, relative to this directory. These files are copied
-# directly to the root of the documentation.
-# html_extra_path = []
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-html_use_index = True
-
-# If false, no module index is generated.
-html_use_modindex = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Language to be used for generating the HTML full-text search index.
-# Sphinx supports the following languages:
-# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
-# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
-#html_search_language = 'en'
-
-# A dictionary with options for the search language support, empty by default.
-# Now only 'ja' uses this config value
-#html_search_options = {'type': 'default'}
-
-# The name of a javascript file (relative to the configuration directory) that
-# implements a search results scorer. If empty, the default will be used.
-#html_search_scorer = 'scorer.js'
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'MonitoringApiDoc'
-
-# -- Options for LaTeX output ---------------------------------------------
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-# author, documentclass [howto, manual, or own class]).
-latex_documents = [
- (master_doc, 'doc-monasca-api.tex', u'Monasca Documentation',
- [author], 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-latex_domain_indices = False
-
-latex_elements = {
- 'makeindex': '',
- 'printindex': '',
- 'preamble': r'\setcounter{tocdepth}{3}',
-}
-
-# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664
-latex_use_xindy = False
-
-# -- Options for manual page output ---------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- (master_doc, 'monitoringapi', u'Monasca Documentation',
- [author], 1)
-]
-
-# If true, show URL addresses after external links.
-#man_show_urls = False
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'https://doc.python.org/': None}
diff --git a/doc/source/configuration/sample.rst b/doc/source/configuration/sample.rst
deleted file mode 100644
index e2c7db344..000000000
--- a/doc/source/configuration/sample.rst
+++ /dev/null
@@ -1,40 +0,0 @@
-.. _sample-configuration:
-
--------
-Samples
--------
-
-The following sections show sample configuration files for monasca-api and
-related utilities. These are generated from the code
-(apart from the samples for logging and paster) and reflect the current state
-of code in the monasca-api repository.
-
-
-.. _sample-configuration-api:
-
-Sample Configuration For Application
-------------------------------------
-
-This sample configuration can also be viewed in `monasca-api.conf.sample
-<../_static/monasca-api.conf.sample>`_.
-
-.. literalinclude:: ../_static/monasca-api.conf.sample
-
-.. _sample-configuration-logging:
-
-Sample Configuration For Logging
---------------------------------
-
-This sample configuration can also be viewed in `api-logging.conf
-`_.
-
-.. literalinclude:: ../../../etc/api-logging.conf
-
-
-Sample Configuration For Paster
--------------------------------
-
-This sample configuration can also be viewed in `api-config.ini
-`_.
-
-.. literalinclude:: ../../../etc/api-config.ini
diff --git a/doc/source/contributor/.gitignore b/doc/source/contributor/.gitignore
deleted file mode 100644
index 13f025dd0..000000000
--- a/doc/source/contributor/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# codebase documentation is autogenerated
-# do not track it
-api/
diff --git a/doc/source/contributor/code.rst b/doc/source/contributor/code.rst
deleted file mode 100644
index 4248dfafa..000000000
--- a/doc/source/contributor/code.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-.. _codedocs:
-
-======================
-Codebase documentation
-======================
-
-Following section contains codebase documenation generated with, a little
-bit of assistance, `sphinx.ext.autodoc`_.
-
-.. _`sphinx.ext.autodoc`: http://www.sphinx-doc.org/en/stable/ext/autodoc.html
-
-Modules
-=======
-
-.. toctree::
- :maxdepth: 2
diff --git a/doc/source/contributor/contributing.rst b/doc/source/contributor/contributing.rst
deleted file mode 100644
index 19bf32436..000000000
--- a/doc/source/contributor/contributing.rst
+++ /dev/null
@@ -1,188 +0,0 @@
-============================
-So You Want to Contribute...
-============================
-
-For general information on contributing to OpenStack, please check out the
-`contributor guide `_ to get started.
-It covers all the basics that are common to all OpenStack projects: the
-accounts you need, the basics of interacting with our Gerrit review system,
-how we communicate as a community, etc.
-
-Below will cover the more project specific information you need to get started
-with Monasca.
-
-Communication
-~~~~~~~~~~~~~
-.. This would be a good place to put the channel you chat in as a project; when/
- where your meeting is, the tags you prepend to your ML threads, etc.
-
-For communicating with Monasca Team, you can reach out to us on
-*#openstack-monasca* IRC channel at OFTC.
-
-We hold weekly `team meetings`_ in our IRC channel which is a good opportunity
-to ask questions, propose new features or just get in touch with the team.
-
-You can also send us an email to the mailing list
-`openstack-discuss@lists.openstack.org`_. Please use *[Monasca]* tag for
-easier thread filtering.
-
-.. _team meetings: http://eavesdrop.openstack.org/#Monasca_Team_Meeting
-.. _openstack-discuss@lists.openstack.org: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss
-
-Contacting the Core Team
-~~~~~~~~~~~~~~~~~~~~~~~~
-.. This section should list the core team, their irc nicks, emails, timezones
- etc. If all this info is maintained elsewhere (i.e. a wiki), you can link to
- that instead of enumerating everyone here.
-
-================== ========== =====
-Name IRC nick Email
-================== ========== =====
-Martin Chacon Piza chaconpiza MartinDavid.ChaconPiza1@est.fujitsu.com
-Witek Bedyk witek witold.bedyk@suse.com
-Doug Szumski dougsz doug@stackhpc.com
-Adrian Czarnecki adriancz adrian.czarnecki@ts.fujitsu.com
-Joseph Davis joadavis joseph.davis@suse.com
-================== ========== =====
-
-New Feature Planning
-~~~~~~~~~~~~~~~~~~~~
-.. This section is for talking about the process to get a new feature in. Some
- projects use blueprints, some want specs, some want both! Some projects
- stick to a strict schedule when selecting what new features will be reviewed
- for a release.
-
-Our process is meant to allow users, developers, and operators to express their
-desires for new features using Storyboard stories. The workflow is very simple:
-
-* If something is clearly broken, submit a `bug report`_ in Storyboard.
-* If you want to change or add a feature, submit a `story`_ in Storyboard.
-* Monasca core reviewers may request that you submit a `specification`_ to
- gerrit to elaborate on the feature request.
-* Significant features require `release notes`_ to be included when the code is
- merged.
-
-.. _story:
-
-Stories
--------
-
-New features can be proposed in `Storyboard
-`_ as new Story.
-
-The initial story primarily needs to express the intent of the idea with
-enough details that it can be evaluated for compatibility with the project
-mission and whether or not the change requires a `specification`_. It is *not*
-expected to contain all of the implementation details. If the feature is very
-simple and well understood by the team, then describe it simply. The story is
-then used to track all the related code reviews. Team members will
-request more information as needed.
-
-.. _specification:
-
-Specifications
---------------
-
-We use the `monasca-specs `_
-repository for specification reviews. Specifications:
-
-* Provide a review tool for collaborating on feedback and reviews for complex
- features.
-* Collect team priorities.
-* Serve as the basis for documenting the feature once implemented.
-* Ensure that the overall impact on the system is considered.
-
-.. _release notes:
-
-Release Notes
--------------
-
-The release notes for a patch should be included in the patch. If not, the
-release notes should be in a follow-on review.
-
-If any of the following applies to the patch, a release note is required:
-
-* The deployer needs to take an action when upgrading
-* A new feature is implemented
-* Plugin API function was removed or changed
-* Current behavior is changed
-* A new config option is added that the deployer should consider changing from
- the default
-* A security bug is fixed
-* Change may break previous versions of the client library(ies)
-* Requirement changes are introduced for important libraries like oslo, six
- requests, etc.
-* Deprecation period starts or code is purged
-
-A release note is suggested if a long-standing or important bug is fixed.
-Otherwise, a release note is not required.
-
-Task Tracking
-~~~~~~~~~~~~~
-.. This section is about where you track tasks- launchpad? storyboard? is there
- more than one launchpad project? what's the name of the project group in
- storyboard?
-
-We track our tasks in Storyboard
-
-https://storyboard.openstack.org/#!/project_group/monasca
-
-If you're looking for some smaller, easier work item to pick up and get started
-on, search for the *'low-hanging-fruit'* tag.
-
-Kanban Board
-------------
-
-Progress on implementation of important stories in Ussuri release is tracked in
-`Monasca Board on StoryBoard `_.
-
-.. _bug report:
-
-Reporting a Bug
-~~~~~~~~~~~~~~~
-.. Pretty self explanatory section, link directly to where people should report
- bugs for your project.
-
-You found an issue and want to make sure we are aware of it? You can `report
-them on Storyboard `_.
-
-When filing a bug please remember to add the *bug* tag to the story. Please
-provide information on what the problem is, how to replicate it, any
-suggestions for fixing it, and a recommendation of the priority.
-
-All open bugs can be found in this `Worklist
-`_.
-
-Getting Your Patch Merged
-~~~~~~~~~~~~~~~~~~~~~~~~~
-.. This section should have info about what it takes to get something merged. Do
- you require one or two +2's before +W? Do some of your repos require unit
- test changes with all patches? etc.
-
-All changes proposed to Monasca requires at least one ``Code-Review +2`` votes
-from Monasca core reviewers before one of the core reviewers can approve
-patch by giving ``Workflow +1`` vote.
-
-Reviews Prioritisation
-----------------------
-
-Monasca project uses *Review-Priority* field in Gerrit to emphasize
-prioritized code changes.
-
-Every developer can propose the changes which should be prioritized
-in `weekly team meeting `_
-or in the mailing list. Any core reviewer,
-preferably from a different company, can confirm such proposed change
-by setting *Review-Priority* +1.
-
-Prioritized changes can be listed in this
-`dashboard `_.
-
-Project Team Lead Duties
-~~~~~~~~~~~~~~~~~~~~~~~~
-.. this section is where you can put PTL specific duties not already listed in
- the common PTL guide (linked below), or if you already have them written
- up elsewhere you can link to that doc here.
-
-All common PTL duties are enumerated in the `PTL guide
-`_.
diff --git a/doc/source/contributor/db_migrations.rst b/doc/source/contributor/db_migrations.rst
deleted file mode 100644
index bee6ce705..000000000
--- a/doc/source/contributor/db_migrations.rst
+++ /dev/null
@@ -1,17 +0,0 @@
-Database Migrations
--------------------
-
-Monasca uses `Alembic `_
-migrations to set up its configuration database. If you need to change the
-configuration database's schema, you need to create a migration to adjust the
-database accordingly, as follows::
-
- cd monasca_api/db/
- alembic revision
-
-This will create a new skeleton revision for you to edit. You will find
-existing revisions to use for inspiration in the
-``/monasca_api/db/alembic/versions/`` directory.
-
-Measurement data stored in a Time Series database (such as InfluxDB) would
-be migrated to a new version using standard practice for a given TSDB.
diff --git a/doc/source/contributor/index.rst b/doc/source/contributor/index.rst
deleted file mode 100644
index 8fcda36cb..000000000
--- a/doc/source/contributor/index.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-==========================
-Contribution documentation
-==========================
-
-.. toctree::
- :maxdepth: 1
-
- contributing.rst
- db_migrations.rst
- code.rst
diff --git a/doc/source/glossary.rst b/doc/source/glossary.rst
deleted file mode 100644
index fa106d194..000000000
--- a/doc/source/glossary.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-========
-Glossary
-========
diff --git a/doc/source/index.rst b/doc/source/index.rst
deleted file mode 100644
index 0a9a49889..000000000
--- a/doc/source/index.rst
+++ /dev/null
@@ -1,149 +0,0 @@
-..
- monasca-api documentation master file
- Copyright 2017 FUJITSU LIMITED
-
- 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.
-
-===================================
-Welcome to Monasca's Documentation!
-===================================
-
-The monitoring requirements in OpenStack environments are vast, varied, and
-highly complex. Monasca's project mission is to provide a
-monitoring-as-a-service solution that is multi-tenant, highly scalable,
-performant, and fault-tolerant. Monasca provides an extensible platform for
-advanced monitoring that can be used by both operators and tenants to gain
-operational insights about their infrastructure and applications.
-
-Monasca uses REST APIs for high-speed metrics, logs processing and querying. It
-integrates a streaming alarm engine, a notification engine and an aggregation
-engine.
-
-The use cases you can implement with Monasca are very diverse. Monasca follows
-a micro-services architecture, with several services split across multiple
-repositories. Each module is designed to provide a discrete service in the
-overall monitoring solution and can be deployed or omitted according to
-operators/customers needs.
-
-Architecture
-============
-
-The following illustration provides an overview of Monasca's metrics pipeline
-and the interaction of the involved components. For information on Monasca's
-log pipeline, refer to
-`this wiki page `_.
-
-.. image:: /_static/images/architecture.png
- :width: 900 px
-
-Repositories
-------------
-
-* `monasca-api `_:
- RESTful API for metrics, alarms, and notifications.
-* `monasca-agent `_:
- Agent for retrieving metrics data.
-* `monasca-persister `_:
- Writes metrics and alarm state transitions to a time-series database.
-* `monasca-thresh `_:
- Thresholding engine for computing thresholds on metrics and determining alarm
- states.
-* `monasca-notification `_:
- Pluggable notification engine for consuming alarm state transitions and
- sending notifications for alarms.
-* `monasca-transform `_:
- Aggregation engine based on Apache Spark.
-* `monasca-aggregator `_:
- Light-weight metrics aggregator.
-
-Apart from sending requests directly to the API, the following tools are
-available for interacting with Monasca:
-
-* `Monasca Client `_:
- CLI and Python client.
-* `Horizon plugin `_:
- Plugin adding the monitoring panel to Horizon.
-* `Grafana app `_:
- Plugin for Grafana to view and configure alarm definitions, alarms, and
- notifications.
-
-Libraries:
-
-* `monasca-common `_:
- Common code used in the Monasca components.
-* `monasca-statsd `_:
- StatsD-compatible library for sending metrics from instrumented applications.
-
-Grafana__ integration:
-
-* `monasca-grafana-datasource
- `_:
- Multi-tenant Monasca data source for Grafana.
-* `grafana `_:
- Forked version of Grafana 4.1.2 with Keystone authentication added.
-
-__ https://grafana.com/
-
-For Contributors
-================
-
-.. toctree::
- :maxdepth: 1
-
- contributor/index
-
-For Operators
-================
-
-Administrating
---------------
-
-.. toctree::
- :maxdepth: 1
-
- admin/index
-
-Glossary
--------------
-.. toctree::
- :maxdepth: 2
-
- glossary
-
-Installation
-------------
-
-.. toctree::
- :maxdepth: 2
-
- install/index
-
-User
-------------
-
-.. toctree::
- :maxdepth: 2
-
- user/index
-
-Configuration
--------------
-
-* :doc:`Sample Config Files `
-
-.. toctree::
- :hidden:
-
- admin/index
- cli/index
- configuration/sample
diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst
deleted file mode 100644
index eeb01df82..000000000
--- a/doc/source/install/index.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-============
-Installation
-============
-
-.. toctree::
- :maxdepth: 2
diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst
deleted file mode 100644
index 8da48ac21..000000000
--- a/doc/source/user/index.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-==========
-User guide
-==========
-
-.. toctree::
- :maxdepth: 2
diff --git a/docker/Dockerfile b/docker/Dockerfile
deleted file mode 100644
index d8b109f86..000000000
--- a/docker/Dockerfile
+++ /dev/null
@@ -1,79 +0,0 @@
-ARG DOCKER_IMAGE=monasca/api
-ARG APP_REPO=https://review.opendev.org/openstack/monasca-api
-
-# Branch, tag or git hash to build from.
-ARG REPO_VERSION=master
-ARG CONSTRAINTS_BRANCH=master
-
-# Extra Python3 dependencies.
-# gevent is not in upper constrains and v1.3.6 is not working with
-# older greenlet.
-ARG EXTRA_DEPS="gunicorn gevent>=21.12.0 python-memcached influxdb"
-
-# Always start from `monasca-base` image and use specific tag of it.
-ARG BASE_TAG=master
-FROM monasca/base:$BASE_TAG
-
-# Environment variables used for our service or wait scripts.
-ENV \
- KAFKA_URI=kafka:9092 \
- KAFKA_WAIT_FOR_TOPICS=alarm-state-transitions,metrics \
- KAFKA_LEGACY_CLIENT_ENABLED=false \
- MONASCA_CONTAINER_API_PORT=8070 \
- DATABASE_BACKEND=influxdb \
- INFLUX_HOST=influxdb \
- INFLUX_PORT=8086 \
- INFLUX_USER=mon_api \
- INFLUX_PASSWORD=password \
- INFLUX_DB=mon \
- CASSANDRA_CONTACT_POINTS=cassandra \
- CASSANDRA_PORT=9042 \
- CASSANDRA_KEY_SPACE=monasca \
- CASSANDRA_USER=mon_persister \
- CASSANDRA_PASSWORD=password \
- CASSANDRA_CONNECTION_TIMEOUT=5 \
- MYSQL_HOST=mysql \
- MYSQL_PORT=3306 \
- MYSQL_USER=monapi \
- MYSQL_PASSWORD=password \
- MYSQL_DB=mon \
- MEMCACHED_URI=memcached:11211 \
- DEFAULT_REGION=RegionOne \
- KEYSTONE_IDENTITY_URI=http://keystone:35357 \
- KEYSTONE_AUTH_URI=http://keystone:5000 \
- KEYSTONE_ADMIN_USER=admin \
- KEYSTONE_ADMIN_PASSWORD=secretadmin \
- KEYSTONE_ADMIN_TENANT=admin \
- KEYSTONE_ADMIN_DOMAIN=default \
- KEYSTONE_INSECURE=false \
- GUNICORN_WORKERS=9 \
- GUNICORN_WORKER_CLASS=gevent \
- GUNICORN_WORKER_CONNECTIONS=2000 \
- GUNICORN_BACKLOG=1000 \
- GUNICORN_TIMEOUT=10 \
- ADD_ACCESS_LOG=true \
- ACCESS_LOG_FORMAT="%(asctime)s [%(process)d] gunicorn.access [%(levelname)s] %(message)s" \
- ACCESS_LOG_FIELDS='%(h)s %(l)s %(u)s %(t)s %(r)s %(s)s %(b)s "%(f)s" "%(a)s" %(L)s' \
- LOG_LEVEL_ROOT=WARN \
- LOG_LEVEL_CONSOLE=INFO \
- LOG_LEVEL_ACCESS=INFO \
- STAY_ALIVE_ON_FAILURE=false \
- ENABLE_METRICS_API=true \
- ENABLE_LOGS_API=false
-
-# Copy all neccessary files to proper locations.
-COPY api-* /etc/monasca/
-COPY monasca-api.conf.j2 /etc/monasca/
-
-# Run here all additionals steps your service need post installation.
-# Stay with only one `RUN` and use `&& \` for next steps to don't create
-# unnecessary image layers. Clean at the end to conserve space.
-#RUN \
-# echo "Some steps to do after main installation." && \
-# echo "Hello when building."
-
-# Expose port for specific service.
-EXPOSE ${MONASCA_CONTAINER_API_PORT}
-
-# Implement start script in `start.sh` file.
-CMD ["/start.sh"]
diff --git a/docker/README.rst b/docker/README.rst
deleted file mode 100644
index 8054fc077..000000000
--- a/docker/README.rst
+++ /dev/null
@@ -1,119 +0,0 @@
-============================
-Docker image for Monasca API
-============================
-The Monasca API image is based on the monasca-base image.
-
-
-Building monasca-base image
-===========================
-See https://github.com/openstack/monasca-common/tree/master/docker/README.rst
-
-
-Building Monasca API image
-==========================
-
-Example:
- $ ./build_image.sh
-
-Everything after ``./build_image.sh`` is optional and by default configured
-to get versions from ``Dockerfile``. ``./build_image.sh`` also contain more
-detailed build description.
-
-Environment variables
-~~~~~~~~~~~~~~~~~~~~~
-============================== ======================================================================= ==========================================
-Variable Default Description
-============================== ======================================================================= ==========================================
-KAFKA_URI kafka:9092 URI to Apache Kafka (distributed streaming platform)
-KAFKA_LEGACY_CLIENT_ENABLED false Enable legacy Kafka client
-MONASCA_CONTAINER_API_PORT 8070 The port from the metric pipeline endpoint
-DATABASE_BACKEND influxdb Select for backend database
-INFLUX_HOST influxdb The host for influxdb
-INFLUX_PORT 8086 The port for influxdb
-INFLUX_USER mon_api The influx username
-INFLUX_PASSWORD password The influx password
-INFLUX_DB mon The influx database name
-CASSANDRA_CONTACT_POINTS cassandra Cassandra node addresses
-CASSANDRA_PORT 9042 Cassandra port number
-CASSANDRA_KEY_SPACE monasca Cassandra keyspace where metric are stored
-CASSANDRA_USER mon_persister Cassandra user name
-CASSANDRA_PASSWORD password Cassandra password
-CASSANDRA_CONNECTION_TIMEOUT 5 Cassandra timeout in seconds when creating a new connection
-MYSQL_HOST mysql The host for MySQL
-MYSQL_PORT 3306 The port for MySQL
-MYSQL_USER monapi The MySQL username
-MYSQL_PASSWORD password The MySQL password
-MYSQL_DB mon The MySQL database name
-API_MYSQL_DISABLED unset If 'true' do not use a mysql database. Only metric API will work
-MEMCACHED_URI memcached:11211 URI to Keystone authentication cache
-DEFAULT_REGION RegionOne Region that API is running in
-AUTHORIZED_ROLES admin,domainuser,domainadmin,monasca-user Roles for Monasca users (full API access)
-AGENT_AUTHORIZED_ROLES monasca-agent Roles for Monasca agents (sending data only)
-READ_ONLY_AUTHORIZED_ROLES monasca-read-only-user Roles for read only users
-DELEGATE_AUTHORIZED_ROLES admin Roles allow to read/write cross tenant ID
-KEYSTONE_IDENTITY_URI http://keystone:35357 URI to Keystone admin endpoint
-KEYSTONE_AUTH_URI http://keystone:5000 URI to Keystone public endpoint
-KEYSTONE_ADMIN_USER admin OpenStack administrator user name
-KEYSTONE_ADMIN_PASSWORD secretadmin OpenStack administrator user password
-KEYSTONE_ADMIN_TENANT admin OpenStack administrator tenant name
-KEYSTONE_ADMIN_DOMAIN default OpenStack administrator domain
-KEYSTONE_INSECURE false Allow insecure Keystone connection
-KEYSTONE_REGION_NAME undefined Keystone admin account region
-GUNICORN_WORKERS 9 Number of gunicorn (WSGI-HTTP server) workers
-GUNICORN_WORKER_CLASS gevent Used gunicorn worker class
-GUNICORN_WORKER_CONNECTIONS 2000 Number of gunicorn worker connections
-GUNICORN_BACKLOG 1000 Number of gunicorn backlogs
-GUNICORN_TIMEOUT 10 Gunicorn connection timeout
-ADD_ACCESS_LOG false Enable gunicorn request/access logging
-ACCESS_LOG_FORMAT "%(asctime)s [%(process)d] gunicorn.access [%(levelname)s] %(message)s" Define the logging format
-ACCESS_LOG_FIELDS '%(h)s %(l)s %(u)s %(t)s %(r)s %(s)s %(b)s "%(f)s" "%(a)s" %(L)s' Define the fields to be logged
-LOG_LEVEL_ROOT WARN Log level for root logging
-LOG_LEVEL_CONSOLE INFO Log level for console logging
-LOG_LEVEL_ACCESS INFO Log level for access logging
-STAY_ALIVE_ON_FAILURE false If true, container runs 2 hours after service fail
-ENABLE_METRICS_API true Enable/Disable metrics endpoints
-ENABLE_LOGS_API false Enable/disable logs endpoints
-============================== ======================================================================= ==========================================
-
-Wait scripts environment variables
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-======================== ================================ =========================================
-Variable Default Description
-======================== ================================ =========================================
-KAFKA_URI kafka:9092 URI to Apache Kafka
-KAFKA_WAIT_FOR_TOPICS alarm-state-transitions,metrics The topics where metric-api streams
- the metric messages and alarm-states
-KAFKA_WAIT_RETRIES 24 Number of kafka connect attempts
-KAFKA_WAIT_DELAY 5 Seconds to wait between attempts
-MYSQL_HOST mysql The host for MySQL
-MYSQL_PORT 3306 The port for MySQL
-MYSQL_USER monapi The MySQL username
-MYSQL_PASSWORD password The MySQL password
-MYSQL_DB mon The MySQL database name
-MYSQL_WAIT_RETRIES 24 Number of MySQL connection attempts
-MYSQL_WAIT_DELAY 5 Seconds to wait between attempts
-======================== ================================ =========================================
-
-Scripts
-~~~~~~~
-start.sh
- In this starting script provide all steps that lead to the proper service
- start. Including usage of wait scripts and templating of configuration
- files. You also could provide the ability to allow running container after
- service died for easier debugging.
-
-health_check.py
- This file will be used for checking the status of the application.
-
-Provide Configuration templates
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* monasca-api.conf.j2
-* api-config.ini.j2
-* api-logging.conf.j2
-
-
-Links
-~~~~~
-https://docs.openstack.org/monasca-api/latest/
-
-https://github.com/openstack/monasca-api/blob/master/README.rst
diff --git a/docker/api-config.ini.j2 b/docker/api-config.ini.j2
deleted file mode 100644
index e0f3b44dc..000000000
--- a/docker/api-config.ini.j2
+++ /dev/null
@@ -1,27 +0,0 @@
-[DEFAULT]
-name = monasca_api
-
-[pipeline:main]
-pipeline = request_id auth api
-
-[app:api]
-paste.app_factory = monasca_api.api.server:launch
-
-[filter:auth]
-paste.filter_factory = monasca_api.healthcheck.keystone_protocol:filter_factory
-
-[filter:request_id]
-paste.filter_factory = oslo_middleware.request_id:RequestId.factory
-
-[server:main]
-use = egg:gunicorn#main
-host = 0.0.0.0
-port = {{ MONASCA_CONTAINER_API_PORT }}
-workers = 9
-worker-connections = 2000
-worker-class = eventlet
-timeout = 30
-backlog = 2048
-keepalive = 2
-proc_name = monasca_api
-#loglevel = DEBUG
diff --git a/docker/api-gunicorn.conf.j2 b/docker/api-gunicorn.conf.j2
deleted file mode 100644
index d6bca3725..000000000
--- a/docker/api-gunicorn.conf.j2
+++ /dev/null
@@ -1,15 +0,0 @@
-bind = '0.0.0.0:{{ MONASCA_CONTAINER_API_PORT }}'
-proc_name = 'monasca-api'
-
-backlog = {{ GUNICORN_BACKLOG | int }}
-workers = {{ GUNICORN_WORKERS | int }}
-worker_class = '{{ GUNICORN_WORKER_CLASS }}'
-worker_connections = '{{ GUNICORN_WORKER_CONNECTIONS }}'
-timeout = {{ GUNICORN_TIMEOUT | int }}
-
-{% if ADD_ACCESS_LOG == true %}
-accesslog = '-'
-{% endif %}
-access_log_format = '{{ ACCESS_LOG_FIELDS }}'
-
-capture_output = True
diff --git a/docker/api-logging.conf.j2 b/docker/api-logging.conf.j2
deleted file mode 100644
index 517f46dae..000000000
--- a/docker/api-logging.conf.j2
+++ /dev/null
@@ -1,71 +0,0 @@
-[default]
-disable_existing_loggers = 0
-
-[loggers]
-keys = root, gunicorn.access, sqlalchemy, kafka, kafka.consumer, urllib3
-
-[handlers]
-keys = console, console_access
-
-[formatters]
-keys = context, generic
-
-[logger_root]
-level = {{ LOG_LEVEL_ROOT }}
-handlers = console
-
-[logger_gunicorn.access]
-level = INFO
-handlers = console_access
-propagate = 0
-qualname = gunicorn.access
-
-[logger_sqlalchemy]
-qualname = sqlalchemy.engine
-# "level = INFO" logs SQL queries.
-# "level = DEBUG" logs SQL queries and results.
-# "level = WARN" logs neither. (Recommended for production systems.)
-level = ERROR
-handlers = console
-propagate=0
-
-[logger_kafka.consumer]
-qualname = kafka.consumer
-level = INFO
-formatter = default
-handlers = console
-propagate = 0
-
-[logger_kafka]
-qualname = monasca_common.kafka_lib
-level = INFO
-formatter = default
-handlers = console
-propagate = 0
-
-[logger_urllib3]
-qualname = urllib3.connectionpool
-level = INFO
-formatter = default
-handlers = console
-propagate = 0
-
-[handler_console]
-class = logging.StreamHandler
-args = (sys.stdout,)
-level = {{ LOG_LEVEL_CONSOLE }}
-formatter = context
-
-[handler_console_access]
-class = logging.StreamHandler
-args = (sys.stdout,)
-level = {{ LOG_LEVEL_ACCESS }}
-formatter = generic
-
-[formatter_context]
-class = oslo_log.formatters.ContextFormatter
-
-[formatter_generic]
-format={{ ACCESS_LOG_FORMAT }}
-datefmt=%Y-%m-%d %H:%M:%S
-class=logging.Formatter
diff --git a/docker/build_image.sh b/docker/build_image.sh
deleted file mode 100755
index 59f2325f2..000000000
--- a/docker/build_image.sh
+++ /dev/null
@@ -1,150 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-# TODO(Dobroslaw): move this script to monasca-common/docker folder
-# and leave here small script to download it and execute using env variables
-# to minimize code duplication.
-
-set -x # Print each script step.
-set -eo pipefail # Exit the script if any statement returns error.
-
-# This script is used for building Docker image with proper labels
-# and proper version of monasca-common.
-#
-# Example usage:
-# $ ./build_image.sh
-#
-# Everything after `./build_image.sh` is optional and by default configured
-# to get versions from `Dockerfile`.
-#
-# To build from master branch (default):
-# $ ./build_image.sh
-# To build specific version run this script in the following way:
-# $ ./build_image.sh stable/queens
-# Building from specific commit:
-# $ ./build_image.sh cb7f226
-# When building from a tag monasca-common will be used in version available
-# in upper constraint file:
-# $ ./build_image.sh 2.5.0
-# To build image from Gerrit patch sets that is targeting branch stable/queens:
-# $ ./build_image.sh refs/changes/51/558751/1 stable/queens
-#
-# If you want to build image with custom monasca-common version you need
-# to provide it as in the following example:
-# $ ./build_image.sh master master refs/changes/19/595719/3
-
-# Go to folder with Docker files.
-REAL_PATH=$(python3 -c "import os,sys; print(os.path.realpath('$0'))")
-cd "$(dirname "$REAL_PATH")/../docker/"
-
-[ -z "$DOCKER_IMAGE" ] && \
- DOCKER_IMAGE=$(\grep DOCKER_IMAGE Dockerfile | cut -f2 -d"=")
-
-: "${REPO_VERSION:=$1}"
-[ -z "$REPO_VERSION" ] && \
- REPO_VERSION=$(\grep REPO_VERSION Dockerfile | cut -f2 -d"=")
-# Let's stick to more readable version and disable SC2001 here.
-# shellcheck disable=SC2001
-REPO_VERSION_CLEAN=$(echo "$REPO_VERSION" | sed 's|/|-|g')
-
-[ -z "$APP_REPO" ] && APP_REPO=$(\grep APP_REPO Dockerfile | cut -f2 -d"=")
-GITHUB_REPO=$(echo "$APP_REPO" | sed 's/review.opendev.org/github.com/' | \
- sed 's/ssh:/https:/')
-
-if [ -z "$CONSTRAINTS_FILE" ]; then
- CONSTRAINTS_FILE=$(\grep CONSTRAINTS_FILE Dockerfile | cut -f2 -d"=") || true
- : "${CONSTRAINTS_FILE:=https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}"
-fi
-
-: "${CONSTRAINTS_BRANCH:=$2}"
-[ -z "$CONSTRAINTS_BRANCH" ] && \
- CONSTRAINTS_BRANCH=$(\grep CONSTRAINTS_BRANCH Dockerfile | cut -f2 -d"=")
-
-# When using stable version of repository use same stable constraints file.
-case "$REPO_VERSION" in
- *stable*)
- CONSTRAINTS_BRANCH_CLEAN="$REPO_VERSION"
- CONSTRAINTS_FILE=${CONSTRAINTS_FILE/master/$CONSTRAINTS_BRANCH_CLEAN}
- # Get monasca-common version from stable upper constraints file.
- CONSTRAINTS_TMP_FILE=$(mktemp)
- wget --output-document "$CONSTRAINTS_TMP_FILE" \
- $CONSTRAINTS_FILE
- UPPER_COMMON=$(\grep 'monasca-common' "$CONSTRAINTS_TMP_FILE")
- # Get only version part from monasca-common.
- UPPER_COMMON_VERSION="${UPPER_COMMON##*===}"
- rm -rf "$CONSTRAINTS_TMP_FILE"
- ;;
- *)
- CONSTRAINTS_BRANCH_CLEAN="$CONSTRAINTS_BRANCH"
- ;;
-esac
-
-# Monasca-common variables.
-if [ -z "$COMMON_REPO" ]; then
- COMMON_REPO=$(\grep COMMON_REPO Dockerfile | cut -f2 -d"=") || true
- : "${COMMON_REPO:=https://review.opendev.org/openstack/monasca-common}"
-fi
-: "${COMMON_VERSION:=$3}"
-if [ -z "$COMMON_VERSION" ]; then
- COMMON_VERSION=$(\grep COMMON_VERSION Dockerfile | cut -f2 -d"=") || true
- if [ "$UPPER_COMMON_VERSION" ]; then
- # Common from upper constraints file.
- COMMON_VERSION="$UPPER_COMMON_VERSION"
- fi
-fi
-
-# Clone project to temporary directory for getting proper commit number from
-# branches and tags. We need this for setting proper image labels.
-# Docker does not allow to get any data from inside of system when building
-# image.
-TMP_DIR=$(mktemp -d)
-(
- cd "$TMP_DIR"
- # This many steps are needed to support gerrit patch sets.
- git init
- git remote add origin "$APP_REPO"
- git fetch origin "$REPO_VERSION"
- git reset --hard FETCH_HEAD
-)
-GIT_COMMIT=$(git -C "$TMP_DIR" rev-parse HEAD)
-[ -z "${GIT_COMMIT}" ] && echo "No git commit hash found" && exit 1
-rm -rf "$TMP_DIR"
-
-# Do the same for monasca-common.
-COMMON_TMP_DIR=$(mktemp -d)
-(
- cd "$COMMON_TMP_DIR"
- # This many steps are needed to support gerrit patch sets.
- git init
- git remote add origin "$COMMON_REPO"
- git fetch origin "$COMMON_VERSION"
- git reset --hard FETCH_HEAD
-)
-COMMON_GIT_COMMIT=$(git -C "$COMMON_TMP_DIR" rev-parse HEAD)
-[ -z "${COMMON_GIT_COMMIT}" ] && echo "No git commit hash found" && exit 1
-rm -rf "$COMMON_TMP_DIR"
-
-CREATION_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
-
-docker build --no-cache \
- --build-arg CREATION_TIME="$CREATION_TIME" \
- --build-arg GITHUB_REPO="$GITHUB_REPO" \
- --build-arg APP_REPO="$APP_REPO" \
- --build-arg REPO_VERSION="$REPO_VERSION" \
- --build-arg GIT_COMMIT="$GIT_COMMIT" \
- --build-arg CONSTRAINTS_FILE="$CONSTRAINTS_FILE" \
- --build-arg COMMON_REPO="$COMMON_REPO" \
- --build-arg COMMON_VERSION="$COMMON_VERSION" \
- --build-arg COMMON_GIT_COMMIT="$COMMON_GIT_COMMIT" \
- --tag "$DOCKER_IMAGE":"$REPO_VERSION_CLEAN" .
diff --git a/docker/health_check.py b/docker/health_check.py
deleted file mode 100755
index 312506539..000000000
--- a/docker/health_check.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-# coding=utf-8
-
-# (C) Copyright 2018 FUJITSU LIMITED
-#
-# 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.
-
-"""Health check will returns 0 when service is working properly."""
-
-import logging
-import os
-import sys
-from urllib import request
-
-
-LOG_LEVEL = logging.getLevelName(os.environ.get('LOG_LEVEL', 'INFO'))
-logging.basicConfig(level=LOG_LEVEL)
-logger = logging.getLogger(__name__)
-
-API_PORT = os.environ.get('MONASCA_CONTAINER_API_PORT', '8070')
-url = "http://localhost:" + API_PORT + "/healthcheck"
-
-
-def main():
- """Send health check request to health check endpoint of Monasca API."""
- logger.debug('Send health check request to %s', url)
- try:
- request.urlopen(url=url)
- except Exception as ex:
- logger.error('Exception during request handling: ' + repr(ex))
- sys.exit(1)
-
-
-if __name__ == '__main__':
- main()
diff --git a/docker/monasca-api.conf.j2 b/docker/monasca-api.conf.j2
deleted file mode 100644
index 3e2015e4c..000000000
--- a/docker/monasca-api.conf.j2
+++ /dev/null
@@ -1,870 +0,0 @@
-[DEFAULT]
-
-#
-# From monasca_api
-#
-
-#
-# Region that API is running in
-# (string value)
-#
-# This option has a sample default set, which means that
-# its actual default value may vary from the one documented
-# below.
-region = {{ DEFAULT_REGION }}
-
-#
-# Valid periods for notification methods
-# (list value)
-#valid_notification_periods = 0,60
-
-#
-# Enable Metrics api endpoints (boolean value)
-enable_metrics_api = {{ ENABLE_METRICS_API }}
-
-#
-# Enable Logs api endpoints (boolean value)
-enable_logs_api = {{ ENABLE_LOGS_API }}
-
-#
-# From oslo.log
-#
-
-# If set to true, the logging level will be set to DEBUG instead of the default
-# INFO level (boolean value)
-# Note: This option can be changed without restarting.
-#debug = false
-
-# The name of a logging configuration file. This file is appended to any
-# existing logging configuration files. For details about logging configuration
-# files, see the Python logging module documentation. Note that when logging
-# configuration files are used then all logging configuration is set in the
-# configuration file and other logging configuration options are ignored (for
-# example, logging_context_format_string) (string value)
-# Note: This option can be changed without restarting.
-# Deprecated group/name - [DEFAULT]/log_config
-log_config_append=/etc/monasca/api-logging.conf
-
-# Defines the format string for %%(asctime)s in log records. Default:
-# %(default)s . This option is ignored if log_config_append is set (string
-# value)
-#log_date_format = %Y-%m-%d %H:%M:%S
-
-# (Optional) Name of log file to send logging output to. If no default is set,
-# logging will go to stderr as defined by use_stderr. This option is ignored if
-# log_config_append is set (string value)
-# Deprecated group/name - [DEFAULT]/logfile
-#log_file =
-
-# (Optional) The base directory used for relative log_file paths. This option
-# is ignored if log_config_append is set (string value)
-# Deprecated group/name - [DEFAULT]/logdir
-#log_dir =
-
-# Uses logging handler designed to watch file system. When log file is moved or
-# removed this handler will open a new log file with specified path
-# instantaneously. It makes sense only if log_file option is specified and
-# Linux platform is used. This option is ignored if log_config_append is set
-# (boolean value)
-#watch_log_file = false
-
-# Use syslog for logging. Existing syslog format is DEPRECATED and will be
-# changed later to honor RFC5424. This option is ignored if log_config_append
-# is set (boolean value)
-#use_syslog = false
-
-# Enable journald for logging. If running in a systemd environment you may wish
-# to enable journal support. Doing so will use the journal native protocol
-# which includes structured metadata in addition to log messages.This option is
-# ignored if log_config_append is set (boolean value)
-#use_journal = false
-
-# Syslog facility to receive log lines. This option is ignored if
-# log_config_append is set (string value)
-#syslog_log_facility = LOG_USER
-
-# Use JSON formatting for logging. This option is ignored if log_config_append
-# is set (boolean value)
-#use_json = false
-
-# Log output to standard error. This option is ignored if log_config_append is
-# set (boolean value)
-#use_stderr = false
-
-# Log output to Windows Event Log (boolean value)
-#use_eventlog = false
-
-# The amount of time before the log files are rotated. This option is ignored
-# unless log_rotation_type is setto "interval" (integer value)
-#log_rotate_interval = 1
-
-# Rotation interval type. The time of the last file change (or the time when
-# the service was started) is used when scheduling the next rotation (string
-# value)
-# Possible values:
-# Seconds -
-# Minutes -
-# Hours -
-# Days -
-# Weekday -
-# Midnight -
-#log_rotate_interval_type = days
-
-# Maximum number of rotated log files (integer value)
-#max_logfile_count = 30
-
-# Log file maximum size in MB. This option is ignored if "log_rotation_type" is
-# not set to "size" (integer value)
-#max_logfile_size_mb = 200
-
-# Log rotation type (string value)
-# Possible values:
-# interval - Rotate logs at predefined time intervals.
-# size - Rotate logs once they reach a predefined size.
-# none - Do not rotate log files.
-#log_rotation_type = none
-
-# Format string to use for log messages with context (string value)
-#logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s
-
-# Format string to use for log messages when context is undefined (string
-# value)
-#logging_default_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s
-
-# Additional data to append to log message when logging level for the message
-# is DEBUG (string value)
-#logging_debug_format_suffix = %(funcName)s %(pathname)s:%(lineno)d
-
-# Prefix each line of exception output with this format (string value)
-#logging_exception_prefix = %(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s
-
-# Defines the format string for %(user_identity)s that is used in
-# logging_context_format_string (string value)
-#logging_user_identity_format = %(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s
-
-# List of package logging levels in logger=LEVEL pairs. This option is ignored
-# if log_config_append is set (list value)
-#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,oslo_messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN,taskflow=WARN,keystoneauth=WARN,oslo.cache=INFO,oslo_policy=INFO,dogpile.core.dogpile=INFO
-
-# Enables or disables publication of error events (boolean value)
-#publish_errors = false
-
-# The format for an instance that is passed with the log message (string value)
-#instance_format = "[instance: %(uuid)s] "
-
-# The format for an instance UUID that is passed with the log message (string
-# value)
-#instance_uuid_format = "[instance: %(uuid)s] "
-
-# Interval, number of seconds, of log rate limiting (integer value)
-#rate_limit_interval = 0
-
-# Maximum number of logged messages per rate_limit_interval (integer value)
-#rate_limit_burst = 0
-
-# Log level name used by rate limiting: CRITICAL, ERROR, INFO, WARNING, DEBUG
-# or empty string. Logs with level greater or equal to rate_limit_except_level
-# are not filtered. An empty string means that all levels are filtered (string
-# value)
-#rate_limit_except_level = CRITICAL
-
-# Enables or disables fatal status of deprecations (boolean value)
-#fatal_deprecations = false
-
-
-[cassandra]
-
-#
-# From monasca_api
-#
-
-#
-# Comma separated list of Cassandra node IP addresses
-# (list value)
-contact_points = {{ CASSANDRA_CONTACT_POINTS | default('127.0.0.1') }}
-
-#
-# Port to Cassandra server
-# (port value)
-port = {{ CASSANDRA_PORT | default('9042') }}
-
-#
-# keyspace where metric are stored
-# (string value)
-keyspace = {{ CASSANDRA_KEY_SPACE }}
-
-#
-# Cassandra user for monasca-api service
-# (string value)
-user = {{ CASSANDRA_USER }}
-
-#
-# Cassandra user password for monasca-api service
-# (string value)
-password = {{ CASSANDRA_PASSWORD }}
-
-#
-# Cassandra connection timeout in seconds
-# (integer value)
-connection_timeout = {{ CASSANDRA_CONNECTION_TIMEOUT }}
-
-
-[database]
-
-#
-# From oslo.db
-#
-
-# If True, SQLite uses synchronous mode (boolean value)
-#sqlite_synchronous = true
-
-# The back end to use for the database (string value)
-# Deprecated group/name - [DEFAULT]/db_backend
-#backend = sqlalchemy
-
-# The SQLAlchemy connection string to use to connect to the database (string
-# value)
-# Deprecated group/name - [DEFAULT]/sql_connection
-# Deprecated group/name - [DATABASE]/sql_connection
-# Deprecated group/name - [sql]/connection
-{% if not ( API_MYSQL_DISABLED is defined and API_MYSQL_DISABLED | lower == 'true' ) %}
-connection = "mysql+pymysql://{{ MYSQL_USER }}:{{ MYSQL_PASSWORD }}@{{ MYSQL_HOST }}:{{ MYSQL_PORT | default('3306') }}/{{ MYSQL_DB }}"
-{% endif %}
-
-
-# The SQLAlchemy connection string to use to connect to the slave database
-# (string value)
-#slave_connection =
-
-# The SQL mode to be used for MySQL sessions. This option, including the
-# default, overrides any server-set SQL mode. To use whatever SQL mode is set
-# by the server configuration, set this to no value. Example: mysql_sql_mode=
-# (string value)
-#mysql_sql_mode = TRADITIONAL
-
-# If True, transparently enables support for handling MySQL Cluster (NDB)
-# (boolean value)
-#mysql_enable_ndb = false
-
-# Connections which have been present in the connection pool longer than this
-# number of seconds will be replaced with a new one the next time they are
-# checked out from the pool (integer value)
-# Deprecated group/name - [DATABASE]/idle_timeout
-# Deprecated group/name - [database]/idle_timeout
-# Deprecated group/name - [DEFAULT]/sql_idle_timeout
-# Deprecated group/name - [DATABASE]/sql_idle_timeout
-# Deprecated group/name - [sql]/idle_timeout
-#connection_recycle_time = 3600
-
-# DEPRECATED: Minimum number of SQL connections to keep open in a pool (integer
-# value)
-# Deprecated group/name - [DEFAULT]/sql_min_pool_size
-# Deprecated group/name - [DATABASE]/sql_min_pool_size
-# This option is deprecated for removal.
-# Its value may be silently ignored in the future.
-# Reason: The option to set the minimum pool size is not supported by
-# sqlalchemy.
-#min_pool_size = 1
-
-# Maximum number of SQL connections to keep open in a pool. Setting a value of
-# 0 indicates no limit (integer value)
-# Deprecated group/name - [DEFAULT]/sql_max_pool_size
-# Deprecated group/name - [DATABASE]/sql_max_pool_size
-#max_pool_size = 5
-
-# Maximum number of database connection retries during startup. Set to -1 to
-# specify an infinite retry count (integer value)
-# Deprecated group/name - [DEFAULT]/sql_max_retries
-# Deprecated group/name - [DATABASE]/sql_max_retries
-#max_retries = 10
-
-# Interval between retries of opening a SQL connection (integer value)
-# Deprecated group/name - [DEFAULT]/sql_retry_interval
-# Deprecated group/name - [DATABASE]/reconnect_interval
-#retry_interval = 10
-
-# If set, use this value for max_overflow with SQLAlchemy (integer value)
-# Deprecated group/name - [DEFAULT]/sql_max_overflow
-# Deprecated group/name - [DATABASE]/sqlalchemy_max_overflow
-#max_overflow = 50
-
-# Verbosity of SQL debugging information: 0=None, 100=Everything (integer
-# value)
-# Minimum value: 0
-# Maximum value: 100
-# Deprecated group/name - [DEFAULT]/sql_connection_debug
-#connection_debug = 0
-
-# Add Python stack traces to SQL as comment strings (boolean value)
-# Deprecated group/name - [DEFAULT]/sql_connection_trace
-#connection_trace = false
-
-# If set, use this value for pool_timeout with SQLAlchemy (integer value)
-# Deprecated group/name - [DATABASE]/sqlalchemy_pool_timeout
-#pool_timeout =
-
-# Enable the experimental use of database reconnect on connection lost (boolean
-# value)
-#use_db_reconnect = false
-
-# Seconds between retries of a database transaction (integer value)
-#db_retry_interval = 1
-
-# If True, increases the interval between retries of a database operation up to
-# db_max_retry_interval (boolean value)
-#db_inc_retry_interval = true
-
-# If db_inc_retry_interval is set, the maximum seconds between retries of a
-# database operation (integer value)
-#db_max_retry_interval = 10
-
-# Maximum retries in case of connection error or deadlock error before error is
-# raised. Set to -1 to specify an infinite retry count (integer value)
-#db_max_retries = 20
-
-# Optional URL parameters to append onto the connection URL at connect time;
-# specify as param1=value1¶m2=value2& (string value)
-#connection_parameters =
-
-
-[dispatcher]
-
-#
-# From monasca_api
-#
-
-# Versions controller (string value)
-versions = monasca_api.v2.reference.versions:Versions
-
-# Version 2.0 controller (string value)
-version_2_0 = monasca_api.v2.reference.version_2_0:Version2
-
-# Metrics controller (string value)
-metrics = monasca_api.v2.reference.metrics:Metrics
-
-# Metrics measurements controller (string value)
-metrics_measurements = monasca_api.v2.reference.metrics:MetricsMeasurements
-
-# Metrics statistics controller (string value)
-metrics_statistics = monasca_api.v2.reference.metrics:MetricsStatistics
-
-# Metrics names controller (string value)
-metrics_names = monasca_api.v2.reference.metrics:MetricsNames
-
-# Alarm definitions controller (string value)
-alarm_definitions = monasca_api.v2.reference.alarm_definitions:AlarmDefinitions
-
-# Alarms controller (string value)
-alarms = monasca_api.v2.reference.alarms:Alarms
-
-# Alarms Count controller (string value)
-alarms_count = monasca_api.v2.reference.alarms:AlarmsCount
-
-# Alarms state history controller (string value)
-alarms_state_history = monasca_api.v2.reference.alarms:AlarmsStateHistory
-
-# Notification Methods controller (string value)
-notification_methods = monasca_api.v2.reference.notifications:Notifications
-
-# Dimension Values controller (string value)
-dimension_values = monasca_api.v2.reference.metrics:DimensionValues
-
-# Dimension Names controller (string value)
-dimension_names = monasca_api.v2.reference.metrics:DimensionNames
-
-# Notifications Type Methods controller (string value)
-notification_method_types = monasca_api.v2.reference.notificationstype:NotificationsType
-
-# Health checks endpoint controller (string value)
-healthchecks = monasca_api.healthchecks:HealthChecks
-
-
-[influxdb]
-
-#
-# From monasca_api
-#
-
-#
-# Database name where metrics are stored
-# (string value)
-database_name = {{ INFLUX_DB }}
-
-#
-# IP address to Influxdb server
-# (host address value)
-ip_address = {{ INFLUX_HOST }}
-
-# Port to Influxdb server (port value)
-# Minimum value: 0
-# Maximum value: 65535
-port = {{ INFLUX_PORT }}
-
-#
-# Influxdb user
-# (string value)
-user = {{ INFLUX_USER }}
-
-#
-# Influxdb password
-# (string value)
-password = {{ INFLUX_PASSWORD }}
-
-
-[kafka]
-
-#
-# From monasca_api
-#
-
-#
-# Comma separated list of Kafka broker host:port
-# (list value)
-uri = {{ KAFKA_URI }}
-
-#
-# The topic that metrics will be published to
-# (string value)
-metrics_topic = metrics
-
-#
-# The topic that events will be published too
-# (string value)
-#events_topic = events
-
-# The topic that logs will be published to (multi valued)
-#logs_topics = log
-
-#
-# The topic that alarm state will be published too
-# (string value)
-#alarm_state_transitions_topic = alarm-state-transitions
-
-#
-# The group name that this service belongs to
-# (string value)
-group = api
-
-#
-# The ack time back to kafka.
-# (integer value)
-#ack_time = 20
-
-#
-# The number of retry when there is a connection error
-# (integer value)
-max_retry = 1
-
-#
-# The type of posting
-# (boolean value)
-is_async = true
-
-#
-# Specify if the message received should be parsed.
-# If True, message will not be parsed, otherwise
-# messages will be parsed
-# (boolean value)
-compact = true
-
-#
-# The partitions this connection should
-# listen for messages on. Currently does not
-# support multiple partitions.
-# Default is to listen on partition 0
-# (list value)
-partitions = 0
-
-#
-# Specify if received data should be simply dropped.
-# This parameter is only for testing purposes
-# (boolean value)
-#drop_data = false
-
-#
-# The wait time when no messages on kafka queue
-# (integer value)
-# Minimum value: 1
-# Advanced Option: intended for advanced users and not used
-# by the majority of users, and might have a significant
-# effect on stability and/or performance.
-wait_time = 1
-
-#
-# Should messages be automatically committed
-# (boolean value)
-# Advanced Option: intended for advanced users and not used
-# by the majority of users, and might have a significant
-# effect on stability and/or performance.
-#auto_commit = false
-
-#
-# Enable legacy Kafka client. When set old version of
-# kafka-python library is used. Message format version
-# for the brokers should be set to 0.9.0.0 to avoid
-# performance issues until all consumers are upgraded.
-legacy_kafka_client_enabled = {{ KAFKA_LEGACY_CLIENT_ENABLED | default(false) }}
-
-
-[keystone_authtoken]
-
-auth_url = {{ KEYSTONE_IDENTITY_URI }}
-username = {{ KEYSTONE_ADMIN_USER }}
-password = {{ KEYSTONE_ADMIN_PASSWORD }}
-user_domain_name = Default
-project_name = {{ KEYSTONE_ADMIN_TENANT }}
-project_domain_name = Default
-
-#
-# From keystonemiddleware.auth_token
-#
-
-# Complete "public" Identity API endpoint. This endpoint should not be an
-# "admin" endpoint, as it should be accessible by all end users.
-# Unauthenticated clients are redirected to this endpoint to authenticate.
-# Although this endpoint should ideally be unversioned, client support in the
-# wild varies. If you're using a versioned v2 endpoint here, then this should
-# *not* be the same endpoint the service user utilizes for validating tokens,
-# because normal end users may not be able to reach that endpoint (string
-# value)
-# Deprecated group/name - [keystone_authtoken]/auth_uri
-www_authenticate_uri = {{ KEYSTONE_AUTH_URI }}
-
-# DEPRECATED: Complete "public" Identity API endpoint. This endpoint should not
-# be an "admin" endpoint, as it should be accessible by all end users.
-# Unauthenticated clients are redirected to this endpoint to authenticate.
-# Although this endpoint should ideally be unversioned, client support in the
-# wild varies. If you're using a versioned v2 endpoint here, then this should
-# *not* be the same endpoint the service user utilizes for validating tokens,
-# because normal end users may not be able to reach that endpoint. This option
-# is deprecated in favor of www_authenticate_uri and will be removed in the S
-# release (string value)
-# This option is deprecated for removal since Queens.
-# Its value may be silently ignored in the future.
-# Reason: The auth_uri option is deprecated in favor of www_authenticate_uri
-# and will be removed in the S release.
-#auth_uri =
-
-# API version of the admin Identity API endpoint (string value)
-#auth_version =
-
-# Do not handle authorization requests within the middleware, but delegate the
-# authorization decision to downstream WSGI components (boolean value)
-#delay_auth_decision = false
-
-# Request timeout value for communicating with Identity API server (integer
-# value)
-#http_connect_timeout =
-
-# How many times are we trying to reconnect when communicating with Identity
-# API Server (integer value)
-#http_request_max_retries = 3
-
-# Request environment key where the Swift cache object is stored. When
-# auth_token middleware is deployed with a Swift cache, use this option to have
-# the middleware share a caching backend with swift. Otherwise, use the
-# ``memcached_servers`` option instead (string value)
-#cache =
-
-# Required if identity server requires client certificate (string value)
-#certfile =
-
-# Required if identity server requires client certificate (string value)
-#keyfile =
-
-# A PEM encoded Certificate Authority to use when verifying HTTPs connections.
-# Defaults to system CAs (string value)
-#cafile =
-
-# Verify HTTPS connections (boolean value)
-insecure = {{ KEYSTONE_INSECURE }}
-
-# The region in which the identity server can be found (string value)
-{% if KEYSTONE_REGION_NAME is defined %}
-region_name = {{ KEYSTONE_REGION_NAME }}
-{% endif %}
-
-# DEPRECATED: Directory used to cache files related to PKI tokens. This option
-# has been deprecated in the Ocata release and will be removed in the P release
-# (string value)
-# This option is deprecated for removal since Ocata.
-# Its value may be silently ignored in the future.
-# Reason: PKI token format is no longer supported.
-#signing_dir =
-
-# Optionally specify a list of memcached server(s) to use for caching. If left
-# undefined, tokens will instead be cached in-process (list value)
-# Deprecated group/name - [keystone_authtoken]/memcache_servers
-memcached_servers = {{ MEMCACHED_URI }}
-
-# In order to prevent excessive effort spent validating tokens, the middleware
-# caches previously-seen tokens for a configurable duration (in seconds). Set
-# to -1 to disable caching completely (integer value)
-#token_cache_time = 300
-
-# DEPRECATED: Determines the frequency at which the list of revoked tokens is
-# retrieved from the Identity service (in seconds). A high number of revocation
-# events combined with a low cache duration may significantly reduce
-# performance. Only valid for PKI tokens. This option has been deprecated in
-# the Ocata release and will be removed in the P release (integer value)
-# This option is deprecated for removal since Ocata.
-# Its value may be silently ignored in the future.
-# Reason: PKI token format is no longer supported.
-#revocation_cache_time = 10
-
-# (Optional) If defined, indicate whether token data should be authenticated or
-# authenticated and encrypted. If MAC, token data is authenticated (with HMAC)
-# in the cache. If ENCRYPT, token data is encrypted and authenticated in the
-# cache. If the value is not one of these options or empty, auth_token will
-# raise an exception on initialization (string value)
-# Possible values:
-# None -
-# MAC -
-# ENCRYPT -
-#memcache_security_strategy = None
-
-# (Optional, mandatory if memcache_security_strategy is defined) This string is
-# used for key derivation (string value)
-#memcache_secret_key =
-
-# (Optional) Number of seconds memcached server is considered dead before it is
-# tried again (integer value)
-#memcache_pool_dead_retry = 300
-
-# (Optional) Maximum total number of open connections to every memcached server
-# (integer value)
-#memcache_pool_maxsize = 10
-
-# (Optional) Socket timeout in seconds for communicating with a memcached
-# server (integer value)
-#memcache_pool_socket_timeout = 3
-
-# (Optional) Number of seconds a connection to memcached is held unused in the
-# pool before it is closed (integer value)
-#memcache_pool_unused_timeout = 60
-
-# (Optional) Number of seconds that an operation will wait to get a memcached
-# client connection from the pool (integer value)
-#memcache_pool_conn_get_timeout = 10
-
-# (Optional) Use the advanced (eventlet safe) memcached client pool. The
-# advanced pool will only work under python 2.x (boolean value)
-#memcache_use_advanced_pool = false
-
-# (Optional) Indicate whether to set the X-Service-Catalog header. If False,
-# middleware will not ask for service catalog on token validation and will not
-# set the X-Service-Catalog header (boolean value)
-#include_service_catalog = true
-
-# Used to control the use and type of token binding. Can be set to: "disabled"
-# to not check token binding. "permissive" (default) to validate binding
-# information if the bind type is of a form known to the server and ignore it
-# if not. "strict" like "permissive" but if the bind type is unknown the token
-# will be rejected. "required" any form of token binding is needed to be
-# allowed. Finally the name of a binding method that must be present in tokens
-# (string value)
-#enforce_token_bind = permissive
-
-# DEPRECATED: If true, the revocation list will be checked for cached tokens.
-# This requires that PKI tokens are configured on the identity server (boolean
-# value)
-# This option is deprecated for removal since Ocata.
-# Its value may be silently ignored in the future.
-# Reason: PKI token format is no longer supported.
-#check_revocations_for_cached = false
-
-# DEPRECATED: Hash algorithms to use for hashing PKI tokens. This may be a
-# single algorithm or multiple. The algorithms are those supported by Python
-# standard hashlib.new(). The hashes will be tried in the order given, so put
-# the preferred one first for performance. The result of the first hash will be
-# stored in the cache. This will typically be set to multiple values only while
-# migrating from a less secure algorithm to a more secure one. Once all the old
-# tokens are expired this option should be set to a single value for better
-# performance (list value)
-# This option is deprecated for removal since Ocata.
-# Its value may be silently ignored in the future.
-# Reason: PKI token format is no longer supported.
-#hash_algorithms = md5
-
-# A choice of roles that must be present in a service token. Service tokens are
-# allowed to request that an expired token can be used and so this check should
-# tightly control that only actual services should be sending this token. Roles
-# here are applied as an ANY check so any role in this list must be present.
-# For backwards compatibility reasons this currently only affects the
-# allow_expired check (list value)
-#service_token_roles = service
-
-# For backwards compatibility reasons we must let valid service tokens pass
-# that don't pass the service_token_roles check as valid. Setting this true
-# will become the default in a future release and should be enabled if possible
-# (boolean value)
-service_token_roles_required = true
-
-# Authentication type to load (string value)
-# Deprecated group/name - [keystone_authtoken]/auth_plugin
-auth_type = password
-
-# Config Section from which to load plugin specific options (string value)
-#auth_section =
-
-
-[messaging]
-
-#
-# From monasca_api
-#
-
-#
-# The message queue driver to use
-# (string value)
-driver = monasca_api.common.messaging.kafka_publisher:KafkaPublisher
-
-# DEPRECATED:
-# The type of metrics message format to publish to the message queue
-# (string value)
-# This option is deprecated for removal since 2.1.0.
-# Its value may be silently ignored in the future.
-# Reason:
-# Option is not used anywhere in the codebase
-#metrics_message_format = reference
-
-# DEPRECATED:
-# The type of events message format to publish to the message queue
-# (string value)
-# This option is deprecated for removal since 2.1.0.
-# Its value may be silently ignored in the future.
-# Reason:
-# Option is not used anywhere in the codebase
-#events_message_format = reference
-
-
-[oslo_policy]
-
-#
-# From oslo.policy
-#
-
-# This option controls whether or not to enforce scope when evaluating
-# policies. If ``True``, the scope of the token used in the request is compared
-# to the ``scope_types`` of the policy being enforced. If the scopes do not
-# match, an ``InvalidScope`` exception will be raised. If ``False``, a message
-# will be logged informing operators that policies are being invoked with
-# mismatching scope (boolean value)
-#enforce_scope = false
-
-# The file that defines policies (string value)
-#policy_file = policy.yaml
-
-# Default rule. Enforced when a requested rule is not found (string value)
-#policy_default_rule = default
-
-# Directories where policy configuration files are stored. They can be relative
-# to any directory in the search path defined by the config_dir option, or
-# absolute paths. The file defined by policy_file must exist for these
-# directories to be searched. Missing or empty directories are ignored (multi
-# valued)
-#policy_dirs = policy.d
-
-# Content Type to send and receive data for REST based policy check (string
-# value)
-# Possible values:
-# application/x-www-form-urlencoded -
-# application/json -
-#remote_content_type = application/x-www-form-urlencoded
-
-# server identity verification for REST based policy check (boolean value)
-#remote_ssl_verify_server_crt = false
-
-# Absolute path to ca cert file for REST based policy check (string value)
-#remote_ssl_ca_crt_file =
-
-# Absolute path to client cert for REST based policy check (string value)
-#remote_ssl_client_crt_file =
-
-# Absolute path client key file REST based policy check (string value)
-#remote_ssl_client_key_file =
-
-
-[repositories]
-
-#
-# From monasca_api
-#
-
-#
-# The repository driver to use for metrics
-# (string value)
-# Advanced Option: intended for advanced users and not used
-# by the majority of users, and might have a significant
-# effect on stability and/or performance.
-{% if DATABASE_BACKEND | lower == 'cassandra' %}
-metrics_driver = monasca_api.common.repositories.cassandra.metrics_repository:MetricsRepository
-{% else %}
-metrics_driver = monasca_api.common.repositories.influxdb.metrics_repository:MetricsRepository
-{% endif %}
-
-#
-# The repository driver to use for alarm definitions
-# (string value)
-# Advanced Option: intended for advanced users and not used
-# by the majority of users, and might have a significant
-# effect on stability and/or performance.
-alarm_definitions_driver = monasca_api.common.repositories.sqla.alarm_definitions_repository:AlarmDefinitionsRepository
-
-#
-# The repository driver to use for alarms
-# (string value)
-# Advanced Option: intended for advanced users and not used
-# by the majority of users, and might have a significant
-# effect on stability and/or performance.
-alarms_driver = monasca_api.common.repositories.sqla.alarms_repository:AlarmsRepository
-
-#
-# The repository driver to use for notifications
-# (string value)
-# Advanced Option: intended for advanced users and not used
-# by the majority of users, and might have a significant
-# effect on stability and/or performance.
-notifications_driver = monasca_api.common.repositories.sqla.notifications_repository:NotificationsRepository
-
-#
-# The repository driver to use for notifications
-# (string value)
-# Advanced Option: intended for advanced users and not used
-# by the majority of users, and might have a significant
-# effect on stability and/or performance.
-notification_method_type_driver = monasca_api.common.repositories.sqla.notification_method_type_repository:NotificationMethodTypeRepository
-
-
-[security]
-
-#
-# From monasca_api
-#
-
-# Roles that are allowed to check the health (list value)
-#healthcheck_roles = @
-
-# Roles that are allowed to check the versions (list value)
-#versions_roles = @
-
-#
-# Roles that are allowed full access to the API
-# (list value)
-default_authorized_roles = {{ AUTHORIZED_ROLES | default('admin, domainuser, domainadmin, monasca-user') }}
-
-#
-# Roles that are only allowed to POST to the API
-# (list value)
-agent_authorized_roles = {{ AGENT_AUTHORIZED_ROLES | default('monasca-agent') }}
-
-#
-# Roles that are only allowed to GET from the API
-# (list value)
-read_only_authorized_roles = {{ READ_ONLY_AUTHORIZED_ROLES | default('monasca-read-only-user') }}
-
-#
-# Roles that are allowed to POST metrics on
-# behalf of another tenant
-# (list value)
-delegate_authorized_roles = {{ DELEGATE_AUTHORIZED_ROLES | default('admin') }}
diff --git a/docker/start.sh b/docker/start.sh
deleted file mode 100644
index 5428dfe2a..000000000
--- a/docker/start.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# Starting script.
-# All checks and configuration templating you need to do before service
-# could be safely started should be added in this file.
-
-set -eo pipefail # Exit the script if any statement returns error.
-
-# Test services we need before starting our service.
-echo "Start script: waiting for needed services"
-python3 /kafka_wait_for_topics.py
-python3 /mysql_check.py
-
-# Template all config files before start, it will use env variables.
-# Read usage examples: https://pypi.org/project/Templer/
-echo "Start script: creating config files from templates"
-templer -v -f /etc/monasca/monasca-api.conf.j2 /etc/monasca/monasca-api.conf
-templer -v -f /etc/monasca/api-config.ini.j2 /etc/monasca/api-config.ini
-templer -v -f /etc/monasca/api-logging.conf.j2 /etc/monasca/api-logging.conf
-templer -v -f /etc/monasca/api-gunicorn.conf.j2 /etc/monasca/api-gunicorn.conf
-
-# Start our service.
-echo "Start script: starting container"
-gunicorn \
- --config /etc/monasca/api-gunicorn.conf \
- --paste /etc/monasca/api-config.ini
-
-# Allow server to stay alive in case of failure for 2 hours for debugging.
-RESULT=$?
-if [ $RESULT != 0 ] && [ "$STAY_ALIVE_ON_FAILURE" = "true" ]; then
- echo "Service died, waiting 120 min before exiting"
- sleep 7200
-fi
-exit $RESULT
diff --git a/docs/java.md b/docs/java.md
deleted file mode 100644
index 463b0e4b3..000000000
--- a/docs/java.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# WARNING DEPRECATED
-
-The Java implementation of Monasca API is DEPRECATED and will be removed in a future release
-
-## Java Build
-
-Requires [monasca-common](https://github.com/openstack/monasca-common). First clone this repository and then do mvn install. Then return to monasca-api and:
-
- $ cd java
- $ mvn clean package
-
-## StackForge Java Build
-
-There is a pom.xml in the base directory that should only be used for the StackForge build. The StackForge build is a rather strange build because of the limitations of the current StackForge java jobs and infrastructure. We have found that the API runs faster if built with maven 3 but the StackForge nodes only have maven 2. This build checks the version of maven and if not maven 3, it downloads a version of maven 3 and uses it. This build depends on jars that are from monasca-common. That StrackForge build uploads the completed jars to http://tarballs.openstack.org/ci/monasca-common, but they are just regular jars, and not in a maven repository and sometimes zuul takes a long time to do the upload. Hence, the first thing the maven build from the base project does is invoke [build_common.sh](/common/build_common.sh) in the common directory. This script clones monasca-common and then invokes maven 3 to build monasca-common in the common directory and install the jars in the local maven repository.
-
-Since this is all rather complex, that part of the build only works on StackForge so follow the simple instruction above if you are building your own monasca-api.
-
-Currently this build is executed on the bare-precise nodes in StackForge and they only have maven 2. So, this build must be kept compatible with Maven 2. If another monasca-common jar is added as a dependency to [/java/pom.xml](/java/pom.xml), it must also be added to download/download.sh.
-
-Combining monasca-common, monasca-thresh, monasca-api and monasca-persister into one build would vastly simplify the builds but that is a future task.`
-
-## Usage
-
- $ java -jar target/monasca-api.jar server config-file.yml
-
-
-## Keystone Configuration
-
-For secure operation of the Monasca API, the API must be configured to use Keystone in the configuration file under the middleware section. Monasca only works with a Keystone v3 server. The important parts of the configuration are explained below:
-
-* serverVIP - This is the hostname or IP Address of the Keystone server
-* serverPort - The port for the Keystone server
-* useHttps - Whether to use https when making requests of the Keystone API
-* truststore - If useHttps is true and the Keystone server is not using a certificate signed by a public CA recognized by Java, the CA certificate can be placed in a truststore so the Monasca API will trust it, otherwise it will reject the https connection. This must be a JKS truststore
-* truststorePassword - The password for the above truststore
-* connSSLClientAuth - If the Keystone server requires the SSL client used by the Monasca server to have a specific client certificate, this should be true, false otherwise
-* keystore - The keystore holding the SSL Client certificate if connSSLClientAuth is true
-* keystorePassword - The password for the keystore
-* defaultAuthorizedRoles - An array of roles that authorize a user to access the complete Monasca API. User must have at least one of these roles. See below
-* readOnlyAuthorizedRoles - An array of roles that authorize a user to only GET (but not POST, PUT...) metrics. See Keystone Roles below
-* agentAuthorizedRoles - An array of roles that authorize only the posting of metrics. See Keystone Roles below
-* adminAuthMethod - "password" if the Monasca API should adminUser and adminPassword to login to the Keystone server to check the user's token, "token" if the Monasca API should use adminToken
-* adminUser - Admin user name
-* adminPassword - Admin user password
-* adminProjectId - Specify the project ID the api should use to request an admin token. Defaults to the admin user's default project. The adminProjectId option takes precedence over adminProjectName.
-* adminProjectName - Specify the project name the api should use to request an admin token. Defaults to the admin user's default project. The adminProjectId option takes precedence over adminProjectName.
-* adminToken - A valid admin user token if adminAuthMethod is token
-* timeToCacheToken - How long the Monasca API should cache the user's token before checking it again
-
-### Keystone Roles
-
-The Monasca API has two levels of access:
-* Full access - user can read/write metrics and Alarm Definitions and Alarms
-* Agent access - user can only write metrics
-
-The reason for the "Agent access" level is because the Monasca Agent must be configured to use a Keystone user. Since the user and password are configured on all of the systems running the Monasca Agent, this user is most in danger of being compromised. If this user is limited to only writing metrics, then the damage can be limited.
-
-To configure the user to have full access, the user must have a role that is listed in defaultAuthorizedRoles. To configure a user to have only "Agent access", the user must have a role in agentAuthorizedRoles and none of the roles in defaultAuthorizedRoles.
-
-If you want to give users the ability to only view data, configure one or more roles in the readOnlyAuthorizedRoles list.
-
-## Design Overview
-
-### Architectural layers
-
-Requests flow through the following architectural layers from top to bottom:
-
-* Resource
- * Serves as the entrypoint into the service.
- * Responsible for handling web service requests, and performing structural request validation.
-* Application
- * Responsible for providing application level implementations for specific use cases.
-* Domain
- * Contains the technology agnostic core domain model and domain service definitions.
- * Responsible for upholding invariants and defining state transitions.
-* Infrastructure
- * Contains technology specific implementations of domain services.
diff --git a/docs/monasca-api-spec.md b/docs/monasca-api-spec.md
deleted file mode 100644
index 88056e03b..000000000
--- a/docs/monasca-api-spec.md
+++ /dev/null
@@ -1,3709 +0,0 @@
-
-# Monasca API
-
-Date: November 5, 2014
-
-Document Version: v2.0
-
-
-
-**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
-
-- [Overview](#overview)
- - [Metric Name and Dimensions](#metric-name-and-dimensions)
- - [Name](#name)
- - [Dimensions](#dimensions)
- - [Text Representation](#text-representation)
- - [Measurement](#measurement)
- - [Value Meta](#value-meta)
- - [Alarm Definitions and Alarms](#alarm-definitions-and-alarms)
- - [Deterministic or non-deterministic alarms](#deterministic-or-non-deterministic-alarms)
- - [Alarm Definition Expressions](#alarm-definition-expressions)
- - [Syntax](#syntax)
- - [Simple Example](#simple-example)
- - [More Complex Example](#more-complex-example)
- - [Compound alarm example](#compound-alarm-example)
- - [Deterministic alarm example](#deterministic-alarm-example)
- - [Non-deterministic alarm with deterministic sub expressions](#non-deterministic-alarm-with-deterministic-sub-expressions)
- - [Changing Alarm Definitions](#changing-alarm-definitions)
- - [Notification Methods](#notification-methods)
-- [Common Request Headers](#common-request-headers)
- - [Common Http Request Headers](#common-http-request-headers)
- - [Non-standard request headers](#non-standard-request-headers)
-- [Common Responses](#common-responses)
-- [Paging](#paging)
- - [Offset](#offset)
- - [Limit](#limit)
-- [JSON Results](#json-results)
-- [Versions](#versions)
- - [List Versions](#list-versions)
- - [GET /](#get-)
- - [Headers](#headers)
- - [Path Parameters](#path-parameters)
- - [Query Parameters](#query-parameters)
- - [Request Body](#request-body)
- - [Request Examples](#request-examples)
- - [Response](#response)
- - [Status code](#status-code)
- - [Response Body](#response-body)
- - [Response Examples](#response-examples)
- - [Get Version](#get-version)
- - [Get /{version_id}](#get-version_id)
- - [Headers](#headers-1)
- - [Path Parameters](#path-parameters-1)
- - [Query Parameters](#query-parameters-1)
- - [Request Body](#request-body-1)
- - [Request Examples](#request-examples-1)
- - [Response](#response-1)
- - [Status code](#status-code-1)
- - [Response Body](#response-body-1)
- - [Response Examples](#response-examples-1)
-- [Health Check](#heltchcheck)
- - [Complex check](#complex_check)
- - [Simple check](#simple_check)
-- [Metrics](#metrics)
- - [Create Metric](#create-metric)
- - [POST /v2.0/metrics](#post-v20metrics)
- - [Headers](#headers-2)
- - [Path Parameters](#path-parameters-2)
- - [Query Parameters](#query-parameters-2)
- - [Request Body](#request-body-2)
- - [Request Examples](#request-examples-2)
- - [Single metric](#single-metric)
- - [Single metric with value_meta](#single-metric-with-value_meta)
- - [Array of metrics](#array-of-metrics)
- - [Response](#response-2)
- - [Status Code](#status-code)
- - [Response Body](#response-body-2)
- - [List metrics](#list-metrics)
- - [GET /v2.0/metrics](#get-v20metrics)
- - [Headers](#headers-3)
- - [Path Parameters](#path-parameters-3)
- - [Query Parameters](#query-parameters-3)
- - [Request Body](#request-body-3)
- - [Request Examples](#request-examples-3)
- - [Response](#response-3)
- - [Status Code](#status-code-1)
- - [Response Body](#response-body-3)
- - [Response Examples](#response-examples-2)
- - [List dimension values](#list-dimension-values)
- - [GET /v2.0/metrics/dimensions/names/values](#get-v20metricsdimensionsnamesvalues)
- - [Headers](#headers-4)
- - [Path Parameters](#path-parameters-4)
- - [Query Parameters](#query-parameters-4)
- - [Request Body](#request-body-4)
- - [Request Examples](#request-examples-4)
- - [Response](#response-4)
- - [Status Code](#status-code-2)
- - [Response Body](#response-body-4)
- - [Response Examples](#response-examples-3)
- - [List dimension names](#list-dimension-names)
- - [GET /v2.0/metrics/dimensions/names](#get-v20metricsdimensionsnames)
- - [Headers](#headers-5)
- - [Path Parameters](#path-parameters-5)
- - [Query Parameters](#query-parameters-5)
- - [Request Body](#request-body-5)
- - [Request Examples](#request-examples-5)
- - [Response](#response-5)
- - [Status Code](#status-code-3)
- - [Response Body](#response-body-5)
- - [Response Examples](#response-examples-4)
-- [Measurements](#measurements)
- - [List measurements](#list-measurements)
- - [GET /v2.0/metrics/measurements](#get-v20metricsmeasurements)
- - [Headers](#headers-6)
- - [Path Parameters](#path-parameters-6)
- - [Query Parameters](#query-parameters-6)
- - [Request Body](#request-body-6)
- - [Request Examples](#request-examples-6)
- - [Response](#response-6)
- - [Status Code](#status-code-4)
- - [Response Body](#response-body-6)
- - [Response Examples](#response-examples-5)
-- [Metric Names](#metric-names)
- - [List names](#list-names)
- - [GET /v2.0/metrics/names](#get-v20metricsnames)
- - [Headers](#headers-7)
- - [Path Parameters](#path-parameters-7)
- - [Query Parameters](#query-parameters-7)
- - [Request Body](#request-body-7)
- - [Request Examples](#request-examples-7)
- - [Response](#response-7)
- - [Status Code](#status-code-5)
- - [Response Body](#response-body-7)
- - [Response Examples](#response-examples-6)
-- [Statistics](#statistics)
- - [List statistics](#list-statistics)
- - [GET /v2.0/metrics/statistics](#get-v20metricsstatistics)
- - [Headers](#headers-8)
- - [Path Parameters](#path-parameters-8)
- - [Query Parameters](#query-parameters-8)
- - [Request Body](#request-body-8)
- - [Request Examples](#request-examples-8)
- - [Response](#response-8)
- - [Status Code](#status-code-6)
- - [Response Body](#response-body-8)
- - [Response Examples](#response-examples-7)
-- [Notification Methods](#notification-methods-1)
- - [Create Notification Method](#create-notification-method)
- - [POST /v2.0/notification-methods](#post-v20notification-methods)
- - [Headers](#headers-9)
- - [Path Parameters](#path-parameters-9)
- - [Query Parameters](#query-parameters-9)
- - [Request Body](#request-body-9)
- - [Request Examples](#request-examples-9)
- - [Response](#response-9)
- - [Status Code](#status-code-7)
- - [Response Body](#response-body-9)
- - [Response Examples](#response-examples-8)
- - [List Notification Methods](#list-notification-methods)
- - [GET /v2.0/notification-methods](#get-v20notification-methods)
- - [Headers](#headers-10)
- - [Path Parameters](#path-parameters-10)
- - [Query Parameters](#query-parameters-10)
- - [Request Body](#request-body-10)
- - [Request Examples](#request-examples-10)
- - [Response](#response-10)
- - [Status Code](#status-code-8)
- - [Response Body](#response-body-10)
- - [Response Examples](#response-examples-9)
- - [Get Notification Method](#get-notification-method)
- - [GET /v2.0/notification-methods/{notification_method_id}](#get-v20notification-methodsnotification_method_id)
- - [Headers](#headers-11)
- - [Path Parameters](#path-parameters-11)
- - [Query Parameters](#query-parameters-11)
- - [Request Body](#request-body-11)
- - [Request Examples](#request-examples-11)
- - [Response](#response-11)
- - [Status Code](#status-code-9)
- - [Response Body](#response-body-11)
- - [Response Examples](#response-examples-10)
- - [Update Notification Method](#update-notification-method)
- - [PUT /v2.0/notification-methods/{notification_method_id}](#put-v20notification-methodsnotification_method_id)
- - [Headers](#headers-12)
- - [Path Parameters](#path-parameters-12)
- - [Query Parameters](#query-parameters-12)
- - [Request Body](#request-body-12)
- - [Request Examples](#request-examples-12)
- - [Response](#response-12)
- - [Status Code](#status-code-10)
- - [Response Body](#response-body-12)
- - [Response Examples](#response-examples-11)
- - [Patch Notification Method](#patch-notification-method)
- - [PATCH /v2.0/notification-methods/{notification_method_id}](#patch-v20notification-methodsnotification_method_id)
- - [Headers](#headers-13)
- - [Path Parameters](#path-parameters-13)
- - [Query Parameters](#query-parameters-13)
- - [Request Body](#request-body-13)
- - [Request Examples](#request-examples-13)
- - [Response](#response-13)
- - [Status Code](#status-code-11)
- - [Response Body](#response-body-13)
- - [Response Examples](#response-examples-12)
- - [Delete Notification Method](#delete-notification-method)
- - [DELETE /v2.0/notification-methods/{notification_method_id}](#delete-v20notification-methodsnotification_method_id)
- - [Headers](#headers-14)
- - [Path Parameters](#path-parameters-14)
- - [Query Parameters](#query-parameters-14)
- - [Request Body](#request-body-14)
- - [Request Examples](#request-examples-14)
- - [Response](#response-14)
- - [Status Code](#status-code-12)
- - [Response Body](#response-body-14)
- - [List supported Notification Method Types](#list-supported-notification-method-types)
- - [GET /v2.0/notification-methods/types/](#get-v20notification-methodstypes)
- - [Headers](#headers-15)
- - [Query Parameters](#query-parameters-15)
- - [Request Body](#request-body-15)
- - [Request Examples](#request-examples-15)
- - [Response](#response-15)
- - [Status Code](#status-code-13)
- - [Response Body](#response-body-15)
- - [Response Examples](#response-examples-13)
-- [Alarm Definitions](#alarm-definitions)
- - [Create Alarm Definition](#create-alarm-definition)
- - [POST /v2.0/alarm-definitions](#post-v20alarm-definitions)
- - [Headers](#headers-16)
- - [Path Parameters](#path-parameters-15)
- - [Query Parameters](#query-parameters-16)
- - [Request Body](#request-body-16)
- - [Request Examples](#request-examples-16)
- - [Response](#response-16)
- - [Status Code](#status-code-14)
- - [Response Body](#response-body-16)
- - [Response Examples](#response-examples-14)
- - [List Alarm Definitions](#list-alarm-definitions)
- - [GET /v2.0/alarm-definitions](#get-v20alarm-definitions)
- - [Headers](#headers-17)
- - [Path Parameters](#path-parameters-16)
- - [Query Parameters](#query-parameters-17)
- - [Request Body](#request-body-17)
- - [Request Examples](#request-examples-17)
- - [Response](#response-17)
- - [Status Code](#status-code-15)
- - [Response Body](#response-body-17)
- - [Response Examples](#response-examples-15)
- - [Get Alarm Definition](#get-alarm-definition)
- - [GET /v2.0/alarm-definitions/{alarm_definition_id}](#get-v20alarm-definitionsalarm_definition_id)
- - [Headers](#headers-18)
- - [Path Parameters](#path-parameters-17)
- - [Query Parameters](#query-parameters-18)
- - [Request Body](#request-body-18)
- - [Response](#response-18)
- - [Status Code](#status-code-16)
- - [Response Body](#response-body-18)
- - [Response Examples](#response-examples-16)
- - [Update Alarm Definition](#update-alarm-definition)
- - [PUT /v2.0/alarm-definitions/{alarm_definition_id}](#put-v20alarm-definitionsalarm_definition_id)
- - [Headers](#headers-19)
- - [Path Parameters](#path-parameters-18)
- - [Query Parameters](#query-parameters-19)
- - [Request Body](#request-body-19)
- - [Request Examples](#request-examples-18)
- - [Response](#response-19)
- - [Status Code](#status-code-17)
- - [Response Body](#response-body-19)
- - [Response Examples](#response-examples-17)
- - [Patch Alarm Definition](#patch-alarm-definition)
- - [PATCH /v2.0/alarm-definitions/{alarm_definition_id}](#patch-v20alarm-definitionsalarm_definition_id)
- - [Headers](#headers-20)
- - [Path Parameters](#path-parameters-19)
- - [Query Parameters](#query-parameters-20)
- - [Request Body](#request-body-20)
- - [Request Examples](#request-examples-19)
- - [Response](#response-20)
- - [Status Code](#status-code-18)
- - [Response Body](#response-body-20)
- - [Response Examples](#response-examples-18)
- - [Delete Alarm Definition](#delete-alarm-definition)
- - [DELETE /v2.0/alarm-definitions/{alarm_definition_id}](#delete-v20alarm-definitionsalarm_definition_id)
- - [Headers](#headers-21)
- - [Path Parameters](#path-parameters-20)
- - [Query Parameters](#query-parameters-21)
- - [Request Body](#request-body-21)
- - [Request Examples](#request-examples-20)
- - [Response](#response-21)
- - [Status Code](#status-code-19)
- - [Response Body](#response-body-21)
-- [Alarms](#alarms)
- - [List Alarms](#list-alarms)
- - [GET /v2.0/alarms](#get-v20alarms)
- - [Headers](#headers-22)
- - [Path Parameters](#path-parameters-21)
- - [Query Parameters](#query-parameters-22)
- - [Request Body](#request-body-22)
- - [Request Examples](#request-examples-21)
- - [Response](#response-22)
- - [Status Code](#status-code-20)
- - [Response Body](#response-body-22)
- - [Response Examples](#response-examples-19)
- - [List Alarms State History](#list-alarms-state-history)
- - [GET /v2.0/alarms/state-history](#get-v20alarmsstate-history)
- - [Headers](#headers-23)
- - [Path Parameters](#path-parameters-22)
- - [Query Parameters](#query-parameters-23)
- - [Request Body](#request-body-23)
- - [Response](#response-23)
- - [Status Code](#status-code-21)
- - [Response Body](#response-body-23)
- - [Response Examples](#response-examples-20)
- - [Get Alarm](#get-alarm)
- - [GET /v2.0/alarms/{alarm_id}](#get-v20alarmsalarm_id)
- - [Headers](#headers-24)
- - [Path Parameters](#path-parameters-23)
- - [Query Parameters](#query-parameters-24)
- - [Request Body](#request-body-24)
- - [Response](#response-24)
- - [Status Code](#status-code-22)
- - [Response Body](#response-body-24)
- - [Response Examples](#response-examples-21)
- - [Update Alarm](#update-alarm)
- - [PUT /v2.0/alarms/{alarm_id}](#put-v20alarmsalarm_id)
- - [Headers](#headers-25)
- - [Path Parameters](#path-parameters-24)
- - [Query Parameters](#query-parameters-25)
- - [Request Body](#request-body-25)
- - [Request Examples](#request-examples-22)
- - [Response](#response-25)
- - [Status Code](#status-code-23)
- - [Response Body](#response-body-25)
- - [Response Examples](#response-examples-22)
- - [Patch Alarm](#patch-alarm)
- - [PATCH /v2.0/alarms/{alarm_id}](#patch-v20alarmsalarm_id)
- - [Headers](#headers-26)
- - [Path Parameters](#path-parameters-25)
- - [Query Parameters](#query-parameters-26)
- - [Request Body](#request-body-26)
- - [Request Examples](#request-examples-23)
- - [Response](#response-26)
- - [Status Code](#status-code-24)
- - [Response Body](#response-body-26)
- - [Response Examples](#response-examples-23)
- - [Delete Alarm](#delete-alarm)
- - [DELETE /v2.0/alarms/{alarm_id}](#delete-v20alarmsalarm_id)
- - [Headers](#headers-27)
- - [Path Parameters](#path-parameters-26)
- - [Query Parameters](#query-parameters-27)
- - [Request Body](#request-body-27)
- - [Request Examples](#request-examples-24)
- - [Response](#response-27)
- - [Status Code](#status-code-25)
- - [Response Body](#response-body-27)
- - [List Alarm State History](#list-alarm-state-history)
- - [GET /v2.0/alarms/{alarm_id}/state-history](#get-v20alarmsalarm_idstate-history)
- - [Headers](#headers-28)
- - [Path Parameters](#path-parameters-27)
- - [Query Parameters](#query-parameters-28)
- - [Request Body](#request-body-28)
- - [Request Data](#request-data)
- - [Response](#response-28)
- - [Status Code](#status-code-26)
- - [Response Body](#response-body-28)
- - [Response Examples](#response-examples-24)
-- [Logs](#logs)
- - [Create Logs](#create-logs)
- - [POST /v2.0/logs](#post-logs)
- - [Headers](#headers-29)
- - [Path Parameters](#path-parameters-28)
- - [Query Parameters](#query-parameters-29)
- - [Request Body](#request-body-29)
- - [Request Examples](#request-examples-25)
- - [Response](#response-29)
- - [Status Code](#status-code-27)
- - [Response Body](#response-body-28)
-- [License](#license)
-
-
-
-# Overview
-This document describes the Monasca API v2.0, which supports Monitoring as a Service (MONaaS). The Monasca API provides a RESTful JSON interface for interacting with and managing monitoring related resources.
-
-The API consists of eight main resources:
-
-1. Versions - Provides information about the supported versions of the API.
-2. Metrics - Provides for storage and retrieval of metrics.
-3. Measurements - Operations for querying measurements of metrics.
-4. Statistics - Operations for evaluating statistics of metrics.
-5. Notification Methods - Represents a method, such as email, which can be associated with an alarm definition via an action. When an alarm is triggered notification methods associated with the alarm definition are triggered.
-6. Alarm Definitions - Provides CRUD operations for alarm definitions.
-7. Alarms - Provides CRUD operations for alarms, and querying the alarm state history.
-8. Logs - Provides for storage of logs.
-
-Before using the API, you must first get a valid auth token from Keystone. All API operations require an auth token specified in the header of the http request.
-
-
-## Metric Name and Dimensions
-A metric is uniquely identified by a name and set of dimensions.
-
-### Name
-Defines the name of a metric. A name is of type string(255). The name may include any characters except the following: `> < = { } ( ) , ' " \ ; &`. Note that JSON does allow control characters (such as `\n`), however these should not be used in metric names.
-
-### Dimensions
-A dictionary of (key, value) pairs. The key and value are of type string(255).
-Dimension keys may not begin with '_' (underscore). The dimension key and value
-strings may include any characters except the following:
-`> < = { } , ' " \ ; &`. Note that JSON does allow control characters (such as
-`\n`), however these should not be used in dimension keys or values. Dimension
-keys and values must not be empty.
-
-### Text Representation
-In this document, metrics will be represented in the form `name{name=value,name=value}` where name is the metric name and the name=value pairs in the curly braces are the dimensions. For example, `cpu.idle_perc{service=monitoring,hostname=mini-mon}` represents a metric with the name "cpu.idle_perc" and the dimensions "service=monitoring" and "hostname=mini-mon".
-
-## Measurement
-A measurement is a value with a timestamp for a specific Metric. The value is represented by a double, e.g. 42.0 or 42.42.
-
-### Value Meta
-Optionally, a measurement may also contain extra data about the value which is known as value meta. Value meta is a set of name/value pairs that add textual data to the value of the measurement. The value meta will be returned from the API when the measurement is read. Only measurements that were written with value meta will have the key value pairs when read from the API. The value meta is ignored when computing statistics such as average on measurements.
-
-For an example of how value meta is used, imagine this metric: http_status{url: http://localhost:8070/healthcheck, hostname=devstack, service=object-storage}. The measurements for this metric have a value of either 1 or 0 depending if the status check succeeded. If the check fails, it would be helpful to have the actual http status code and error message if possible. So instead of just a value, the measurement will be something like:
-{Timestamp=now(), value=1, value_meta{http_rc=500, error="Error accessing MySQL"}}
-
-Up to 16 separate key/value pairs of value meta are allowed per measurement. The keys are required and are trimmed of leading and trailing whitespace and have a maximum length of 255 characters. The value is a string and value meta (with key, value and '{"":""}' combined) has a maximum length of 2048 characters. The value can be an empty string. Whitespace is not trimmed from the values.
-
-## Alarm Definitions and Alarms
-
-Alarm Definitions are policies that specify how Alarms should be created. By using Alarm Definitions, the user doesn't have to create individual alarms for each system or service. Instead, a small number of Alarm Definitions can be managed and Monasca will create Alarms for systems and services as they appear.
-
-An Alarm Definition has an expression for evaluating one or more metrics to determine if there is a problem. Depending on the Alarm Definition expression and match_by value, Monasca will create one or more Alarms depending on the measurements that are received. The match_by parameter specifies which dimension or dimensions should be used to determine if one or more alarms will be created.
-
-An example is the best way to show this. Imagine two Alarm Definitions have been created:
-
-Alarm Definition 1 has an expression of `avg(cpu.idle_perc{service=monitoring}) < 20` and the match_by parameter is not set. Alarm Definition 2 has an expression of `min(cpu.idle_perc{service=monitoring}) < 10` and the match_by parameter is set to `hostname`.
-
-When a measurement for the metric cpu.idle_perc{service=monitoring,hostname=mini-mon} is first received after the Metric Definitions have been created, an Alarm is created for both Alarm Definitions. The metric is added to both Alarms. The following set of Alarm Definitions and Alarm would exist:
-
-Alarm Definition 1:
-```
-Alarm 1 - Metrics: cpu.idle_perc{service=monitoring,hostname=mini-mon}
-```
-
-Alarm Definition 2:
-```
-Alarm 1 - Metrics: cpu.idle_perc{service=monitoring,hostname=mini-mon}
-```
-
-Now, when a measurement for the metric cpu.idle_perc{service=monitoring,hostname=devstack} is received, the two Alarm Definitions define different behaviors. Since the value for the hostname dimension is different from the value for the existing Alarm from Alarm Definition 2, and Alarm Definition 2 has specified a match_by parameter on `hostname`, a new Alarm will be created. Alarm Definition 1 does not have a value for match_by, so this metric is added to the existing Alarm. This gives us the following set of Alarm Definitions and Alarms:
-
-Alarm Definition 1:
-```
-Alarm 1 - Metrics: cpu.idle_perc{service=monitoring,hostname=mini-mon} and cpu.idle_perc{service=monitoring,hostname=devstack}
-```
-
-Alarm Definition 2:
-```
-Alarm 1 - Metrics: cpu.idle_perc{service=monitoring,hostname=mini-mon}
-Alarm 2 - Metrics: cpu.idle_perc{service=monitoring,hostname=devstack}
-```
-
-Alarm Definition 1 is evaluating the status of the monitoring service as a whole, while Alarm Definition 2 evaluates each system in the service.
-
-Now if another system is configured into the monitoring service, then when a measurement is received for its cpu.idle_perc metric, that metric will be added to the Alarm for Alarm Definition 1 and a new Alarm will be created for Alarm Definition 2, all without any user intervention. The system will be monitored without requiring the user to explicitly add alarms for the new system as other monitoring systems require.
-
-If an Alarm Definition expression has multiple subexpressions, for example, `avg(cpu.idle_perc{service=monitoring}) < 10 or avg(cpu.user_perc{service=monitoring}) > 60` and a match_by value set, then the metrics for both subexpressions must have the same value for the dimension specified in match_by. For example, assume this Alarm Definition:
-
-Expression `avg(cpu.idle_perc{service=monitoring}) < 10 or avg(cpu.user_perc{service=monitoring}) > 60` and match_by is `hostname`
-
-Now assume a measurement for each of these four metrics is received by Monasca:
-
-```
-cpu.idle_perc{service=monitoring,hostname=mini-mon}
-cpu.idle_perc{service=monitoring,hostname=devstack}
-cpu.user_perc{service=monitoring,hostname=mini-mon}
-cpu.user_perc{service=monitoring,hostname=devstack}
-```
-
-This will cause two Alarms to be created, one for each unique value of hostname. One Alarm will have the metrics:
-
-```
-avg(cpu.idle_perc{service=monitoring,hostname=mini-mon}) and avg(cpu.user_perc{service=monitoring,hostname=mini-mon})
-```
-
-and another will have the metrics:
-
-```
-avg(cpu.idle_perc{service=monitoring,hostname=devstack}) and avg(cpu.user_perc{service=monitoring,hostname=devstack})
-```
-
-Note that the value of match_by, "hostname", is used to match the metrics between the subexpressions, hence the name 'match_by'.
-
-As a negative example, assume a measurement for the below metric is received by Monasca:
-
-```
-cpu.idle_perc{service=nova,hostname=nova1}
-```
-
-This metric does not have the service=monitoring dimension, so it will not match the Alarm Definition and no Alarm will be created or metric added to an existing alarm.
-
-An Alarm will only get created when measurements are seen for metrics that match all subexpressions in the Alarm Definition. If match_by is set, then each metric must have a value for at least one of the values in match_by. If match_by is not set, only one Alarm will be created for an Alarm Definition.
-
-The value of the match_by parameter can also be a list, for example, `hostname,device`. In that case, Alarms will be created and metrics added based on all values of match_by.
-
-For example, assume the Alarm Definition with the expression `max(disk.space_used_perc{service=monitoring}) > 90` and match_by set to `hostname`. This will create one alarm for each system that contains all of the metrics for each device. If instead, the match_by is set to `hostname,device`, then a separate alarm will be created for each device in each system.
-
-To illustrate, assume a measurement for each of these four metrics is received by Monasca:
-```
-disk.space_used_perc{device:/dev/sda1,hostname=mini-mon}
-disk.space_used_perc{device:tmpfs,hostname=mini-mon}
-disk.space_used_perc{device:/dev/sda1,hostname=devstack}
-disk.space_used_perc{device:tmpfs,hostname=devstack}
-```
-
-Given the expression `max(disk.space_used_perc) > 90` and match_by set to `hostname`, this will create two alarms:
-
-```
-Alarm 1 - Metrics: disk.space_used_perc{device:/dev/sda1,hostname=mini-mon}, disk.space_used_perc{device:tmpfs,hostname=mini-mon}
-Alarm 2 - Metrics: disk.space_used_perc{device:/dev/sda1,hostname=devstack}, disk.space_used_perc{device:tmpfs,hostname=devstack}
-```
-
-If instead, match_by is set to `hostname,device`, then four alarms will be created:
-
-```
-Alarm 1 - Metrics: disk.space_used_perc{device:/dev/sda1,hostname=mini-mon}
-Alarm 2 - Metrics: disk.space_used_perc{device:tmpfs,hostname=mini-mon}
-Alarm 3 - Metrics: disk.space_used_perc{device:/dev/sda1,hostname=devstack}
-Alarm 4 - Metrics: disk.space_used_perc{device:tmpfs,hostname=devstack}
-```
-
-The second value of match_by will create an Alarm for each device. For each device that fills up, a separate Alarm will be triggered. The first value of match_by will give you less Alarms to display in the dashboard but if an Alarm has already triggered for one device and another device fills up, the Alarm won't be triggered again.
-
-If desired, an Alarm Definition can be created that exactly matches a set of metrics. The match_by should not be set. Only one Alarm will be created for that Alarm Definition.
-
-Alarms have a state that is set by the Threshold Engine based on the incoming measurements.
-
-* UNDETERMINED - No measurements have been received for at least one of the subexpressions in any period for a least 2 * periods (see below for definition of period and periods
-* OK - Measurements have been received and the Alarm Definition Expression evaluates to false for the given measurements
-* ALARM - Measurements have been received and the Alarm Definition Expression evaluates to true for the given measurements
-
-The Alarms are evaluated and their state is set once per minute.
-
-Alarms contain three fields that may be edited via the API. These are the alarm state, lifecycle state, and the link. The alarm state is updated by Monasca as measurements are evaluated, and can be changed manually as necessary. The lifecycle state and link fields are not maintained or updated by Monasca, instead these are provided for storing information related to external tools.
-
-### Deterministic or non-deterministic alarms
-
-By default all alarm definitions are assumed to be **non-deterministic**.
-There are 3 possible states such alarms can transition to: *OK*, *ALARM*,
-*UNDETERMINED*. On the other hand, alarm definitions can be also
-**deterministic**. In that case alarm is allowed to transition only: *OK*
-and *ALARM* state.
-
-Following expression ```avg(cpu.user_perc{hostname=compute_node_1}) > 10``` means that potential
-alarm and transition to *ALARM* state is restricted to specific machine. If for some reason that
-host would crash and stay offline long enough, there would be no measurements received from it.
-In this case alarm will transition to *UNDETERMINED* state.
-
-On the other hand, some metrics are irregular and look more like events. One case is
-metric created only if something critical happens in the system.
-For example an error in log file or deadlock in database.
-If non-deterministic alarm definition would be created using expression ```count(log.error{component=mysql}) >= 1)```,
-that alarm could stay in *UNDETERMINED* state for most of its lifetime.
-However, from operator point of view, if there are no errors related to MySQL, everything works correctly.
-Answer to that situation is creating *deterministic* alarm definition
-using expression ```count(log.error{component=mysql}, deterministic) >= 1```.
-
-The deterministic alarm's main trait is preventing from transition to *UNDETERMINED* state.
-The alarm should be *OK* if no data is received. Also such alarms transition to *OK* immediately when created,
-rather than to *UNDETERMINED* state.
-
-Finally, it must be mentioned that alarm definition can be composed of multiple expressions and
-that *deterministic* is actually part of it. The entire alarm definition is considered *deterministic*
-only if all of its expressions are such. Otherwise the alarm is *non-deterministic*.
-
-For example:
-```
-avg(disk.space_used_perc{hostname=compute_node_1}) >= 99
- and
-count(log.error{hostname=compute_node_1,component=kafka},deterministic) >= 1
-```
-potential alarm will transition to *ALARM* state if there is no usable disk space left and kafka starts to report errors regarding
-inability to save data to it. Second expression is *deterministic*, however entire alarm will be kept in *UNDETERMINED* state
-until such situation happens.
-
-On the other hand, expression like this:
-```
-avg(disk.space_used_perc{hostname=compute_node_1},deterministic) >= 99
- and
-count(log.error{hostname=compute_node_1,component=kafka},deterministic) >= 1
-```
-makes entire alarm *deterministic*. In other words - *all parts of alarm's expression
-must be marked as deterministic in order for entire alarm to be considered such*.
-Having definition like one above, potential alarm will stay in *OK* state as long as there is enough
-disk space left at *compute_node_1* and there are no errors reported from *kafka* running
-at the same host.
-
-## Alarm Definition Expressions
-The alarm definition expression syntax allows the creation of simple or complex alarm definitions to handle a wide variety of needs. Alarm expressions are evaluated every 60 seconds.
-
-An alarm expression is a boolean equation which is used to evaluate the state of an alarm based on the received measurements. If the expression evaluates to true the state of the alarm to be set to ALARM. If it evaluates to false, the state of the alarm will be set to OK.
-
-### Syntax
-
-At the highest level, you have an expression, which is made up of one or more subexpressions, joined by boolean operators. Parenthesis can be used around groups of subexpressions to indicated higher precedence. In a BNF style format where items enclosed in [] are optional, '*' means zero or more times, and '|' means or.
-
-````
-
- ::= [(and | or) ]*
-````
-
-More formally, taking boolean operator precedence into account, where 'and' has higher precedence than 'or', results in the following.
-
-````
-
- ::=
- |
-
-
- ::=
- |
-
-````
-Each subexpression is made up of several parts with a couple of options:
-
-````
-
- ::= '(' [',' deterministic] [',' period] ')' threshold_value ['times' periods]
- | '(' expression ')'
-
-````
-Period must be an integer multiple of 60. The default period is 60 seconds.
-
-Expression is by default **non-deterministic** (i.e. when expression does
-not contain *deterministic* keyword). If however **deterministic**
-option would be desired, it is enough to have *deterministic* keyword
-inside expression.
-
-The logical_operators are: `and` (also `&&`), `or` (also `||`).
-
-````
- ::= 'and' | '&&'
- ::= 'or' | '||'
-````
-
-A metric can be a metric name only or a metric name followed by a list of dimensions. The dimensions further qualify the metric name.
-
-
-````
-
- ::= metric_name
- | metric_name '{' '}'
-
-````
-
-Any number of dimensions can follow the metric name.
-
-````
-
- ::=
- | ','
-
-````
-
-A dimension is simply a key-value pair.
-
-````
-
- ::= dimension_name '=' dimension_value
-
-````
-
-The relational_operators are: `lt` (also `<`), `gt` (also `>`), `lte` (also `<=`), `gte` (also `>=`).
-
-
-````
-
- ::= 'lt' | '<' | 'gt' | '>' | 'lte' | '<=' | 'gte' | '>='
-
-````
-The list of available statistical functions include the following.
-
-```
-
- ::= 'min' | 'max' | 'sum' | 'count' | 'avg' | 'last'
-
-```
-
-where 'avg' is the arithmetic average and last is the single most recent value of the metric. When using the last function, the values for 'period' and 'periods' will be ignored. Note, threshold values are always in the same units as the metric that they are being compared to.
-
-
-#### Simple Example
-In this example the metric uniquely identified with the name `cpu.system_perc` and dimension `hostname=host.domain.com` is compared to the threshold 95.
-
-```
-cpu.system_perc{hostname=host.domain.com} > 95
-```
-
-#### More Complex Example
-In this example the average of the same metric as in the previous example is evaluated over a 120 second period for 3 times so that the expression will evaluate to true if the average is greater than 95 for a total of 360 seconds.
-
-```
-avg(cpu.system_perc{hostname=host.domain.com}, 120) > 95 times 3
-```
-
-Note that period is the number of seconds for the measurement to be done on. They can only be in a multiple of 60. Periods is how many times in a row that this expression must be true before triggering the alarm. Both period and periods are optional and default to 60 and 1 respectively.
-
-Functions work on all metric measurements during the period time frame.
-
-* min (returns the minimum of all the values)
-* max (returns the maximum of all the values)
-* sum (returns the sum of all the values)
-* count (returns the number of metric observations)
-* avg (returns the average of all the values)
-* last (returns the single most recent value, ignores values for 'period' and 'periods')
-
-The metric is a complex identifier that says the name and optional dimensions.
-
-#### Compound alarm example
-In this example a compound alarm expression is evaluated involving two thresholds.
-
-```
-avg(cpu.system_perc{hostname=hostname.domain.com}) > 90 or avg(disk_read_ops{hostname=hostname.domain.com, device=vda}, 120) > 1000
-```
-
-#### Deterministic alarm example
-In this example alarm is created with one expression which is deterministic
-
-```
-count(log.error{}, deterministic) > 1
-```
-
-#### Non-deterministic alarm with deterministic sub expressions
-In this example alarm's expression is composed of 3 parts where two of them
-are marked as **deterministic**. However entire expression is non-deterministic because
-of the 3rd expression.
-
-```
-count(log.error{}, deterministic) > 1 or count(log.warning{}, deterministic) > 1 and avg(cpu.user_perc{}) > 10
-```
-
-### Changing Alarm Definitions
-
-Once an Alarm Definition has been created, the value for match_by and any metrics in the expression cannot be changed. This is because those fields control the metrics used to create Alarms and Alarms may already have been created. The function, operator, period, periods and any boolean operators can change, but not the metrics in subexpressions or the number of subexpressions. All other fields in an Alarm Definition can be changed.
-
-The only option to change metrics or match_by is to delete the existing Alarm Definition and create a new one. Deleting an Alarm Definition will delete all Alarms associated with it.
-
-## Notification Methods
-Notification methods are resources used to specify a notification name, type and address that notifications can be sent to. After a notification method has been created, it can be associated with actions in alarm definitions, such that when an alarm state transition occurs, one or more notifications can be sent.
-
-Currently, notification method types of email, PagerDuty, webhook, Slack, Hipchat (discontinued) and Jira are supported. In the case of email, the address is the email address. In the case of PagerDuty, the address is the PagerDuty Service API Key. In the case of a webhook, the address is the URL of the webhook. See the Monasca Notification service plugin [documentation](https://opendev.org/openstack/monasca-notification#plugins) for more information.
-
-# Common Request Headers
-This section documents the common request headers that are used in requests.
-
-## Common Http Request Headers
-The standard Http request headers that are used in requests.
-
-* Content-Type - The Internet media type of the request body. Used with POST and PUT requests. Must be `application/json`.
-* Accept - Internet media types that are acceptable in the response. Must be application/json.
-* X-Requested-With (optional) - Which headers are requested to be allowed. Filled in by browser as part of the CORS protocol.
-* Origin (optional) - The origin of page that is requesting cross origin access. Filled in by browser as part of the CORS protocol.
-
-## Non-standard request headers
-The non-standard request headers that are used in requests.
-
-* X-Auth-Token (string, required) - Keystone auth token
-
-# Common Responses
-The Monasca API utilizes HTTP response codes to inform clients of the success or failure of each request. Clients should use the HTTP response code to trigger error handling if necessary. This section discusses various API error responses.
-
-* 200 - A request succeeded.
-* 201 - A resource has been successfully created.
-* 204 - No content
-* 400 - Bad request
-* 401 - Unauthorized
-* 404 - Not found
-* 409 - Conflict
-* 422 - Unprocessable entity
-
-# Paging
-The Monasca API implements a paging mechanism to allow users to 'page' through result sets returned from the API. The paging functionality is limited to resources that return unbounded lists of results. This permits the user to consume as much data from the API as is needed without placing undo memory consumption burdens on the Monasca API Server. The paging mechanism is accomplished by allowing the user to specify an offset and a limit in the request URL as query parameters.
-
-For example:
-
-```
-"http://192.168.10.4:8070/v2.0/metrics/measurements?offset=2015-03-03T05%3A21%3A55Z&limit=1000&name=cpu.system_perc&dimensions=hostname%3Adevstack&start_time=2014-07-18T03%3A00%3A00Z"
-
-```
-
-Results sets that would otherwise return more results if there had not been a limit will include a next link with the offset prepopulated. The user only need use the next link to get the next set of results.
-
-If no limit is specified in the request URL, then a server-wide configurable limit is applied.
-
-
-## Offset
-Offsets can be either identifier offsets, timestamp offsets or combinational offsets that have an identifier part and timestamp part. The identifier can be an integer or string (including hexadecimal numbers). The use of either integer, string, timestamp or combination is determined by the resource being queried.
-
-For example, an integer offset would look like this:
-
-```
-offset=999
-
-```
-Integer offsets are zero based.
-
-A string offset would look like this:
-
-```
-offset=c60ec47e-5038-4bf1-9f95-4046c6e9a759
-
-```
-
-A hexadecimal string offset would look like this:
-
-```
-
-offset=01ce0acc66131296c8a17294f39aee44ea8963ec
-
-```
-
-A timestamp offset would look like this:
-
-```
-offset=2104-01-01T00:00:01Z
-
-```
-
-A dimension value offset would look as follows:
-
-```
-offset=dimensionValue2
-
-```
-A combinational offset with hexdecimal id would look as follows:
-```
-offset=01ce0acc66131296c8a17294f39aee44ea8963ec_2104-01-01T00:00:01Z
-```
-
-Different resources use different offset types because of the internal implementation of different resources depends on different types of mechanisms for indexing and identifying resources. For example, the offset in measurement resources contains both ID and timestamp. The type and form of the offsets for each resource can be determined by referring to the examples in each resource section below.
-
-The offset is determined by the ID and/or timestamp values of the last element in the result list. Users wishing to manually create a query URL can use the ID and/or timestamp of the last element in the previously returned result set as the offset. The proceeding result set will return all elements with an ID greater than the ID in the offset, and if the offset is two-part, also all the elements with the same ID as that in the offset and having a timestamp later than the timestamp value in the offset. The automatically generated offset in the next link does exactly this; it uses the ID and/or timestamp in the last element.
-
-The offset can take the form of an integer ID, string ID, timestamp, or a combination of both ID and timestamp, but the user should treat the offset as an opaque reference. When using offsets in manually generated URLs, users enter them as strings that look like integers, timestamps, or strings. Future releases may change the type and form of the offsets for each resource.
-
-## Limit
-The Monasca API has a server-wide default limit that is applied. It is
-hard-coded to `10,000` entries. Users may specify their own limit in the URL,
-but the server-wide limit may not be exceeded, e.g.:
-
-```
-limit=5000
-
-```
-# JSON Results
-All Monasca API results are in the form of JSON. For resources that return a list of elements, the JSON object returned will contain a 'links' array and an 'elements' array.
-
-The 'links' array will contain a 'self' element that is the original URL of the request that was used to generate the result. The 'links' array may also contain a 'next' element if the number of elements in the result would exceed the query limit. The 'next' link can be used to query the Monasca API for the next set of results, thus allowing the user to page through lengthy data sets.
-
-The 'elements' array will contain the items from the resource that match the query parameters. Each element will have an 'id' element. The 'id' element of the last item in the elements list is used as the offset in the 'next' link.
-
-For example:
-
-```
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/metrics&limit=2"
- },
- {
- "rel": "next",
- "href": "http://192.168.10.4:8070/v2.0/metrics?offset=1&limit=2"
- }
- ],
- "elements": [
- {
- "id": 0,
- "name": "name1",
- "dimensions": {
- "key1": "value1"
- }
- },
- {
- "id": 1,
- "name": "name2",
- "dimensions": {
- "key1": "value1"
- }
- }
- ]
-}
-```
-
-# Versions
-The versions resource supplies operations for accessing information about supported versions of the API.
-
-## List Versions
-Lists the supported versions of the Monasca API.
-
-### GET /
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-None.
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET / HTTP/1.1
-Host: 192.168.10.4:8070
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Accept: application/json
-Cache-Control: no-cache
-```
-
-### Response
-#### Status code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of supported versions.
-
-#### Response Examples
-```
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/"
- }
- ],
- "elements": [
- {
- "id": "v2.0",
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0"
- }
- ],
- "status": "CURRENT",
- "updated": "2014-07-18T03:25:02.423Z"
- }
- ]
-}
-```
-___
-
-## Get Version
-Gets detail about the specified version of the Monasca API.
-
-### Get /{version_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-* version_id (string, required) - Version ID of API
-
-#### Query Parameters
-None.
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET /v2.0/ HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-#### Status code
-* 200 - OK
-
-#### Response Body
-Returns a JSON version object with details about the specified version.
-
-#### Response Examples
-```
-{
- "id":"v2.0",
- "links":[
- {
- "rel":"self",
- "href":"http://192.168.10.4:8070/v2.0/"
- }
- ],
- "status":"CURRENT",
- "updated":"2014-07-18T03:25:02.423Z"
-}
-```
-___
-
-# Healthcheck
-The Monasca ApI comes with a built-in healthcheck mechanism. It is available in two flavours, both accessible
-under `/healthcheck` endopoint.
-
-## Complex check
-The complex check not only returns a response with success code if Monasca API is up and running by it also verifies if
-dependant components , such as __Kafka__, __Alarm database__ (MariadDB/MySQL, PostgreSQL), __Metrics database__ (Cassandra, InfluxdDB)
-are healthy too.
-
-Monasca API will respond with following codes:
-* 200 - both API and external components are healthy.
-* 503 - API is running but problems with peripheral components have been spotted.
-
-Example: `curl -XGET 192.168.10.6:8070/healthcheck`
-
-### Peripheral checks
-* __Kafka__ is considered healthy if connection to broker can be established and configured topics can be found.
-* __Alarm Database__ (MariaDB/MySQL, PostgreSQL) is considered healthy if connection to database can be established
- and sample query can be executed.
-* __Time Series Database__ (TSDB) is considered healthy if: `InfluxDB` is set health check is verified according to the
-InfluxDB documentation ([/ping](https://docs.influxdata.com/influxdb/v1.1/tools/api/)), `Cassandra` is set health check is verified through new connection to the database.
-
-## Simple check
-The simple check only returns response only if Monasca API is up and running. It does not return any data
-because it is accessible only for `HEAD` request. If the Monasca Api is up and running the following response code:
-`204` is expected.
-
-Example: `curl -XHEAD 192.168.10.6:8070/healtcheck`
-
-# Metrics
-The metrics resource allows metrics to be created and queried. The `X-Auth-Token` is used to derive the tenant that submits metrics. Metrics are stored and scoped to the tenant that submits them, or if the `tenant_id` query parameter is specified and the tenant has the `monitoring-delegate` role, the metrics are stored using the specified tenant ID. Note that several of the GET methods also support the tenant_id query parameter, but the `monasca-admin` role is required to get cross-tenant metrics, statistics, etc..
-
-## Create Metric
-Create metrics.
-
-### POST /v2.0/metrics
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Content-Type (string, required) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* tenant_id (string, optional, restricted) - Tenant ID to create metrics on behalf of. This parameter can be used to submit metrics from one tenant, to another. Normally, this parameter is used when the Agent is being run as an operational monitoring tenant, such as monitoring OpenStack infrastructure, and needs to submit metrics for an OpenStack resource, such as a VM, but those metrics need to be accessible to the tenant that owns the resource. Usage of this query parameter is restricted to users with the `monitoring-delegate` role.
-
-#### Request Body
-Consists of a single metric object or an array of metric objects. A metric has the following properties:
-
-* name (string(255), required) - The name of the metric.
-* dimensions ({string(255): string(255)}, optional) - A dictionary consisting of (key, value) pairs used to uniquely identify a metric.
-* timestamp (string, required) - The timestamp in milliseconds from the Epoch.
-* value (float, required) - Value of the metric. Values with base-10 exponents greater than 126 or less than -130 are truncated.
-* value_meta ({string(255): string}(2048), optional) - A dictionary consisting of (key, value) pairs used to add information about the value. Value_meta key value combinations must be 2048 characters or less including '{"":""}' 7 characters total from every json string.
-
-The name and dimensions are used to uniquely identify a metric.
-
-#### Request Examples
-
-##### Single metric
-POST a single metric.
-
-```
-POST /v2.0/metrics HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 27feed73a0ce4138934e30d619b415b0
-Cache-Control: no-cache
-
-{
- "name":"name1",
- "dimensions":{
- "key1":"value1",
- "key2":"value2"
- },
- "timestamp":1405630174123,
- "value":1.0
-}
-```
-
-##### Single metric with value_meta
-POST a single metric with value_meta.
-
-```
-POST /v2.0/metrics HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 27feed73a0ce4138934e30d619b415b0
-Cache-Control: no-cache
-
-{
- "name":"name1",
- "dimensions":{
- "key1":"value1",
- "key2":"value2"
- },
- "timestamp":1405630174123,
- "value":1.0,
- "value_meta":{
- "key1":"value1",
- "key2":"value2"
- }
-}
-```
-
-##### Array of metrics
-POST an array of metrics.
-
-```
-POST /v2.0/metrics HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 27feed73a0ce4138934e30d619b415b0
-Cache-Control: no-cache
-
-[
- {
- "name":"name1",
- "dimensions":{
- "key1":"value1",
- "key2":"value2"
- },
- "timestamp":1405630174123,
- "value":1.0
- },
- {
- "name":"name2",
- "dimensions":{
- "key1":"value1",
- "key2":"value2"
- },
- "timestamp":1405630174123,
- "value":2.0,
- "value_meta":{
- "key1":"value1",
- "key2":"value2"
- }
- }
-]
-```
-
-### Response
-#### Status Code
-* 204 - No Content
-
-#### Response Body
-This request does not return a response body.
-___
-
-## List metrics
-Get metrics
-
-#### GET /v2.0/metrics
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* tenant_id (string, optional, restricted) - Tenant ID to from which to get metrics. This parameter can be used to get metrics from a tenant other than the tenant the request auth token is scoped to. Usage of this query parameter is restricted to users with the monasca admin role, as defined in the monasca api configuration file, which defaults to `monasca-admin`.
-* name (string(255), optional) - A metric name to filter metrics by.
-* dimensions (string, optional) - A dictionary to filter metrics by specified as a comma separated array of (key, value) pairs as `key1:value1,key2:value2, ...`, leaving the value empty `key1,key2:value2` will return all values for that key, multiple values for a key may be specified as `key1:value1|value2|...,key2:value4,...`
-* start_time (string, optional) - The start time in ISO 8601 combined date and time format in UTC. This is useful for only listing metrics that have measurements since the specified start_time.
-* end_time (string, optional) - The end time in ISO 8601 combined date and time format in UTC. Combined with start_time, this can be useful to only list metrics that have measurements in between the specified start_time and end_time.
-* offset (integer (InfluxDB) or hexadecimal string (Vertica), optional)
-* limit (integer, optional)
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET /v2.0/metrics?name=metric1&dimensions=key1:value1 HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 27feed73a0ce4138934e30d619b415b0
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of metric definition objects with the following fields:
-
-* name (string)
-* dimensions ({string(255): string(255)})
-
-#### Response Examples
-````
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/metrics"
- },
- {
- "rel": "next",
- "href": "http://192.168.10.4:8070/v2.0/metrics?offset=1"
- }
- ],
- "elements": [
- {
- "id": 0,
- "name": "name1",
- "dimensions": {
- "key1": "value1"
- }
- },
- {
- "id": 1,
- "name": "name2",
- "dimensions": {
- "key1": "value1"
- }
- }
- ]
-}
-````
-___
-
-## List dimension values
-Get dimension values
-
-#### GET /v2.0/metrics/dimensions/names/values
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* tenant_id (string, optional, restricted) - Tenant ID to from which to get dimension values. This parameter can be used to get dimension values from a tenant other than the tenant the request auth token is scoped to. Usage of this query parameter is restricted to users with the monasca admin role, as defined in the monasca api configuration file, which defaults to `monasca-admin`.
-* metric_name (string(255), optional) - A metric name to filter dimension values by.
-* dimension_name (string(255), required) - A dimension name to filter dimension values by.
-* start_time (string, optional) - The start time in ISO 8601 combined date and time format in UTC.
-* end_time (string, optional) - The end time in ISO 8601 combined date and time format in UTC.
-* offset (string(255), optional) - The dimension values are returned in alphabetic order, and the offset is the dimension name after which to return in the next pagination request.
-* limit (integer, optional)
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET /v2.0/metrics/dimensions/names/values?dimension_name=dimension_name HTTP/1.1
-Host: 192.168.10.4:8080
-Content-Type: application/json
-X-Auth-Token: 27feed73a0ce4138934e30d619b415b0
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of dimension values.
-
-#### Response Examples
-````
-{
- "elements": [
- {
- "dimension_value": "value2"
- },
- {
- "dimension_value": "value3"
- }
- ],
- "links": [
- {
- "href": "http://192.168.10.6:8070/v2.0/metrics/dimensions/names/values?dimension_name=dim_name&offset=value1&limit=2",
- "rel": "self"
- },
- {
- "href": "http://192.168.10.6:8070/v2.0/metrics/dimensions/names/values?offset=value3&dimension_name=dim_name&limit=2",
- "rel": "next"
- }
- ]
-}
-````
-___
-
-## List dimension names
-Get dimension names
-
-#### GET /v2.0/metrics/dimensions/names
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* tenant_id (string, optional, restricted) - Tenant ID from which to get dimension names. This parameter can be used to get dimension names from a tenant other than the tenant the request auth token is scoped to. Usage of this query parameter is restricted to users with the monasca admin role, as defined in the monasca api configuration file, which defaults to `monasca-admin`.
-* metric_name (string(255), optional) - A metric name to filter dimension names by.
-* start_time (string, optional) - The start time in ISO 8601 combined date and time format in UTC.
-* end_time (string, optional) - The end time in ISO 8601 combined date and time format in UTC.
-* offset (string(255), optional) - The dimension names are returned in alphabetic order, and the offset is the dimension name after which will return in the next pagination request.
-* limit (integer, optional)
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET /v2.0/metrics/dimensions/names HTTP/1.1
-Host: 192.168.10.6:8070
-Content-Type: application/json
-X-Auth-Token: 818d3d8f10bd4987adb3f84bc94a801d
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of dimension names.
-#### Response Examples
-````
-{
- "elements": [
- {
- "dimension_name": "name2"
- },
- {
- "dimension_name": "name3"
- }
- ],
- "links": [
- {
- "href": "http://192.168.10.6:8070/v2.0/metrics/dimensions/names?offset=name1&limit=2",
- "rel": "self"
- },
- {
- "href": "http://192.168.10.6:8070/v2.0/metrics/dimensions/names?offset=name3&limit=2",
- "rel": "next"
- }
- ]
-}
-````
-
-# Measurements
-Operations for accessing measurements of metrics.
-
-## List measurements
-Get measurements for metrics.
-
-If `group_by` is not specified, metrics must be fully qualified with name and dimensions so that only measurements are returned for a single metric. If the metric name and dimensions given do not resolve to a single metric, an error will be displayed asking the user to further qualify the metric with a name and additional dimensions.
-
-If users do not wish to see measurements for a single metric, but would prefer to have measurements from multiple metrics combined, a 'merge_metrics' flag can be specified. when 'merge_metrics' is set to true (**merge_metrics=true**), all measurements for all metrics that satisfy the query parameters will be merged into a single list of measurements.
-
-### GET /v2.0/metrics/measurements
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* tenant_id (string, optional, restricted) - Tenant ID from which to get measurements from. This parameter can be used to get metrics from a tenant other than the tenant the request auth token is scoped to. Usage of this query parameter is restricted to users with the monasca admin role, as defined in the monasca api configuration file, which defaults to `monasca-admin`.
-* name (string(255), required) - A metric name to filter metrics by.
-* dimensions (string, optional) - A dictionary to filter metrics by specified as a comma separated array of (key, value) pairs as `key1:value1,key2:value2, ...`
-* start_time (string, required) - The start time in ISO 8601 combined date and time format in UTC.
-* end_time (string, optional) - The end time in ISO 8601 combined date and time format in UTC.
-* offset (timestamp, optional)
-* limit (integer, optional)
-* merge_metrics (boolean, optional) - allow multiple metrics to be combined into a single list of measurements.
-* group_by (string, optional) - list of columns to group the metrics to be returned.
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET /v2.0/metrics/measurements?name=cpu.system_perc&dimensions=hostname:devstack&start_time=2015-03-00T00:00:01Z HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of measurements objects for each unique metric with the following fields:
-
-* name (string(255)) - A name of a metric.
-* dimensions ({string(255): string(255)}) - The dimensions of a metric.
-* columns (array[string]) - An array of column names corresponding to the columns in measurements.
-* measurements (array[array[]]) - A two dimensional array of measurements for each timestamp. The timestamp is in ISO 8601 combined date and time format, with millisecond resolution.
-
-#### Response Examples
-```
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/metrics/measurements?start_time=2015-03-00T00%3A00%3A00Z&name=cpu.system_perc&dimensions=hostname%3Adevstack"
- },
- {
- "rel": "next",
- "href": "http://192.168.10.4:8070/v2.0/metrics/measurements?offset=01ce0acc66131296c8a17294f39aee44ea8963ec_2015-03-03T05%3A24%3A55.123Z&name=cpu.system_perc&dimensions=hostname%3Adevstack&start_time=2015-03-00T00%3A00%3A00Z"
- }
- ],
- "elements": [
- {
- "id": "01ce0acc66131296c8a17294f39aee44ea8963ec",
- "name": "http_status",
- "dimensions": {
- "url": "http://localhost:8774/v2.0",
- "hostname": "devstack",
- "service": "compute"
- },
- "columns": [
- "timestamp",
- "value",
- "value_meta"
- ],
- "measurements": [
- [
- "2015-03-03T05:22:28.123Z",
- 0,
- {}
- ],
- [
- "2015-03-03T05:23:12.123Z",
- 0,
- {}
- ],
- [
- "2015-03-03T05:24:55.123Z",
- 1,
- {
- "rc": "404",
- "error": "Not Found"
- }
- ]
- ]
- }
- ]
-}
-```
-___
-
-# Metric Names
-Operations for accessing names of metrics.
-
-## List names
-Get names for metrics.
-
-### GET /v2.0/metrics/names
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* tenant_id (string, optional, restricted) - Tenant ID from which to get metric names. This parameter can be used to get metric names from a tenant other than the tenant the request auth token is scoped to. Usage of this query parameter is restricted to users with the monasca admin role, as defined in the monasca api configuration file, which defaults to `monasca-admin`.
-* dimensions (string, optional) - A dictionary to filter metrics by specified as a comma separated array of (key, value) pairs as `key1:value1,key2:value2, ...`
-* offset (string, optional)
-* limit (integer, optional)
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET /v2.0/metrics/names HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of metric name objects for each unique metric name (not including dimensions) in alphabetical order with the following fields:
-
-* name (string(255)) - A name of a metric.
-
-#### Response Examples
-```
-{
- "elements": [
- {
- "name": "cpu.idle_perc"
- },
- {
- "name": "cpu.idle_time"
- },
- {
- "name": "cpu.percent"
- },
- {
- "name": "cpu.stolen_perc"
- }
- ],
- "links": [
- {
- "href": "http://192.168.10.6:8070/v2.0/metrics/names?offset=cpu.frequency_mhz&limit=4",
- "rel": "self"
- },
- {
- "href": "http://192.168.10.6:8070/v2.0/metrics/names?offset=cpu.stolen_perc&limit=4",
- "rel": "next"
- }
- ]
-}
-```
-___
-
-# Statistics
-Operations for calculating statistics of metrics.
-
-If `group_by` is not specified, then metrics must be fully qualified with name and dimensions so that only statistics are returned for a single metric. If the metric name and dimensions given do not resolve to a single metric, an error will be displayed asking the user to further qualify the metric with a name and additional dimensions.
-
-If users do not wish to see statistics for a single metric, but would prefer to have statistics from multiple metrics combined, a 'merge_metrics' flag can be specified. when 'merge_metrics' is set to true (**merge_metrics=true**), all statistics for all metrics that satisfy the query parameters will be merged into a single list of statistics.
-
-## List statistics
-Get statistics for metrics.
-
-### GET /v2.0/metrics/statistics
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* tenant_id (string, optional, restricted) - Tenant ID from which to get statistics. This parameter can be used to get statistics from a tenant other than the tenant the request auth token is scoped to. Usage of this query parameter is restricted to users with the monasca admin role, as defined in the monasca api configuration file, which defaults to `monasca-admin`.
-* name (string(255), required) - A metric name to filter metrics by.
-* dimensions (string, optional) - A dictionary to filter metrics by specified as a comma separated array of (key, value) pairs as `key1:value1,key2:value2, ...`
-* statistics (string, required) - A comma separate array of statistics to evaluate. Valid statistics are avg, min, max, sum and count.
-* start_time (string, required) - The start time in ISO 8601 combined date and time format in UTC.
-* end_time (string, optional) - The end time in ISO 8601 combined date and time format in UTC.
-* period (integer, optional) - The time period to aggregate measurements by. Default is 300 seconds.
-* offset (timestamp, optional)
-* limit (integer, optional)
-* merge_metrics (boolean, optional) - allow multiple metrics to be combined into a single list of statistics.
-* group_by (string, optional) - list of columns to group the metrics to be returned.
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET /v2.0/metrics/statistics?name=cpu.system_perc&dimensions=hostname:devstack&start_time=2014-07-18T03:00:00Z&statistics=avg,min,max,sum,count HTTP/1.1
-Host: 192.168.10.4:8070
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Content-Type: application/json
-Cache-Control: no-cache
-```
-
-### Response
-
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of statistic objects for each unique metric with the following fields:
-
-* name (string(255)) - A name of a metric.
-* dimensions ({string(255): string(255)}) - The dimensions of a metric.
-* columns (array[string]) - An array of column names corresponding to the columns in statistics.
-* statistics (array[array[]]) - A two dimensional array of statistics for each period.
-
-#### Response Examples
-```
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/metrics/statistics?start_time=2014-07-18T03%3A00%3A00Z&name=cpu.system_perc&dimensions=hostname%3Adevstack&statistics=avg%2Cmin%2Cmax%2Csum%2Ccount"
- },
- {
- "rel": "next",
- "href": "http://192.168.10.4:8070/v2.0/metrics/statistics?offset=2014-07-18T03%3A22%3A00Z&name=cpu.system_perc&dimensions=hostname%3Adevstack&start_time=2014-07-18T03%3A00%3A00Z&statistics=avg%2Cmin%2Cmax%2Csum%2Ccount"
- }
- ],
- "elements": [
- {
- "id": "2014-07-18T03:22:00Z",
- "name": "cpu.system_perc",
- "dimensions": {
- "hostname": "devstack"
- },
- "columns": [
- "timestamp",
- "avg",
- "min",
- "max",
- "sum",
- "count"
- ],
- "statistics": [
- [
- "2014-07-18T03:20:00Z",
- 2.765,
- 1.95,
- 4.93,
- 22.119999999999997,
- 8
- ],
- [
- "2014-07-18T03:21:00Z",
- 2.412941176470588,
- 1.71,
- 4.09,
- 41.019999999999996,
- 17
- ],
- [
- "2014-07-18T03:22:00Z",
- 2.1135294117647065,
- 1.62,
- 3.85,
- 35.93000000000001,
- 17
- ]
- ]
- }
- ]
-}
-```
-___
-
-# Notification Methods
-Operations for working with notification methods.
-
-## Create Notification Method
-Creates a notification method through which notifications can be sent to when an alarm state transition occurs. Notification methods can be associated with zero or many alarms.
-
-### POST /v2.0/notification-methods
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Content-Type (string, required) - application/json
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-None.
-
-#### Request Body
-* name (string(250), required) - A descriptive name of the notification method.
-* type (string(100), required) - The type of notification method (see [List supported Notification Method Types](#list-supported-notification-method-types) for supported types).
-* address (string(100), required) - The email/url address to notify.
-* period (integer, optional) - The interval in seconds to periodically send the notification. Supported periods are defined in the Monasca API and Notification service config. The notification will continue to be sent at the defined interval until the alarm it is associated with changes state.
-
-#### Request Examples
-```
-POST /v2.0/notification-methods HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-
-{
- "name":"Name of notification method",
- "type":"EMAIL",
- "address":"john.doe@hp.com"
-}
-```
-
-### Response
-
-#### Status Code
-* 201 - Created
-
-#### Response Body
-Returns a JSON notification method object with the following fields:
-
-* id (string) - ID of notification method
-* links ([link])
-* name (string) - Name of notification method
-* type (string) - Type of notification method
-* address (string) - Address of notification method
-* period (integer) - Period of notification method
-
-#### Response Examples
-```
-{
- "id":"35cc6f1c-3a29-49fb-a6fc-d9d97d190508",
- "links":[
- {
- "rel":"self",
- "href":"http://192.168.10.4:8070/v2.0/notification-methods/35cc6f1c-3a29-49fb-a6fc-d9d97d190508"
- }
- ],
- "name":"Name of notification method",
- "type":"EMAIL",
- "address":"john.doe@hp.com",
- "period":0
-}
-```
-___
-
-## List Notification Methods
-List all notification methods.
-
-### GET /v2.0/notification-methods
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* offset (string, optional)
-* limit (integer, optional)
-* sort_by (string, optional) - Comma separated list of fields to sort by, defaults to 'id'. Fields may be followed by 'asc' or 'desc' to set the direction, ex 'address desc'
-Allowed fields for sort_by are: 'id', 'name', 'type', 'address', 'created_at', 'updated_at'
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET /v2.0/notification-methods HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of notification method objects with the following fields:
-
-* id (string) - ID of notification method
-* links ([link])
-* name (string) - Name of notification method
-* type (string) - Type of notification method
-* address (string) - Address of notification method
-* period (integer) - Period of notification method
-
-#### Response Examples
-```
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/notification-methods"
- },
- {
- "rel": "next",
- "href": "http://192.168.10.4:8070/v2.0/notification-methods?offset=c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- }
- ],
- "elements": [
- {
- "id": "35cc6f1c-3a29-49fb-a6fc-d9d97d190508",
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/notification-methods/35cc6f1c-3a29-49fb-a6fc-d9d97d190508"
- }
- ],
- "name": "Name of notification method",
- "type": "EMAIL",
- "address": "john.doe@hp.com",
- "period": 0
- },
- {
- "id": "c60ec47e-5038-4bf1-9f95-4046c6e9a759",
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/notification-methods/c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- }
- ],
- "name": "Name of notification method",
- "type": "WEBHOOK",
- "address": "http://localhost:3333",
- "period": 1
- }
- ]
-}
-```
-___
-
-## Get Notification Method
-Get the details of a specific notification method.
-
-### GET /v2.0/notification-methods/{notification_method_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-* notification_method_id (string, required) - ID of the notification method
-
-#### Query Parameters
-None.
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET http://192.168.10.4:8070/v2.0/notification-methods/35cc6f1c-3a29-49fb-a6fc-d9d97d190508
-```
-
-### Response
-
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON notification method object with the following fields:
-
-* id (string) - ID of notification method
-* links ([link])
-* name (string) - Name of notification method
-* type (string) - Type of notification method
-* address (string) - Address of notification method
-* period (integer) - Period of notification method
-
-#### Response Examples
-```
-{
- "id":"35cc6f1c-3a29-49fb-a6fc-d9d97d190508",
- "links":[
- {
- "rel":"self",
- "href":"http://192.168.10.4:8070/v2.0/notification-methods/35cc6f1c-3a29-49fb-a6fc-d9d97d190508"
- }
- ],
- "name":"Name of notification method",
- "type":"EMAIL",
- "address":"john.doe@hp.com",
- "period": 0
-}
-```
-___
-
-## Update Notification Method
-Update the specified notification method.
-
-### PUT /v2.0/notification-methods/{notification_method_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Content-Type (string, required) - application/json
-* Accept (string) - application/json
-
-#### Path Parameters
-* notification_method_id (string, required) - ID of the notification method to update.
-
-#### Query Parameters
-None.
-
-#### Request Body
-* name (string(250), required) - A descriptive name of the notification method.
-* type (string(100), required) - The type of notification method (see [List supported Notification Method Types](#list-supported-notification-method-types) for supported types).
-* address (string(100), required) - The email/url address to notify.
-* period (integer, required) - The interval in seconds to periodically send the notification. Supported periods are defined in the Monasca API and Notification service config. The notification will continue to be sent at the defined interval until the alarm it is associated with changes state.
-
-#### Request Examples
-````
-PUT /v2.0/notification-methods/35cc6f1c-3a29-49fb-a6fc-d9d97d190508 HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-
-{
- "name":"New name of notification method",
- "type":"EMAIL",
- "address":"jane.doe@hp.com",
- "period":0
-}
-````
-
-### Response
-
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON notification method object with the following fields:
-
-* id (string) - ID of notification method
-* links ([link])
-* name (string) - Name of notification method
-* type (string) - Type of notification method
-* address (string) - Address of notification method
-* period (integer) - Period of notification method
-
-#### Response Examples
-````
-{
- "id":"35cc6f1c-3a29-49fb-a6fc-d9d97d190508",
- "links":[
- {
- "rel":"self",
- "href":"http://192.168.10.4:8070/v2.0/notification-methods/35cc6f1c-3a29-49fb-a6fc-d9d97d190508"
- }
- ],
- "name":"New name of notification method",
- "type":"EMAIL",
- "address":"jane.doe@hp.com",
- "period":0
-}
-````
-___
-
-## Patch Notification Method
-Patch the specified notification method.
-
-### PATCH /v2.0/notification-methods/{notification_method_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Content-Type (string, required) - application/json
-* Accept (string) - application/json
-
-#### Path Parameters
-* notification_method_id (string, required) - ID of the notification method to update.
-
-#### Query Parameters
-None.
-
-#### Request Body
-* name (string(250), optional) - A descriptive name of the notification method.
-* type (string(100), optional) - The type of notification method (see [List supported Notification Method Types](#list-supported-notification-method-types) for supported types).
-* address (string(100), optional) - The email/url address to notify.
-* period (integer, optional) - The interval in seconds to periodically send the notification. Supported periods are defined in the Monasca API and Notification service config. The notification will continue to be sent at the defined interval until the alarm it is associated with changes state.
-
-#### Request Examples
-````
-PATCH /v2.0/notification-methods/35cc6f1c-3a29-49fb-a6fc-d9d97d190508 HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-
-{
- "name":"New name of notification method",
- "type":"EMAIL",
- "address":"jane.doe@hp.com",
- "period":0
-}
-````
-
-### Response
-
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON notification method object with the following fields:
-
-* id (string) - ID of notification method
-* links ([link])
-* name (string) - Name of notification method
-* type (string) - Type of notification method
-* address (string) - Address of notification method
-* period (integer) - Period of notification method
-
-#### Response Examples
-````
-{
- "id":"35cc6f1c-3a29-49fb-a6fc-d9d97d190508",
- "links":[
- {
- "rel":"self",
- "href":"http://192.168.10.4:8070/v2.0/notification-methods/35cc6f1c-3a29-49fb-a6fc-d9d97d190508"
- }
- ],
- "name":"New name of notification method",
- "type":"EMAIL",
- "address":"jane.doe@hp.com",
- "period":0
-}
-````
-___
-
-## Delete Notification Method
-Delete the specified notification method.
-
-### DELETE /v2.0/notification-methods/{notification_method_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-
-#### Path Parameters
-* notification_method_id (string, required) - ID of the notification method to delete
-
-#### Query Parameters
-None.
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-DELETE /v2.0/notification-methods/35cc6f1c-3a29-49fb-a6fc-d9d97d190508 HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-
-#### Status Code
-* 204 - No Content
-
-#### Response Body
-This request does not return a response body.
-___
-
-## List supported Notification Method Types
-List supported notification method types.
-
-### GET /v2.0/notification-methods/types/
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-
-
-#### Query Parameters
-None.
-
-#### Request Body
-None.
-
-#### Request Examples
-````
-GET /v2.0/notification-methods/types
-Host: 192.168.10.4:8070
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-
-````
-
-### Response
-
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON list which has list of notification types supported
-
-* type (string) - List of notification methods
-
-
-#### Response Examples
-````
-{
- "links":[
- {
- "rel":"self",
- "href":"http://192.168.10.6:8070/v2.0/notification-methods/types"
- }
- ],
- "elements":[
- {
- "type":"EMAIL"
- },
- {
-
- "type":"PAGERDUTY"
- },
- {
- "type":"WEBHOOK"
- }
- ]
-}
-````
-___
-
-
-# Alarm Definitions
-Operations for working with alarm definitions.
-
-## Create Alarm Definition
-Create an alarm definition.
-
-### POST /v2.0/alarm-definitions
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-None.
-
-#### Request Body
-Consists of an alarm definition. An alarm has the following properties:
-
-* name (string(255), required) - A unique name of the alarm. Note, the name must be unique.
-* description (string(255), optional) - A description of an alarm.
-* expression (string, required) - An alarm expression.
-* match_by ([string], optional) - The metric dimensions to use to create unique alarms
-* severity (string, optional) - Severity of an alarm. Must be either `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`. Default is `LOW`.
-* alarm_actions ([string(50)], optional) - Array of notification method IDs that are invoked when the alarm transitions to the `ALARM` state.
-* ok_actions ([string(50)], optional) - Array of notification method IDs that are invoked when the alarm transitions to the `OK` state.
-* undetermined_actions ([string(50)], optional) - Array of notification method IDs that are invoked when the alarm transitions to the `UNDETERMINED` state.
-
-#### Request Examples
-```
-POST /v2.0/alarm-definitions HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-
-{
- "name":"Average CPU percent greater than 10",
- "description":"The average CPU percent is greater than 10",
- "expression":"(avg(cpu.user_perc{hostname=devstack}) > 10)",
- "match_by":[
- "hostname"
- ],
- "severity":"LOW",
- "ok_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "alarm_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "undetermined_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ]
-}
-```
-
-To create deterministic definition following request should be sent:
-```
-POST /v2.0/alarm-definitions HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-
-{
- "name":"Average CPU percent greater than 10",
- "description":"The average CPU percent is greater than 10",
- "expression":"(avg(cpu.user_perc{hostname=devstack},deterministic) > 10)",
- "match_by":[
- "hostname"
- ],
- "severity":"LOW",
- "ok_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "alarm_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "undetermined_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ]
-}
-```
-
-### Response
-#### Status Code
-* 201 - Created
-
-#### Response Body
-Returns a JSON object of alarm definition objects with the following fields:
-
-* id (string) - ID of alarm definition.
-* links ([link]) - Links to alarm definition.
-* name (string) - Name of alarm definition.
-* description (string) - Description of alarm definition.
-* expression (string) - The alarm definition expression.
-* deterministic (boolean) - Is the underlying expression deterministic ? **Read-only**, computed from *expression*
-* expression_data (JSON object) - The alarm definition expression as a JSON object.
-* match_by ([string]) - The metric dimensions to match to the alarm dimensions
-* severity (string) - The severity of an alarm definition. Either `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`.
-* actions_enabled (boolean) - If true actions for all alarms related to this definition are enabled.
-* alarm_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `ALARM` state.
-* ok_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `OK` state.
-* undetermined_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `UNDETERMINED` state.
-
-#### Response Examples
-```
-{
- "id":"b461d659-577b-4d63-9782-a99194d4a472",
- "links":[
- {
- "rel":"self",
- "href":"http://192.168.10.4:8070/v2.0/alarm-definitions/b461d659-577b-4d63-9782-a99194d4a472"
- }
- ],
- "name":"Average CPU percent greater than 10",
- "description":"The average CPU percent is greater than 10",
- "expression":"(avg(cpu.user_perc{hostname=devstack}) > 10)",
- "deterministic": false,
- "expression_data":{
- "function":"AVG",
- "metric_name":"cpu.user_perc",
- "dimensions":{
- "hostname":"devstack"
- },
- "operator":"GT",
- "threshold":10.0,
- "period":60,
- "periods":1
- },
- "match_by":[
- "hostname"
- ],
- "severity":"LOW",
- "alarm_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "ok_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "undetermined_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ]
-}
-```
-___
-## List Alarm Definitions
-List alarm definitions.
-
-### GET /v2.0/alarm-definitions
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* name (string(255), optional) - Name of alarm to filter by.
-* dimensions (string, optional) - Dimensions of metrics to filter by specified as a comma separated array of (key, value) pairs as `key1:value1,key1:value1, ...`, leaving the value empty `key1,key2:value2` will return all values for that key, multiple values for a key may be specified as `key1:value1|value2|...,key2:value4,...`
-* severity (string, optional) - One or more severities to filter by, separated with `|`, ex. `severity=LOW|MEDIUM`.
-* offset (integer, optional)
-* limit (integer, optional)
-* sort_by (string, optional) - Comma separated list of fields to sort by, defaults to 'id', 'created_at'. Fields may be followed by 'asc' or 'desc' to set the direction, ex 'severity desc'
-Allowed fields for sort_by are: 'id', 'name', 'severity', 'updated_at', 'created_at'
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-GET /v2.0/alarm-definitions?name=CPU percent greater than 10&dimensions=hostname:devstack&state=UNDETERMINED HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of alarm objects with the following fields:
-
-* id (string) - ID of alarm definition.
-* links ([link]) - Links to alarm definition.
-* name (string) - Name of alarm definition.
-* description (string) - Description of alarm definition.
-* expression (string) - The alarm definition expression.
-* deterministic (boolean) - Is the underlying expression deterministic ? **Read-only**, computed from *expression*
-* expression_data (JSON object) - The alarm definition expression as a JSON object.
-* match_by ([string]) - The metric dimensions to use to create unique alarms
-* severity (string) - The severity of an alarm definition. Either `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`.
-* actions_enabled (boolean) - If true actions for all alarms related to this definition are enabled.
-* alarm_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `ALARM` state.
-* ok_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `OK` state.
-* undetermined_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `UNDETERMINED` state.
-
-#### Response Examples
-```
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarm-definitions?name=CPU%20percent%20greater%20than%2010&dimensions=hostname:devstack&state=UNDETERMINED"
- },
- {
- "rel": "next",
- "href": "http://localhost:8070/v2.0/alarm-definitions?offset=f9935bcc-9641-4cbf-8224-0993a947ea83&name=CPU%20percent%20greater%20than%2010&dimensions=hostname:devstack&state=UNDETERMINED"
- }
- ],
- "elements": [
- {
- "id": "f9935bcc-9641-4cbf-8224-0993a947ea83",
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarm-definitions/f9935bcc-9641-4cbf-8224-0993a947ea83"
- }
- ],
- "name": "CPU percent greater than 10",
- "description": "Release the hounds",
- "expression": "(avg(cpu.user_perc{hostname=devstack}) > 10)",
- "deterministic": false,
- "expression_data": {
- "function": "AVG",
- "metric_name": "cpu.user_perc",
- "dimensions": {
- "hostname": "devstack"
- },
- "operator": "GT",
- "threshold": 10,
- "period": 60,
- "periods": 1
- },
- "match_by": [
- "hostname"
- ],
- "severity": "CRITICAL",
- "actions_enabled": true,
- "alarm_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "ok_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "undetermined_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ]
- },
- {
- "id": "g9323232-6543-4cbf-1234-0993a947ea83",
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarm-definitions/g9323232-6543-4cbf-1234-0993a947ea83"
- }
- ],
- "name": "Log error count exceeds 1000",
- "description": "Release the cats",
- "expression": "(count(log.error{hostname=devstack}, deterministic) > 1000)",
- "deterministic": true,
- "expression_data": {
- "function": "AVG",
- "metric_name": "log.error",
- "dimensions": {
- "hostname": "devstack"
- },
- "operator": "GT",
- "threshold": 1000,
- "period": 60,
- "periods": 1
- },
- "match_by": [
- "hostname"
- ],
- "severity": "CRITICAL",
- "actions_enabled": true,
- "alarm_actions": [],
- "ok_actions": [],
- "undetermined_actions": []
- }
- ]
-}
-```
-___
-
-## Get Alarm Definition
-Get the specified alarm definition.
-
-### GET /v2.0/alarm-definitions/{alarm_definition_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-* alarm_definition_id (string, required) - Alarm Definition ID
-
-#### Query Parameters
-None.
-
-#### Request Body
-None.
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON alarm definition object with the following fields:
-
-* id (string) - ID of alarm definition.
-* links ([link]) - Links to alarm definition.
-* name (string) - Name of alarm definition.
-* description (string) - Description of alarm definition.
-* expression (string) - The alarm definition expression.
-* deterministic (boolean) - Is the underlying expression deterministic ? **Read-only**, computed from *expression*
-* expression_data (JSON object) - The alarm definition expression as a JSON object.
-* match_by ([string]) - The metric dimensions to use to create unique alarms
-* severity (string) - The severity of an alarm definition. Either `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`.
-* actions_enabled (boolean) - If true actions for all alarms related to this definition are enabled.
-* alarm_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `ALARM` state.
-* ok_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `OK` state.
-* undetermined_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `UNDETERMINED` state.
-
-#### Response Examples
-```
-{
- "id": "f9935bcc-9641-4cbf-8224-0993a947ea83",
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarm-definitions/f9935bcc-9641-4cbf-8224-0993a947ea83"
- }
- ],
- "name": "CPU percent greater than 10",
- "description": "Release the hounds",
- "expression": "(avg(cpu.user_perc{hostname=devstack}) > 10)",
- "deterministic": false,
- "expression_data": {
- "function": "AVG",
- "metric_name": "cpu.user_perc",
- "dimensions": {
- "hostname": "devstack"
- },
- "operator": "GT",
- "threshold": 10,
- "period": 60,
- "periods": 1
- },
- "match_by":[
- "hostname"
- ],
- "severity": "CRITICAL",
- "actions_enabled": true,
- "alarm_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "ok_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "undetermined_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ]
-}
-```
-___
-
-## Update Alarm Definition
-Update/Replace the specified alarm definition.
-
-### PUT /v2.0/alarm-definitions/{alarm_definition_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Content-Type (string, required) - application/json
-* Accept (string) - application/json
-
-#### Path Parameters
-* alarm_definition_id (string, required)
-
-#### Query Parameters
-None.
-
-#### Request Body
-Consists of an alarm definition. An alarm has the following properties:
-
-* name (string(255), required) - A name of the alarm definition.
-* description (string(255), required) - A description of an alarm definition.
-* expression (string, required) - An alarm expression.
-* match_by ([string], required) - The metric dimensions to use to create unique alarms. This MUST be the same as the existing value for match_by
-* severity (string, required) - Severity of an alarm definition. Must be either `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`.
-* alarm_actions ([string(50)], required)
-* ok_actions ([string(50)], required)
-* undetermined_actions ([string(50)], required)
-* actions_enabled (boolean, required) If actions should be enabled (set to true) or ignored (set to false)
-
-See Changing Alarm Definitions for restrictions on changing expression and match_by.
-
-#### Request Examples
-```
-PUT /v2.0/alarm-definitions/f9935bcc-9641-4cbf-8224-0993a947ea83 HTTP/1.1
-Host: 192.168.10.4:8070
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Content-Type: application/json
-Cache-Control: no-cache
-
-{
- "name":"CPU percent greater than 15",
- "description":"Release the hounds",
- "expression":"(avg(cpu.user_perc{hostname=devstack}) > 15)",
- "match_by":[
- "hostname"
- ],
- "severity": "LOW",
- "alarm_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "ok_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "undetermined_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "actions_enabled": true
-}
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON alarm definition object with the following parameters:
-
-* id (string) - ID of alarm definition.
-* links ([link]) - Links to alarm definition.
-* name (string) - Name of alarm definition.
-* description (string) - Description of alarm definition.
-* expression (string) - The alarm definition expression.
-* deterministic (boolean) - Is the underlying expression deterministic ? **Read-only**, computed from *expression*
-* expression_data (JSON object) - The alarm definition expression as a JSON object.
-* match_by ([string]) - The metric dimensions to use to create unique alarms
-* severity (string) - The severity of an alarm definition. Either `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`.
-* actions_enabled (boolean) - If true actions for all alarms related to this definition are enabled.
-* alarm_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `ALARM` state.
-* ok_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `OK` state.
-* undetermined_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `UNDETERMINED` state.
-
-#### Response Examples
-```
-{
- "id": "f9935bcc-9641-4cbf-8224-0993a947ea83",
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarm-definitions/f9935bcc-9641-4cbf-8224-0993a947ea83"
- }
- ],
- "name": "CPU percent greater than 15",
- "description": "Release the hounds",
- "expression": "(avg(cpu.user_perc{hostname=devstack}) > 15)",
- "deterministic": false,
- "expression_data": {
- "function": "AVG",
- "metric_name": "cpu.user_perc",
- "dimensions": {
- "hostname": "devstack"
- },
- "operator": "GT",
- "threshold": 15,
- "period": 60,
- "periods": 1
- },
- "match_by":[
- "hostname"
- ]
- "severity": "CRITICAL",
- "alarm_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "ok_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "undetermined_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ]
-}
-```
-___
-
-## Patch Alarm Definition
-### PATCH /v2.0/alarm-definitions/{alarm_definition_id}
-Update selected parameters of the specified alarm definition, and enable/disable its actions.
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Content-Type (string, required) - application/json
-* Accept (string) - application/json
-
-#### Path Parameters
-* alarm_definition_id (string, required) - Alarm Definition ID
-
-#### Query Parameters
-None.
-
-#### Request Body
-Consists of an alarm with the following properties:
-
-* name (string) - Name of alarm definition.
-* description (string) - Description of alarm definition.
-* expression (string) - The alarm definition expression.
-* match_by ([string], optional) - The metric dimensions to use to create unique alarms. If specified, this MUST be the same as the existing value for match_by
-* severity (string) - The severity of an alarm definition. Either `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`.
-* actions_enabled (boolean) - If true actions for all alarms related to this definition are enabled.
-* alarm_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `ALARM` state.
-* ok_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `OK` state.
-* undetermined_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `UNDETERMINED` state.
-
-Only the parameters that are specified will be updated. See Changing Alarm Definitions for restrictions on changing expression and match_by.
-
-#### Request Examples
-```
-PATCH /v2.0/alarm-definitions/f9935bcc-9641-4cbf-8224-0993a947ea83 HTTP/1.1
-Host: 192.168.10.4:8070
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Content-Type: application/json
-Cache-Control: no-cache
-
-{
- "name":"CPU percent greater than 15",
- "description":"Release the hounds",
- "expression":"(avg(cpu.user_perc{hostname=devstack}) > 15)",
- "match_by":[
- "hostname"
- ],
- "severity":"CRITICAL",
- "alarm_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "ok_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "undetermined_actions":[
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ]
-}
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON alarm definition object with the following fields:
-
-* id (string) - ID of alarm definition.
-* links ([link]) - Links to alarm definition.
-* name (string) - Name of alarm definition.
-* description (string) - Description of alarm definition.
-* expression (string) - The alarm definition expression.
-* deterministic (boolean) - Is the underlying expression deterministic ? **Read-only**, computed from *expression*
-* expression_data (JSON object) - The alarm definition expression as a JSON object.
-* match_by ([string]) - The metric dimensions to use to create unique alarms
-* severity (string) - The severity of an alarm definition. Either `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`.
-* actions_enabled (boolean) - If true actions for all alarms related to this definition are enabled.
-* alarm_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `ALARM` state.
-* ok_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `OK` state.
-* undetermined_actions ([string]) - Array of notification method IDs that are invoked when the alarms for this definition transition to the `UNDETERMINED` state.
-
-#### Response Examples
-```
-{
- "id": "f9935bcc-9641-4cbf-8224-0993a947ea83",
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarm-definitions/f9935bcc-9641-4cbf-8224-0993a947ea83"
- }
- ],
- "name": "CPU percent greater than 15",
- "description": "Release the hounds",
- "expression": "(avg(cpu.user_perc{hostname=devstack}) > 15)",
- "deterministic": false,
- "expression_data": {
- "function": "AVG",
- "metric_name": "cpu.user_perc",
- "dimensions": {
- "hostname": "devstack"
- },
- "operator": "GT",
- "threshold": 15,
- "period": 60,
- "periods": 1
- },
- "match_by":[
- "hostname"
- ],
- "severity": "CRITICAL",
- "alarm_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "ok_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ],
- "undetermined_actions": [
- "c60ec47e-5038-4bf1-9f95-4046c6e9a759"
- ]
-}
-```
-___
-
-## Delete Alarm Definition
-Delete the specified alarm definition.
-
-### DELETE /v2.0/alarm-definitions/{alarm_definition_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-
-#### Path Parameters
-* alarm_id (string, required) - Alarm Definition ID
-
-#### Query Parameters
-None.
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-DELETE /v2.0/alarm-definitions/b461d659-577b-4d63-9782-a99194d4a472 HTTP/1.1
-Host: 192.168.10.4:8070
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 204 - No content
-
-#### Response Body
-None.
-___
-
-# Alarms
-Operations for working with alarms.
-
-## List Alarms
-List alarms
-
-### GET /v2.0/alarms
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-
-* alarm_definition_id (string, optional) - Alarm definition ID to filter by.
-* metric_name (string(255), optional) - Name of metric to filter by.
-* metric_dimensions ({string(255): string(255)}, optional) - Dimensions of metrics to filter by specified as a comma separated array of (key, value) pairs as `key1:value1,key1:value1, ...`, leaving the value empty `key1,key2:value2` will return all values for that key, multiple values for a key may be specified as `key1:value1|value2|...,key2:value4,...`
-* state (string, optional) - State of alarm to filter by, either `OK`, `ALARM` or `UNDETERMINED`.
-* severity (string, optional) - One or more severities to filter by, separated with `|`, ex. `severity=LOW|MEDIUM`.
-* lifecycle_state (string(50), optional) - Lifecycle state to filter by.
-* link (string(512), optional) - Link to filter by.
-* state_updated_start_time (string, optional) - The start time in ISO 8601 combined date and time format in UTC.
-* offset (integer, optional)
-* limit (integer, optional)
-* sort_by (string, optional) - Comma separated list of fields to sort by, defaults to 'alarm_id'. Fields may be followed by 'asc' or 'desc' to set the direction, ex 'severity desc'
-Allowed fields for sort_by are: 'alarm_id', 'alarm_definition_id', 'alarm_definition_name', 'state', 'severity', 'lifecycle_state', 'link', 'state_updated_timestamp', 'updated_timestamp', 'created_timestamp'
-
-#### Request Body
-None.
-"
-#### Request Examples
-```
-GET /v2.0/alarms?metric_name=cpu.system_perc&metric_dimensions=hostname:devstack&state=UNDETERMINED HTTP/1.1
-Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of alarm objects with the following fields:
-
-* id (string) - ID of alarm.
-* links ([link]) - Links to alarm.
-* alarm_definition (JSON object) - Summary of alarm definition.
-* metrics ({string, string(255): string(255)}) - The metrics associated with the alarm.
-* state (string) - State of alarm, either `OK`, `ALARM` or `UNDETERMINED`.
-* lifecycle_state (string) - Lifecycle state of alarm.
-* link (string) - Link to an external resource related to the alarm.
-* state_updated_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when the state was last updated.
-* updated_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when any field was last updated.
-* created_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when the alarm was created.
-
-#### Response Examples
-```
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarms?metric_name=cpu.system_perc&metric_dimensions=hostname%3Adevstack&state=UNDETERMINED"
- },
- {
- "rel": "next",
- "href": "http://192.168.10.4:8070/v2.0/alarms?offset=f9935bcc-9641-4cbf-8224-0993a947ea83&metric_name=cpu.system_perc&metric_dimensions=hostname%3Adevstack&state=UNDETERMINED"
- }
- ],
- "elements": [
- {
- "id": "f9935bcc-9641-4cbf-8224-0993a947ea83",
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarms/f9935bcc-9641-4cbf-8224-0993a947ea83"
- },
- {
- "rel": "state-history",
- "href": "http://192.168.10.4:8070/v2.0/alarms/f9935bcc-9641-4cbf-8224-0993a947ea83/state-history"
- }
- ],
- "alarm_definition": {
- "severity": "LOW",
- "id": "b7e5f472-7aa5-4254-a49a-463e749ae817",
- "links": [
- {
- "href": "http://192.168.10.4:8070/v2.0/alarm-definitions/b7e5f472-7aa5-4254-a49a-463e749ae817",
- "rel": "self"
- }
- ],
- "name": "high cpu and load"
- },
- "metrics": [
- {
- "name": "cpu.system_perc",
- "dimensions": {
- "hostname": "devstack"
- }
- }
- ],
- "state": "OK",
- "lifecycle_state":"OPEN",
- "link":"http://somesite.com/this-alarm-info",
- "state_updated_timestamp": "2015-03-20T21:04:49.000Z",
- "updated_timestamp":"2015-03-20T21:04:49.000Z",
- "created_timestamp": "2015-03-20T21:03:34.000Z"
- }
- ]
-}
-```
-___
-
-## Get Alarm Counts
-Get the number of alarms that match the criteria.
-
-### GET /v2.0/alarms/count
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Content-Type (string, required) - application/json
-* Accept (string) - application/json
-
-#### Path Parameters
-None
-
-#### Query Parameters
-* alarm_definition_id (string, optional) - Alarm definition ID to filter by.
-* metric_name (string(255), optional) - Name of metric to filter by.
-* metric_dimensions ({string(255): string(255)}, optional) - One or more dimensions of metrics to filter by specified as a comma separated array of (key, value or multiple values sperated by `|`) pairs as `key1:value1,key2:value2,key3:value3|value4,...`
-* state (string, optional) - State of alarm to filter by, either `OK`, `ALARM` or `UNDETERMINED`.
-* severity (string, optional) - One or more severities to filter by, separated with `|`, ex. `severity=LOW|MEDIUM`.
-* lifecycle_state (string(50), optional) - Lifecycle state to filter by.
-* link (string(512), optional) - Link to filter by.
-* state_updated_start_time (string, optional) - The start time in ISO 8601 combined date and time format in UTC.
-* offset (integer, optional)
-* limit (integer, optional)
-* group_by (string, optional) – a list of fields to group the results by as ```field1,field2,…```
-The group_by field is limited to `alarm_definition_id`, `name`, `state`, `severity`, `link`, `lifecycle_state`, `metric_name`, `dimension_name`, `dimension_value`.
-If any of the fields `metric_name`, `dimension_name`, or `dimension_value` are specified, the sum of the resulting counts is not guaranteed to equal the total number of alarms in the system. Alarms with multiple metrics may be included in multiple counts when grouped by any of these three fields.
-
-#### Request Body
-None
-
-#### Request Examples
-```
-GET /v2.0/alarms/count?metric_name=cpu.system_perc&metric_dimensions=hostname:devstack&group_by=state,lifecycle_state
-HTTP/1.1 Host: 192.168.10.4:8070
-Content-Type: application/json
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 200 OK
-
-#### Response Body
-Returns a JSON object containing the following fields:
-* links ([link]) - Links to alarms count resource
-* columns ([string]) - List of the column names, in the order they were returned
-* counts ([array[]]) - A two dimensional array of the counts returned
-
-#### Response Example
-```
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarms/count?metric_name=cpu.system_perc&metric_dimensions=hostname%3Adevstack&group_by=state,lifecycle_state"
- }
- ],
- "columns": ["count", "state", "lifecycle_state"],
- "counts": [
- [124, "ALARM", "ACKNOWLEDGED"],
- [12, "ALARM", "RESOLVED"],
- [235, "OK", "OPEN"],
- [61, "OK", "RESOLVED"],
- [13, "UNDETERMINED", "ACKNOWLEDGED"],
- [1, "UNDETERMINED", "OPEN"],
- [2, "UNDETERMINED", "RESOLVED"],
- ]
- }
-```
-___
-
-## List Alarms State History
-List alarm state history for alarms.
-
-### GET /v2.0/alarms/state-history
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* dimensions (string, optional) - Dimensions of metrics to filter by specified as a comma separated array of (key, value) pairs as `key1:value1,key1:value1, ...`
-* start_time (string, optional) - The start time in ISO 8601 combined date and time format in UTC.
-* end_time (string, optional) - The end time in ISO 8601 combined date and time format in UTC.
-* offset (timestamp, optional) - The offset in ISO 8601 combined date and time format in UTC.
-* limit (integer, optional)
-
-#### Request Body
-None.
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of alarm state transition objects with the following fields:
-
-* id - Alarm State Transition ID.
-* alarm_id (string) - Alarm ID.
-* metrics ({string, string, string(255): string(255)}) - The metrics associated with the alarm state transition.
-* old_state (string) - The old state of the alarm. Either `OK`, `ALARM` or `UNDETERMINED`.
-* new_state (string) - The new state of the alarm. Either `OK`, `ALARM` or `UNDETERMINED`.
-* reason (string) - The reason for the state transition.
-* reason_data (string) - The reason for the state transition as a JSON object.
-* timestamp (string) - The time in ISO 8601 combined date and time format in UTC when the state transition occurred.
-* sub_alarms ({{string, string, string(255): string(255), string, string, string, string, boolean}, string, [string]) - The sub-alarms stated of when the alarm state transition occurred.
-
-#### Response Examples
-```
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarms/state-history?dimensions=hostname%3Adevstack"
- },
- {
- "rel": "next",
- "href": "http://192.168.10.4:8070/v2.0/alarms/state-history?offset=1424451007004&dimensions=hostname%3Adevstack"
- }
- ],
- "elements": [
- {
- "id": "1424451007002",
- "alarm_id": "bc7f388d-3522-47bd-b4ae-41567090ab72",
- "metrics": [
- {
- "id": null,
- "name": "cpu.system_perc",
- "dimensions": {
- "hostname": "devstack"
- }
- }
- ],
- "old_state": "UNDETERMINED",
- "new_state": "OK",
- "reason": "The alarm threshold(s) have not been exceeded for the sub-alarms: avg(cpu.system_perc{hostname=devstack}) > 15.0 with the values: [1.5]",
- "reason_data": "{}",
- "timestamp": "2015-02-20T16:50:07.000Z",
- "sub_alarms": [
- {
- "sub_alarm_expression": {
- "function": "AVG",
- "metric_name": "cpu.system_perc",
- "dimensions": {
- "hostname": "devstack"
- },
- "operator": "GT",
- "threshold": 15,
- "period": 60,
- "periods": 1,
- "deterministic": false
- },
- "sub_alarm_state": "OK",
- "current_values": [
- 1.5
- ]
- }
- ]
- },
- {
- "id": "1424451007003",
- "alarm_id": "5ec51b06-193b-49f7-bcf7-b80d11010137",
- "metrics": [
- {
- "id": null,
- "name": "mysql.performance.slow_queries",
- "dimensions": {
- "component": "mysql",
- "service": "mysql",
- "hostname": "devstack"
- }
- }
- ],
- "old_state": "ALARM",
- "new_state": "OK",
- "reason": "The alarm threshold(s) have not been exceeded for the sub-alarms: avg(mysql.performance.slow_queries) > 10.0 times 3 with the values: [29.23069852941176, 20.146139705882355, 7.536764705882352]",
- "reason_data": "{}",
- "timestamp": "2015-02-20T16:12:07.000Z",
- "sub_alarms": [
- {
- "sub_alarm_expression": {
- "function": "AVG",
- "metric_name": "mysql.performance.slow_queries",
- "dimensions": {},
- "operator": "GT",
- "threshold": 10,
- "period": 60,
- "periods": 3,
- "deterministic": false
- },
- "sub_alarm_state": "OK",
- "current_values": [
- 29.23069852941176,
- 20.146139705882355,
- 7.536764705882352
- ]
- }
- ]
- },
- {
- "id": "1424451007004",
- "alarm_id": "5ec51b06-193b-49f7-bcf7-b80d11010137",
- "metrics": [
- {
- "id": null,
- "name": "mysql.performance.slow_queries",
- "dimensions": {
- "component": "mysql",
- "service": "mysql",
- "hostname": "devstack"
- }
- }
- ],
- "old_state": "OK",
- "new_state": "ALARM",
- "reason": "Thresholds were exceeded for the sub-alarms: avg(mysql.performance.slow_queries) > 10.0 times 3 with the values: [36.32720588235294, 29.23069852941176, 20.146139705882355]",
- "reason_data": "{}",
- "timestamp": "2015-02-20T16:11:07.000Z",
- "sub_alarms": [
- {
- "sub_alarm_expression": {
- "function": "AVG",
- "metric_name": "mysql.performance.slow_queries",
- "dimensions": {},
- "operator": "GT",
- "threshold": 10,
- "period": 60,
- "periods": 3,
- "deterministic": false
- },
- "sub_alarm_state": "ALARM",
- "current_values": [
- 36.32720588235294,
- 29.23069852941176,
- 20.146139705882355
- ]
- }
- ]
- }
- ]
-}
-
-```
-___
-
-## Get Alarm
-Get the specified alarm.
-
-### GET /v2.0/alarms/{alarm_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-* alarm_id (string, required) - Alarm ID
-
-#### Query Parameters
-None.
-
-#### Request Body
-None.
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON alarm object with the following fields:
-
-* id (string) - ID of alarm.
-* links ([link]) - Links to alarm.
-* alarm_definition (JSON object) - Summary of alarm definition.
-* metrics ({string, string(255): string(255)}) - The metrics associated with the alarm.
-* state (string) - State of alarm, either `OK`, `ALARM` or `UNDETERMINED`.
-* lifecycle_state (string) - Lifecycle state of alarm.
-* link (string) - Link to an external resource related to the alarm.
-* state_updated_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when the state was last updated.
-* updated_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when any field was last updated.
-* created_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when the alarm was created.
-
-#### Response Examples
-```
-{
- "id":"f9935bcc-9641-4cbf-8224-0993a947ea83",
- "links":[
- {
- "rel":"self",
- "href":"http://192.168.10.4:8070/v2.0/alarms/f9935bcc-9641-4cbf-8224-0993a947ea83"
- },
- {
- "rel":"state-history",
- "href":"http://192.168.10.4:8070/v2.0/alarms/f9935bcc-9641-4cbf-8224-0993a947ea83/state-history"
- }
- ],
- "alarm_definition":
- {
- "id":"ad837fca-5564-4cbf-523-0117f7dac6ad",
- "name":"Average CPU percent greater than 10",
- "severity":"LOW",
- "links":[
- {
- "rel":"self",
- "href":"http://192.168.10.4:8070/v2.0/alarm-definitions/ad837fca-5564-4cbf-523-0117f7dac6ad
- }
- ]
- },
- "metrics":[{
- "name":"cpu.system_perc",
- "dimensions":{
- "hostname":"devstack"
- }
- }],
- "state":"OK",
- "lifecycle_state":"OPEN",
- "link":"http://somesite.com/this-alarm-info",
- "state_updated_timestamp": "2015-03-20T21:04:49.000Z",
- "updated_timestamp": "2015-03-20T21:04:49.000Z",
- "created_timestamp": "2015-03-20T21:03:34.000Z"
-}
-```
-___
-
-## Update Alarm
-Update/Replace the entire state of the specified alarm.
-
-### PUT /v2.0/alarms/{alarm_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Content-Type (string, required) - application/json
-* Accept (string) - application/json
-
-#### Path Parameters
-* alarm_id (string, required)
-
-#### Query Parameters
-None.
-
-#### Request Body
-Consists of an alarm definition. An alarm has the following mutable properties:
-
-* state (string) - State of alarm, either `OK`, `ALARM` or `UNDETERMINED`.
-* lifecycle_state (string(50)) - Lifecycle state of alarm.
-* link (string(512)) - Link to an external resource related to the alarm.
-
-#### Request Examples
-```
-PUT /v2.0/alarms/f9935bcc-9641-4cbf-8224-0993a947ea83 HTTP/1.1
-Host: 192.168.10.4:8070
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Content-Type: application/json
-Cache-Control: no-cache
-
-{
- "state":"OK",
- "lifecycle_state":"OPEN",
- "link":"http://pagerduty.com/"
-}
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON alarm object with the following parameters:
-
-* id (string) - ID of alarm.
-* links ([link]) - Links to alarm.
-* alarm_definition_id (string) - Name of alarm.
-* description (string) - ID of the alarm definition.
-* metrics ({string, string(255): string(255)}) - The metrics associated with the alarm.
-* state (string) - State of alarm, either `OK`, `ALARM` or `UNDETERMINED`.
-* lifecycle_state (string) - Lifecycle state of alarm.
-* link (string) - Link to an external resource related to the alarm.
-* state_updated_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when the state was last updated.
-* updated_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when any field was last updated.
-* created_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when the alarm was created.
-
-#### Response Examples
-```
-{
- "id":"f9935bcc-9641-4cbf-8224-0993a947ea83",
- "links":[
- {
- "rel":"self",
- "href":"http://192.168.10.4:8070/v2.0/alarms/f9935bcc-9641-4cbf-8224-0993a947ea83"
- },
- {
- "rel":"state-history",
- "href":"http://192.168.10.4:8070/v2.0/alarms/f9935bcc-9641-4cbf-8224-0993a947ea83/state-history"
- }
- ],
- "alarm_definition_id":"ad837fca-5564-4cbf-523-0117f7dac6ad",
- "metrics":[{
- "name":"cpu.system_perc",
- "dimensions":{
- "hostname":"devstack"
- }
- }],
- "state":"OK",
- "lifecycle_state":"OPEN",
- "link":"http://somesite.com/this-alarm-info",
- "state_updated_timestamp": "2015-03-20T21:04:49.000Z",
- "updated_timestamp": "2015-03-20T21:04:49.000Z",
- "created_timestamp": "2015-03-20T21:03:34.000Z"
-}
-```
-___
-
-## Patch Alarm
-### PATCH /v2.0/alarms/{alarm_id}
-Update select parameters of the specified alarm, set the alarm state and enable/disable it. To set lifecycle_state or link field to `null`, use an UPDATE Alarm request with `"lifecycle_state":null` and/or `"link":null`.
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Content-Type (string, required) - application/json
-* Accept (string) - application/json
-
-#### Path Parameters
-* alarm_id (string, required) - Alarm ID
-
-#### Query Parameters
-None.
-
-#### Request Body
-Consists of an alarm with the following mutable properties:
-
-* state (string, optional) - State of alarm, either `OK`, `ALARM` or `UNDETERMINED`.
-* lifecycle_state (string(50), optional) - Lifecycle state of alarm.
-* link (string(512), optional) - Link to an external resource related to the alarm.
-
-#### Request Examples
-```
-PATCH /v2.0/alarms/f9935bcc-9641-4cbf-8224-0993a947ea83 HTTP/1.1
-Host: 192.168.10.4:8070
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Content-Type: application/json
-Cache-Control: no-cache
-
-{
- "lifecycle_state":"OPEN",
- "link":"http://somesite.com/this-alarm-info"
-}
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON alarm object with the following fields:
-
-* id (string) - ID of alarm.
-* links ([link]) - Links to alarm.
-* alarm_definition_id (string) - Name of alarm.
-* description (string) - ID of the alarm definition.
-* metrics ({string, string(255): string(255)}) - The metrics associated with the alarm.
-* state (string) - State of alarm, either `OK`, `ALARM` or `UNDETERMINED`.
-* lifecycle_state (string) - Lifecycle state of the alarm.
-* link (string) - Link to an external resource related to the alarm.
-* state_updated_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when the state was last updated.
-* updated_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when any field was last updated.
-* created_timestamp - Timestamp in ISO 8601 combined date and time format in UTC when the alarm was created.
-
-#### Response Examples
-```
-{
- "id": "f9935bcc-9641-4cbf-8224-0993a947ea83",
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarms/f9935bcc-9641-4cbf-8224-0993a947ea83"
- },
- {
- "rel": "state-history",
- "href": "http://192.168.10.4:8070/v2.0/alarms/f9935bcc-9641-4cbf-8224-0993a947ea83/state-history"
- }
- ],
- "alarm_definition_id": "ad837fca-5564-4cbf-523-0117f7dac6ad",
- "metrics": [
- {
- "name": "cpu.system_perc",
- "dimensions": {
- "hostname": "devstack"
- }
- }
- ],
- "state": "OK"
- "lifecycle_state":"OPEN",
- "link":"http://somesite.com/this-alarm-info",
- "state_updated_timestamp": "2015-03-20T21:04:49.000Z",
- "updated_timestamp": "2015-03-20T21:04:49.000Z",
- "created_timestamp": "2015-03-20T21:03:34.000Z"
-}
-
-```
-___
-
-## Delete Alarm
-Delete the specified alarm.
-
-### DELETE /v2.0/alarms/{alarm_id}
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-
-#### Path Parameters
-* alarm_id (string, required) - Alarm ID
-
-#### Query Parameters
-None.
-
-#### Request Body
-None.
-
-#### Request Examples
-```
-DELETE /v2.0/alarms/b461d659-577b-4d63-9782-a99194d4a472 HTTP/1.1
-Host: 192.168.10.4:8070
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 204 - No content
-
-#### Response Body
-None.
-___
-
-## List Alarm State History
-List the alarm state history for the specified alarm.
-
-### GET /v2.0/alarms/{alarm_id}/state-history
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Accept (string) - application/json
-
-#### Path Parameters
-* alarm_id (string, required)
-
-#### Query Parameters
-* offset (timestamp, optional) - The offset in ISO 8601 combined date and time format in UTC.
-* limit (integer, optional)
-
-#### Request Body
-None.
-
-#### Request Data
-```
-GET /v2.0/alarms/37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0/state-history HTTP/1.1
-Host: 192.168.10.4:8070
-X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
-Cache-Control: no-cache
-```
-
-### Response
-#### Status Code
-* 200 - OK
-
-#### Response Body
-Returns a JSON object with a 'links' array of links and an 'elements' array of alarm state transition objects with the following fields:
-
-* id - Alarm State Transition ID.
-* alarm_id (string) - Alarm ID.
-* metrics ({string, string, string(255): string(255)}) - The metrics associated with the alarm state transition.
-* old_state (string) - The old state of the alarm. Either `OK`, `ALARM` or `UNDETERMINED`.
-* new_state (string) - The new state of the alarm. Either `OK`, `ALARM` or `UNDETERMINED`.
-* reason (string) - The reason for the state transition.
-* reason_data (string) - The reason for the state transition as a JSON object.
-* timestamp (string) - The time in ISO 8601 combined date and time format in UTC when the state transition occurred.
-* sub_alarms ({{string, string, string(255): string(255), string, string, string, string, boolean}, string, [string]) - The sub-alarms stated of when the alarm state transition occurred.
-
-#### Response Examples
-```
-{
- "links": [
- {
- "rel": "self",
- "href": "http://192.168.10.4:8070/v2.0/alarms/37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0/state-history"
- },
- {
- "rel": "next",
- "href": "http://192.168.10.4:8070/v2.0/alarms/37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0/state-history?offset=1424452147006"
- }
- ],
- "elements": [
- {
- "id": "1424452147003",
- "alarm_id": "37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0",
- "metrics": [
- {
- "id": null,
- "name": "cpu.idle_perc",
- "dimensions": {
- "hostname": "devstack"
- }
- }
- ],
- "old_state": "OK",
- "new_state": "ALARM",
- "reason": "Thresholds were exceeded for the sub-alarms: avg(cpu.idle_perc) < 10.0 times 3 with the values: [0.0, 0.0, 0.0]",
- "reason_data": "{}",
- "timestamp": "2015-02-20T17:09:07.000Z",
- "sub_alarms": [
- {
- "sub_alarm_expression": {
- "function": "AVG",
- "metric_name": "cpu.idle_perc",
- "dimensions": {},
- "operator": "LT",
- "threshold": 10,
- "period": 60,
- "periods": 3,
- "deterministic": false
- },
- "sub_alarm_state": "ALARM",
- "current_values": [
- 0,
- 0,
- 0
- ]
- }
- ]
- },
- {
- "id": "1424452147004",
- "alarm_id": "37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0",
- "metrics": [
- {
- "id": null,
- "name": "cpu.idle_perc",
- "dimensions": {
- "hostname": "devstack"
- }
- }
- ],
- "old_state": "ALARM",
- "new_state": "OK",
- "reason": "The alarm threshold(s) have not been exceeded for the sub-alarms: avg(cpu.idle_perc) < 10.0 times 3 with the values: [0.0, 0.0, 72.475]",
- "reason_data": "{}",
- "timestamp": "2015-02-20T17:02:07.000Z",
- "sub_alarms": [
- {
- "sub_alarm_expression": {
- "function": "AVG",
- "metric_name": "cpu.idle_perc",
- "dimensions": {},
- "operator": "LT",
- "threshold": 10,
- "period": 60,
- "periods": 3,
- "deterministic": false
- },
- "sub_alarm_state": "OK",
- "current_values": [
- 0,
- 0,
- 72.475
- ]
- }
- ]
- },
- {
- "id": "1424452147005",
- "alarm_id": "37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0",
- "metrics": [
- {
- "id": null,
- "name": "cpu.idle_perc",
- "dimensions": {
- "hostname": "devstack"
- }
- }
- ],
- "old_state": "OK",
- "new_state": "ALARM",
- "reason": "Thresholds were exceeded for the sub-alarms: avg(cpu.idle_perc) < 10.0 times 3 with the values: [0.0, 0.0, 0.0]",
- "reason_data": "{}",
- "timestamp": "2015-02-20T16:56:07.000Z",
- "sub_alarms": [
- {
- "sub_alarm_expression": {
- "function": "AVG",
- "metric_name": "cpu.idle_perc",
- "dimensions": {},
- "operator": "LT",
- "threshold": 10,
- "period": 60,
- "periods": 3,
- "deterministic": false
- },
- "sub_alarm_state": "ALARM",
- "current_values": [
- 0,
- 0,
- 0
- ]
- }
- ]
- },
- {
- "id": "1424452147006",
- "alarm_id": "37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0",
- "metrics": [
- {
- "id": null,
- "name": "cpu.idle_perc",
- "dimensions": {
- "hostname": "devstack"
- }
- }
- ],
- "old_state": "UNDETERMINED",
- "new_state": "OK",
- "reason": "The alarm threshold(s) have not been exceeded",
- "reason_data": "{}",
- "timestamp": "2015-02-20T15:02:30.000Z",
- "sub_alarms": []
- }
- ]
-}
-
-```
-___
-
-# Logs
-The logs resource allows logs to be created and queried.
-
-## Create Logs
-Create logs.
-
-### POST /v2.0/logs
-
-#### Headers
-* X-Auth-Token (string, required) - Keystone auth token
-* Content-Type (string, required) - application/json
-
-#### Path Parameters
-None.
-
-#### Query Parameters
-* tenant_id (string, optional, restricted) - Tenant ID (project ID) to create
- log on behalf of. Usage of this query parameter requires the role specified
- in the configuration option `delegate_roles` .
-
-#### Request Body
-JSON object which can have a maximum size of 5 MB. It consists of global
-dimensions (optional) and array of logs. Each single log message with
-resulting envelope can have a maximum size of 1 MB.
-Dimensions is a dictionary of key-value pairs and should be consistent with
-metric dimensions.
-
-Logs is an array of JSON objects describing the log entries. Every log object
-can have individual set of dimensions which has higher precedence than global
-ones. It should be noted that dimensions presented in each log record are also
-optional.
-
- If both global (at the root level) and local (at log entry level)
- dimensions would be present, they will be merged into one dictionary.
- Please note that local dimensions are logically considered as more
- specific thus in case of conflict (i.e. having two entries with the same
- key in both global and local dimensions) local dimensions take
- precedence over global dimensions.
-
-#### Request Examples
-
-POST logs
-
-```
-POST /v2.0/logs HTTP/1.1
-Host: 192.168.10.4:5607
-Content-Type: application/json
-X-Auth-Token: 27feed73a0ce4138934e30d619b415b0
-Cache-Control: no-cache
-
-{
- "dimensions":{
- "hostname":"mini-mon",
- "service":"monitoring"
- },
- "logs":[
- {
- "message":"msg1",
- "dimensions":{
- "component":"mysql",
- "path":"/var/log/mysql.log"
- }
- },
- {
- "message":"msg2",
- "dimensions":{
- "component":"monasca-api",
- "path":"/var/log/monasca/monasca-api.log"
- }
- }
- ]
-}
-```
-
-### Response
-#### Status Code
-* 204 - No content
-
-#### Response Body
-This request does not return a response body.
-___
-
-# License
-(C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
-(C) Copyright 2019 FUJITSU LIMITED
-
-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.
diff --git a/etc/api-config.ini b/etc/api-config.ini
deleted file mode 100644
index e8444c194..000000000
--- a/etc/api-config.ini
+++ /dev/null
@@ -1,27 +0,0 @@
-[DEFAULT]
-name = monasca_api
-
-[pipeline:main]
-pipeline = request_id auth api
-
-[app:api]
-paste.app_factory = monasca_api.api.server:launch
-
-[filter:auth]
-paste.filter_factory = monasca_api.healthcheck.keystone_protocol:filter_factory
-
-[filter:request_id]
-paste.filter_factory = oslo_middleware.request_id:RequestId.factory
-
-[server:main]
-use = egg:gunicorn#main
-host = 127.0.0.1
-port = 8070
-workers = 9
-worker-connections = 2000
-worker-class = eventlet
-timeout = 30
-backlog = 2048
-keepalive = 2
-proc_name = monasca-api
-loglevel = DEBUG
diff --git a/etc/api-logging.conf b/etc/api-logging.conf
deleted file mode 100644
index 41d547773..000000000
--- a/etc/api-logging.conf
+++ /dev/null
@@ -1,49 +0,0 @@
-[loggers]
-keys = root, sqlalchemy, kafka, kafkalib
-
-[handlers]
-keys = console, file
-
-[formatters]
-keys = context
-
-[logger_root]
-level = DEBUG
-handlers = console, file
-
-[logger_sqlalchemy]
-qualname = sqlalchemy.engine
-# "level = INFO" logs SQL queries.
-# "level = DEBUG" logs SQL queries and results.
-# "level = WARN" logs neither. (Recommended for production systems.)
-level = DEBUG
-handlers = console, file
-propagate=0
-
-[logger_kafka]
-qualname = kafka
-level = DEBUG
-handlers = console, file
-propagate = 0
-
-[logger_kafkalib]
-qualname = monasca_common.kafka_lib
-level = INFO
-handlers = console, file
-propagate = 0
-
-[handler_console]
-class = logging.StreamHandler
-args = (sys.stderr,)
-level = DEBUG
-formatter = context
-
-[handler_file]
-class = logging.handlers.RotatingFileHandler
-level = DEBUG
-formatter = context
-# store up to 5*100MB of logs
-args = ('/var/log/monasca/api/monasca-api.log', 'a', 104857600, 5)
-
-[formatter_context]
-class = oslo_log.formatters.ContextFormatter
\ No newline at end of file
diff --git a/etc/api-uwsgi.ini b/etc/api-uwsgi.ini
deleted file mode 100644
index 74e0dc2c7..000000000
--- a/etc/api-uwsgi.ini
+++ /dev/null
@@ -1,25 +0,0 @@
-[uwsgi]
-wsgi-file = /usr/local/bin/monasca-api-wsgi
-
-# Versions of mod_proxy_uwsgi>=2.0.6 should use a UNIX socket, see
-# http://uwsgi-docs.readthedocs.org/en/latest/Apache.html#mod-proxy-uwsgi
-uwsgi-socket = 127.0.0.1:8070
-
-# Override the default size for headers from the 4k default.
-buffer-size = 65535
-
-# This is running standalone
-master = true
-
-enable-threads = true
-
-# Tune this to your environment.
-processes = 4
-
-# uwsgi recommends this to prevent thundering herd on accept.
-thunder-lock = true
-
-plugins = python
-
-# This ensures that file descriptors aren't shared between keystone processes.
-lazy-apps = true
\ No newline at end of file
diff --git a/java/pom.xml b/java/pom.xml
deleted file mode 100644
index ee6b8b0e7..000000000
--- a/java/pom.xml
+++ /dev/null
@@ -1,435 +0,0 @@
-
- 4.0.0
-
- monasca-api
- monasca-api
- 1.2.1-SNAPSHOT
- http://github.com/openstack/monasca-api
- jar
-
-
- 3.0
-
-
-
-
- ${maven.build.timestamp}
- yyyy-MM-dd'T'HH:mm:ss
- ${project.version}-${timestamp}-${gitRevision}
- ${project.artifactId}-${computedVersion}
- 1.3.0-SNAPSHOT
- 0.7.0
- 2.3.9
-
- false
- UTF-8
- UTF-8
- ${project.artifactId}-${project.version}-shaded
-
-
-
-
- scm:git:git@git.openstack.org:openstack/monasca-api
- scm:git:git.openstack.org:openstack/monasca-api
-
-
-
-
- release-deploy-url-override
-
-
- BUILD_NUM
-
-
-
- ${versionNumber}.${BUILD_NUM}
-
-
-
-
-
-
- monasca-common
- monasca-common-influxdb
- ${mon.common.version}
-
-
- monasca-common
- monasca-common-model
- ${mon.common.version}
-
-
- monasca-common
- monasca-common-persistence
- ${mon.common.version}
-
-
- monasca-common
- monasca-common-util
- ${mon.common.version}
-
-
- monasca-common
- monasca-common-hibernate
- ${mon.common.version}
-
-
- commons-validator
- commons-validator
- 1.4.0
-
-
- monasca-common
- monasca-common-kafka
- ${mon.common.version}
-
-
- monasca-common
- monasca-common-middleware
- ${mon.common.version}
-
-
- io.dropwizard
- dropwizard-core
- ${dropwizard.version}
-
-
- io.dropwizard
- dropwizard-db
- ${dropwizard.version}
-
-
- io.dropwizard
- dropwizard-jdbi
- ${dropwizard.version}
-
-
- io.dropwizard
- dropwizard-assets
- ${dropwizard.version}
-
-
- io.dropwizard
- dropwizard-jersey
- ${dropwizard.version}
-
-
- mysql
- mysql-connector-java
- 5.1.36
-
-
- org.drizzle.jdbc
- drizzle-jdbc
- 1.4
-
-
- com.google.code.findbugs
- jsr305
- 2.0.0
-
-
- org.apache.curator
- curator-recipes
- 2.2.0-incubating
-
-
- org.slf4j
- slf4j-log4j12
-
-
-
-
- org.apache.kafka
- kafka_2.11
- 0.8.2.2
-
-
- com.sun.jdmk
- jmxtools
-
-
- com.sun.jmx
- jmxri
-
-
- org.slf4j
- slf4j-simple
-
-
-
-
- org.influxdb
- influxdb-java
- 1.0
-
-
- postgresql
- postgresql
- 9.1-901.jdbc4
-
-
- com.zaxxer
- HikariCP-java6
- ${hikaricp.version}
- compile
-
-
-
-
- monasca-common
- monasca-common-testing
- ${mon.common.version}
- test
-
-
- monasca-common
- monasca-common-dropwizard
- ${mon.common.version}
- test-jar
- test
-
-
- io.dropwizard
- dropwizard-testing
- ${dropwizard.version}
- test
-
-
- org.mockito
- mockito-all
- 1.9.5
- test
-
-
- com.github.docker-java
- docker-java
- 0.9.1
- test
-
-
- com.jayway.restassured
- rest-assured
- 2.3.2
-
-
- commons-io
- commons-io
- 2.4
-
-
- org.testng
- testng
- 6.8.8
- test
-
-
- org.apache.httpcomponents
- httpclient
- 4.4
-
-
-
-
-
-
- maven-clean-plugin
- 2.5
-
-
-
- ${project.basedir}/debs
-
-
-
-
-
- org.codehaus.mojo
- buildnumber-maven-plugin
- 1.1
-
-
- validate
-
- create
-
-
-
-
- false
- 6
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.1
-
- 1.7
- 1.7
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 2.17
-
-
- org.apache.maven.surefire
- surefire-testng
- 2.17
-
-
-
- performance,functional,integration,database,slow
-
-
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
- 2.17
-
- performance,functional,integration,database,slow,orm
- ${skipITs}
- methods
- 4
-
-
-
-
-
- org.apache.maven.plugins
- maven-shade-plugin
- 1.2
-
- ${computedName}
- true
-
-
-
- org.eclipse.jetty.orbit:javax.servlet
-
- META-INF/*.SF
- META-INF/*.DSA
- META-INF/*.RSA
-
-
-
-
-
- org.hamcrest:hamcrest-core
- org.hamcrest:hamcrest-library
-
-
-
-
-
- package
-
- shade
-
-
-
-
-
- monasca.api.MonApiApplication
-
-
- true
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.4
-
-
-
- monasca.api
-
-
- ${project.artifactId}-${computedVersion}
-
-
-
-
-
- maven-assembly-plugin
- 2.4.1
-
-
- src/assembly/tar.xml
-
- ${artifactNamedVersion}
-
-
-
- make-assembly
- package
-
- single
-
-
-
-
-
- jdeb
- org.vafer
- 1.0
-
-
- package
-
- jdeb
-
-
- ${project.basedir}/debs/binaries/${computedName}.deb
-
-
- file
- ${project.build.directory}/${shadedJarName}.jar
- /opt/monasca/monasca-api.jar
-
-
- file
- ${project.basedir}/src/deb/etc/api-config.yml-sample
-
- /etc/monasca/api-config.yml-sample
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 2.3
-
-
- attach-sources
-
- jar
-
-
-
-
-
- org.apache.maven.plugins
- maven-scm-plugin
- 1.9.2
-
- ${project.version}
-
-
-
-
-
-
diff --git a/java/src/assembly/tar.xml b/java/src/assembly/tar.xml
deleted file mode 100644
index 2d55927e3..000000000
--- a/java/src/assembly/tar.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
- tar
-
- tar.gz
-
-
-
- ${project.basedir}
- /
-
- README*
- LICENSE*
-
-
-
-
-
- ${project.build.directory}/${shadedJarName}.jar
- /
- monasca-api.jar
-
-
- ${project.basedir}/src/deb/etc/api-config.yml-sample
- examples
-
-
-
diff --git a/java/src/deb/control/control b/java/src/deb/control/control
deleted file mode 100644
index f0fdbc6ad..000000000
--- a/java/src/deb/control/control
+++ /dev/null
@@ -1,9 +0,0 @@
-Package: [[name]]
-Section: misc
-Priority: optional
-Architecture: all
-Depends: openjdk-7-jre-headless | openjdk-7-jre
-Version: [[version]]-[[timestamp]]-[[buildNumber]]
-Maintainer: Monasca Team
-Description: Monasca-API
- RESTful API for all Monasca data.
diff --git a/java/src/deb/control/prerm b/java/src/deb/control/prerm
deleted file mode 100644
index 412293690..000000000
--- a/java/src/deb/control/prerm
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-case "$1" in
- remove)
- stop monasca-api
- ;;
-esac
-
-exit 0
diff --git a/java/src/deb/etc/api-config.yml-sample b/java/src/deb/etc/api-config.yml-sample
deleted file mode 100755
index 996e2ef39..000000000
--- a/java/src/deb/etc/api-config.yml-sample
+++ /dev/null
@@ -1,148 +0,0 @@
-# The region for which all metrics passing through this server will be persisted
-region: region-a
-
-# Maximum rows (Mysql) or points (Influxdb) to return when listing elements
-maxQueryLimit: 10000
-
-# Whether this server is running on a secure port
-accessedViaHttps: false
-
-# Topic for publishing metrics to
-metricsTopic: metrics
-
-# Topic for publishing domain events to
-eventsTopic: events
-
-kafka:
- brokerUris:
- - 192.168.10.4:9092
- zookeeperUris:
- - 192.168.10.4:2181
- healthCheckTopic: healthcheck
-
-mysql:
- driverClass: com.mysql.jdbc.Driver
- url: jdbc:mysql://192.168.10.4:3306/mon?connectTimeout=5000&autoReconnect=true&useLegacyDatetimeCode=false
- user: monapi
- password: password
- maxWaitForConnection: 1s
- validationQuery: "/* MyService Health Check */ SELECT 1"
- minSize: 8
- maxSize: 32
- checkConnectionWhileIdle: false
- checkConnectionOnBorrow: true
-
-databaseConfiguration:
- databaseType: influxdb
-
-influxDB:
- version: V9
- maxHttpConnections: 100
- # Retention policy may be left blank to indicate default policy.
- retentionPolicy:
- name: mon
- url: http://192.168.10.4:8086
- user: mon_api
- password: password
-
-vertica:
- driverClass: com.vertica.jdbc.Driver
- url: jdbc:vertica://192.168.10.8/mon
- user: dbadmin
- password: password
- maxWaitForConnection: 1s
- validationQuery: "/* MyService Health Check */ SELECT 1"
- minSize: 4
- maxSize: 32
- checkConnectionWhileIdle: false
- #
- # vertica database hint to be added to SELECT
- # statements. For example, the hint below is used
- # to tell vertica that the query can be satisfied
- # locally (replicated projection).
- #
- # dbHint: "/*+KV(01)*/"
- dbHint: ""
-
-middleware:
- enabled: true
- serverVIP: identity.example.com
- serverPort: 9543
- useHttps: true
- truststore: etc/monasca/truststore.jks
- truststorePass: changeit
- connTimeout: 500
- connSSLClientAuth: true
- keystore: etc/monasca/keystore.jks
- keystorePass: changeit
- connPoolMaxActive: 3
- connPoolMaxIdle: 3
- connPoolEvictPeriod: 600000
- connPoolMinIdleTime: 600000
- connRetryTimes: 2
- connRetryInterval: 50
- defaultAuthorizedRoles: [user, domainuser, domainadmin, monasca-user]
- readOnlyAuthorizedRoles: [monasca-read-only-user]
- agentAuthorizedRoles: [monasca-agent]
- adminAuthMethod: password
- adminUser: admin
- adminPassword: admin
- adminProjectId:
- adminProjectName:
- adminUserDomainId:
- adminUserDomainName:
- adminProjectDomainId:
- adminProjectDomainName:
- adminToken:
- timeToCacheToken: 600
- maxTokenCacheSize: 1048576
-
-server:
- applicationConnectors:
- - type: http
- port: 8070
- maxRequestHeaderSize: 16KiB # Allow large headers used by keystone tokens
- requestLog:
- timeZone: UTC
- appenders:
- - type: file
- currentLogFilename: /var/log/monasca/api/request.log
- threshold: ALL
- archive: true
- archivedLogFilenamePattern: /var/log/monasca/api/request-%d.log.gz
- archivedFileCount: 5
-
-# Logging settings.
-logging:
-
- # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL.
- level: WARN
-
- # Logger-specific levels.
- loggers:
-
- # Sets the level for 'com.example.app' to DEBUG.
- com.example.app: DEBUG
-
- appenders:
- - type: console
- threshold: ALL
- timeZone: UTC
- target: stdout
- logFormat: # TODO
-
- - type: file
- currentLogFilename: /var/log/monasca/api/monasca-api.log
- threshold: ALL
- archive: true
- archivedLogFilenamePattern: /var/log/monasca/api/monasca-api-%d.log.gz
- archivedFileCount: 5
- timeZone: UTC
- logFormat: # TODO
-
- - type: syslog
- host: localhost
- port: 514
- facility: local0
- threshold: ALL
- logFormat: # TODO
diff --git a/java/src/main/java/monasca/api/ApiConfig.java b/java/src/main/java/monasca/api/ApiConfig.java
deleted file mode 100644
index f7b5127bf..000000000
--- a/java/src/main/java/monasca/api/ApiConfig.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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.
- */
-package monasca.api;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import monasca.common.hibernate.configuration.HibernateDbConfiguration;
-import monasca.common.messaging.kafka.KafkaConfiguration;
-import monasca.api.infrastructure.middleware.MiddlewareConfiguration;
-import monasca.api.infrastructure.persistence.vertica.VerticaDataSourceFactory;
-import monasca.common.configuration.DatabaseConfiguration;
-
-import monasca.common.configuration.InfluxDbConfiguration;
-import io.dropwizard.Configuration;
-import io.dropwizard.db.DataSourceFactory;
-
-import org.hibernate.validator.constraints.NotEmpty;
-
-import java.util.List;
-
-import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
-
-
-public class ApiConfig extends Configuration {
- @NotEmpty
- public String region;
- @NotNull
- public Boolean accessedViaHttps;
- @NotEmpty
- public String metricsTopic = "metrics";
- @NotEmpty
- public String eventsTopic = "events";
- @NotNull
- public int maxQueryLimit;
- @NotEmpty
- public String alarmStateTransitionsTopic = "alarm-state-transitions";
- @NotEmpty
- public List validNotificationPeriods;
- @Valid
- @NotNull
- public DataSourceFactory mysql;
- @Valid
- @NotNull
- public VerticaDataSourceFactory vertica;
- @Valid
- @NotNull
- public KafkaConfiguration kafka;
- @Valid
- @NotNull
- public MiddlewareConfiguration middleware;
- @Valid
- public InfluxDbConfiguration influxDB;
- @Valid
- @JsonProperty
- public DatabaseConfiguration databaseConfiguration;
- @Valid
- public HibernateDbConfiguration hibernate;
-}
diff --git a/java/src/main/java/monasca/api/MonApiApplication.java b/java/src/main/java/monasca/api/MonApiApplication.java
deleted file mode 100644
index 64cc7333a..000000000
--- a/java/src/main/java/monasca/api/MonApiApplication.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * (C) Copyright 2014,2016 Hewlett Packard Enterprise Development LP
- *
- * 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.
- */
-package monasca.api;
-
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.PropertyNamingStrategy;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-
-import org.eclipse.jetty.servlets.CrossOriginFilter;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.FilterRegistration.Dynamic;
-import javax.ws.rs.ext.ExceptionMapper;
-
-import io.dropwizard.Application;
-import io.dropwizard.jdbi.bundles.DBIExceptionsBundle;
-import io.dropwizard.setup.Bootstrap;
-import io.dropwizard.setup.Environment;
-import monasca.api.infrastructure.servlet.MockAuthenticationFilter;
-import monasca.api.infrastructure.servlet.PostAuthenticationFilter;
-import monasca.api.infrastructure.servlet.PreAuthenticationFilter;
-import monasca.api.infrastructure.servlet.RoleAuthorizationFilter;
-import monasca.api.resource.AlarmDefinitionResource;
-import monasca.api.resource.AlarmResource;
-import monasca.api.resource.DimensionResource;
-import monasca.api.resource.MeasurementResource;
-import monasca.api.resource.MetricResource;
-import monasca.api.resource.NotificationMethodResource;
-import monasca.api.resource.NotificationMethodTypesResource;
-import monasca.api.resource.StatisticResource;
-import monasca.api.resource.VersionResource;
-import monasca.api.resource.exception.ConstraintViolationExceptionMapper;
-import monasca.api.resource.exception.EntityExistsExceptionMapper;
-import monasca.api.resource.exception.EntityNotFoundExceptionMapper;
-import monasca.api.resource.exception.IllegalArgumentExceptionMapper;
-import monasca.api.resource.exception.InvalidEntityExceptionMapper;
-import monasca.api.resource.exception.JsonMappingExceptionManager;
-import monasca.api.resource.exception.JsonProcessingExceptionMapper;
-import monasca.api.resource.exception.MultipleMetricsExceptionMapper;
-import monasca.api.resource.exception.ThrowableExceptionMapper;
-import monasca.api.resource.serialization.SubAlarmExpressionSerializer;
-import monasca.common.middleware.AuthConstants;
-import monasca.common.middleware.TokenAuth;
-import monasca.common.util.Injector;
-
-/**
- * Monitoring API application.
- */
-public class MonApiApplication extends Application {
- public static void main(String[] args) throws Exception {
- /*
- * This should allow command line options to show the current version
- * java -jar monasca-api.jar --version
- * java -jar monasca-api.jar -version
- * java -jar monasca-api.jar version
- * Really anything with the word version in it will show the
- * version as long as there is only one argument
- * */
- if (args.length == 1 && args[0].toLowerCase().contains("version")) {
- showVersion();
- System.exit(0);
- }
-
- new MonApiApplication().run(args);
- }
-
- private static void showVersion() {
- Package pkg;
- pkg = Package.getPackage("monasca.api");
-
- System.out.println("-------- Version Information --------");
- System.out.println(pkg.getImplementationVersion());
- }
-
- @Override
- public void initialize(Bootstrap bootstrap) {
- /** Configure bundles */
- bootstrap.addBundle(new DBIExceptionsBundle());
- }
-
- @Override
- public String getName() {
- return "HP Cloud Monitoring";
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public void run(ApiConfig config, Environment environment) throws Exception {
- /** Wire services */
- Injector.registerModules(new MonApiModule(environment, config));
-
- /** Configure resources */
- environment.jersey().register(Injector.getInstance(VersionResource.class));
- environment.jersey().register(Injector.getInstance(AlarmDefinitionResource.class));
- environment.jersey().register(Injector.getInstance(AlarmResource.class));
- environment.jersey().register(Injector.getInstance(DimensionResource.class));
- environment.jersey().register(Injector.getInstance(MetricResource.class));
- environment.jersey().register(Injector.getInstance(MeasurementResource.class));
- environment.jersey().register(Injector.getInstance(StatisticResource.class));
- environment.jersey().register(Injector.getInstance(NotificationMethodResource.class));
- environment.jersey().register(Injector.getInstance(NotificationMethodTypesResource.class));
-
- /** Configure providers */
- removeExceptionMappers(environment.jersey().getResourceConfig().getSingletons());
- environment.jersey().register(new EntityExistsExceptionMapper());
- environment.jersey().register(new EntityNotFoundExceptionMapper());
- environment.jersey().register(new IllegalArgumentExceptionMapper());
- environment.jersey().register(new InvalidEntityExceptionMapper());
- environment.jersey().register(new JsonProcessingExceptionMapper());
- environment.jersey().register(new JsonMappingExceptionManager());
- environment.jersey().register(new ConstraintViolationExceptionMapper());
- environment.jersey().register(new ThrowableExceptionMapper() {});
- environment.jersey().register(new MultipleMetricsExceptionMapper());
-
- /** Configure Jackson */
- environment.getObjectMapper().setPropertyNamingStrategy(
- PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
- environment.getObjectMapper().enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
- environment.getObjectMapper().disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
- environment.getObjectMapper().disable(DeserializationFeature.WRAP_EXCEPTIONS);
- SimpleModule module = new SimpleModule("SerializationModule");
- module.addSerializer(new SubAlarmExpressionSerializer());
- environment.getObjectMapper().registerModule(module);
-
-
- /** Configure CORS filter */
- Dynamic corsFilter = environment.servlets().addFilter("cors", CrossOriginFilter.class);
- corsFilter.addMappingForUrlPatterns(null, true, "/*");
- corsFilter.setInitParameter("allowedOrigins", "*");
- corsFilter.setInitParameter("allowedHeaders",
- "X-Requested-With,Content-Type,Accept,Origin,X-Auth-Token");
- corsFilter.setInitParameter("allowedMethods", "OPTIONS,GET,HEAD");
-
- if (config.middleware.enabled) {
- ensureHasValue(config.middleware.serverVIP, "serverVIP", "enabled", "true");
- ensureHasValue(config.middleware.serverPort, "serverPort", "enabled", "true");
- ensureHasValue(config.middleware.adminAuthMethod, "adminAuthMethod", "enabled", "true");
- if ("password".equalsIgnoreCase(config.middleware.adminAuthMethod)) {
- ensureHasValue(config.middleware.adminUser, "adminUser", "adminAuthMethod", "password");
- ensureHasValue(config.middleware.adminPassword, "adminPassword", "adminAuthMethod", "password");
- } else if ("token".equalsIgnoreCase(config.middleware.adminAuthMethod)) {
- ensureHasValue(config.middleware.adminToken, "adminToken", "adminAuthMethod", "token");
- } else {
- throw new Exception(String.format(
- "Invalid value '%s' for adminAuthMethod. Must be either password or token",
- config.middleware.adminAuthMethod));
- }
- if (config.middleware.defaultAuthorizedRoles == null || config.middleware.defaultAuthorizedRoles.isEmpty()) {
- ensureHasValue(null, "defaultAuthorizedRoles", "enabled", "true");
- }
- if (config.middleware.connSSLClientAuth) {
- ensureHasValue(config.middleware.keystore, "keystore", "connSSLClientAuth", "true");
- ensureHasValue(config.middleware.keystorePassword, "keystorePassword", "connSSLClientAuth", "true");
- }
- Map authInitParams = new HashMap();
- authInitParams.put("ServerVIP", config.middleware.serverVIP);
- authInitParams.put("ServerPort", config.middleware.serverPort);
- authInitParams.put(AuthConstants.USE_HTTPS, String.valueOf(config.middleware.useHttps));
- authInitParams.put("ConnTimeout", config.middleware.connTimeout);
- authInitParams.put("ConnSSLClientAuth", String.valueOf(config.middleware.connSSLClientAuth));
- authInitParams.put("ConnPoolMaxActive", config.middleware.connPoolMaxActive);
- authInitParams.put("ConnPoolMaxIdle", config.middleware.connPoolMaxActive);
- authInitParams.put("ConnPoolEvictPeriod", config.middleware.connPoolEvictPeriod);
- authInitParams.put("ConnPoolMinIdleTime", config.middleware.connPoolMinIdleTime);
- authInitParams.put("ConnRetryTimes", config.middleware.connRetryTimes);
- authInitParams.put("ConnRetryInterval", config.middleware.connRetryInterval);
- authInitParams.put("AdminToken", config.middleware.adminToken);
- authInitParams.put("TimeToCacheToken", config.middleware.timeToCacheToken);
- authInitParams.put("AdminAuthMethod", config.middleware.adminAuthMethod);
- authInitParams.put("AdminUser", config.middleware.adminUser);
- authInitParams.put("AdminPassword", config.middleware.adminPassword);
- authInitParams.put(AuthConstants.ADMIN_PROJECT_ID, config.middleware.adminProjectId);
- authInitParams.put(AuthConstants.ADMIN_PROJECT_NAME, config.middleware.adminProjectName);
- authInitParams.put(AuthConstants.ADMIN_USER_DOMAIN_ID, config.middleware.adminUserDomainId);
- authInitParams.put(AuthConstants.ADMIN_USER_DOMAIN_NAME, config.middleware.adminUserDomainName);
- authInitParams.put(AuthConstants.ADMIN_PROJECT_DOMAIN_ID, config.middleware.adminProjectDomainId);
- authInitParams.put(AuthConstants.ADMIN_PROJECT_DOMAIN_NAME, config.middleware.adminProjectDomainName);
- authInitParams.put("MaxTokenCacheSize", config.middleware.maxTokenCacheSize);
- setIfNotNull(authInitParams, AuthConstants.TRUSTSTORE, config.middleware.truststore);
- setIfNotNull(authInitParams, AuthConstants.TRUSTSTORE_PASS, config.middleware.truststorePassword);
- setIfNotNull(authInitParams, AuthConstants.KEYSTORE, config.middleware.keystore);
- setIfNotNull(authInitParams, AuthConstants.KEYSTORE_PASS, config.middleware.keystorePassword);
-
- /** Configure auth filters */
- Dynamic preAuthenticationFilter =
- environment.servlets().addFilter("pre-auth", new PreAuthenticationFilter());
- preAuthenticationFilter.addMappingForUrlPatterns(null, true, "/");
- preAuthenticationFilter.addMappingForUrlPatterns(null, true, "/v2.0/*");
-
- Dynamic tokenAuthFilter = environment.servlets().addFilter("token-auth", new TokenAuth());
- tokenAuthFilter.addMappingForUrlPatterns(null, true, "/");
- tokenAuthFilter.addMappingForUrlPatterns(null, true, "/v2.0/*");
- tokenAuthFilter.setInitParameters(authInitParams);
-
- Dynamic postAuthenticationFilter =
- environment.servlets().addFilter(
- "post-auth",
- new PostAuthenticationFilter(config.middleware.defaultAuthorizedRoles,
- config.middleware.agentAuthorizedRoles,
- config.middleware.readOnlyAuthorizedRoles));
- postAuthenticationFilter.addMappingForUrlPatterns(null, true, "/");
- postAuthenticationFilter.addMappingForUrlPatterns(null, true, "/v2.0/*");
-
- environment.jersey().getResourceConfig().getContainerRequestFilters()
- .add(new RoleAuthorizationFilter());
- } else {
- Dynamic mockAuthenticationFilter =
- environment.servlets().addFilter("mock-auth", new MockAuthenticationFilter());
- mockAuthenticationFilter.addMappingForUrlPatterns(null, true, "/");
- mockAuthenticationFilter.addMappingForUrlPatterns(null, true, "/v2.0/*");
- }
- }
-
- private void ensureHasValue(final String value, final String what, final String control,
- final String controlValue) throws Exception {
- if (value == null || value.isEmpty()) {
- final String message =
- String
- .format(
- "Since %s in middleware section of configuration file is set to %s, %s must have a value",
- control, controlValue, what);
- throw new Exception(message);
- }
- }
-
- private void setIfNotNull(Map authInitParams, String name, String value) {
- if (value != null) {
- authInitParams.put(name, value);
- }
- }
-
- private void removeExceptionMappers(Set