a0f873f413
Adding capabilities to ceilosca to be able to query metrics that are already being collected by monasca using mappings files there are two types of mappings: 1. Static Mapping: Currently it is used to map any static info about ceilometer meters like the type of meter or unit 2. Extensive monasca mapping: currently it is used to map any monasca metric to a ceilometer meter example: meter_metric_map: - name: "disk.device.write.requests" monasca_metric_name: "vm.io.write_ops" resource_id: $.dimensions.resource_id project_id: $.dimensions.tenant_id user_id: $.dimensions.user_id region: "NA" type: "cumulative" unit: "request" source: "NA" resource_metadata: $.measurement[0][2] As you can see for this mapping fields on left side of ":" are used to map ceilometer fields and fields on right side for referring to monasca fields Both of these mapping files are configurable and can be set in ceilometer configuration file cloud_name, cluster_name, and control plane fields are now added as dimensions by monasca publisher when publishing metrics to monasca api which is necessary in multi-region deployment of notification agent. monasca publisher does not use oslo.service LoopingCall but instead uses futurist periodics library to enable batching. monasca client now pages through monasca api results if enable_api_pagination is enabled in configuration. This flag is disabled by default but should be enabled if monasca api supports paging using "offsets" parameter. Tox testing is now targeting stable/newton branch of ceilometer. DocImpact Change-Id: I83b96325cb79d82858cf529935e5d699a509f6c3 |
||
---|---|---|
ceilosca | ||
devstack | ||
etc/ceilometer | ||
tools | ||
.gitignore | ||
.gitreview | ||
.testr.conf | ||
README.md | ||
mkdocs.yml | ||
monasca_test_setup.py | ||
pep8-test-requirements.txt | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
README.md
monasca-ceilometer
Python plugin and storage driver for Ceilometer to send samples to monasca-api
Installation Instructions for setting up Ceilosca manually
To set up ceilosca automatically, read the instructions in deployer/README.md or use the included Vagrantfile
Assumes that an active monasca-api server is running.
-
Run devstack to get openstack installed.
-
Install python-monascaclient
pip install python-monascaclient
-
Clone monasca-ceilometer from github.com.
Copy the following files from ceilosca/ceilometer to devstack's ceilometer location typically at /opt/stack/ceilometer
monasca_client.py storage/impl_monasca.py tests/api/v2/test_api_with_monasca_driver.py tests/storage/test_impl_monasca.py tests/test_monascaclient.py tests/publisher/test_monasca_publisher.py tests/publisher/test_monasca_data_filter.py publisher/monasca_data_filter.py publisher/monclient.py
-
Edit entry_points.txt
Under [ceilometer.publisher] section add the following line:
monasca = ceilometer.publisher.monclient:MonascaPublisher
Under [ceilometer.metering.storage] section add the following line:
monasca = ceilometer.storage.impl_monasca:Connection
-
Edit setup.cfg (used at the time of installation)
Under 'ceilometer.publisher =' section add the following line:
monasca = ceilometer.publisher.monclient:MonascaPublisher
Under 'ceilometer.metering.storage =' section add the following line
monasca = ceilometer.storage.impl_monasca:Connection
-
Configure /etc/ceilometer/pipeline.yaml to send the metrics to the monasca publisher. Use the included pipeline.yaml file as an example.
-
Configure /etc/ceilometer/ceilometer.conf for setting up storage driver for ceilometer API. Use the included ceilometer.conf file as an example.
-
Copy the included monasca_field_definitions.yml file to /etc/ceilometer.
This file contains configuration how to treat each field in ceilometer sample object on per meter basis. The monasca_data_filter.py uses this file and only stores the fields that are specified in this config file.
-
Make sure the user specified under service_credentials in ceilometer.conf has monasca_user role added.
Other info
Since we don't have full repo of ceilometer, we setup the ceilometer repo in venv and copy monasca integration files in there, and run the unit tests over that code. At present this is tested against ceilometer stable/liberty branch, if you need to test against different branch you can change it in test-requirements.txt
Relevant files are: monasca_test_setup.py - determines the ceilometer venv path and copies the relevant files over tox.ini - calls the commands for setup and runs the tests test-requirements.txt - contains the dependencies required for testing
License
Copyright (c) 2015 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.