DISCONTINUATION OF PROJECT.
This project will no longer be maintained by Intel.
This project has been identified as having known security escapes.
Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.
Intel no longer accepts patches to this project.
This project will no longer be maintained by Intel. Intel will not provide or guarantee development of or support for this project, including but not limited to, maintenance, bug fixes, new releases or updates. Patches to this project are no longer accepted by Intel. If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the community, please create your own fork of the project.
Snap plugin for collecting metrics from OpenStack Cinder module.
Plugin collects metrics by communicating with OpenStack by REST API. It can run locally on the host, or in proxy mode (communicating with the host via HTTP(S)).
- OpenStack deployment available
- Cinder V2 API
All OSs currently supported by Snap:
- Linux/amd64
You can get the pre-built binaries for your OS and architecture at Snap's GitHub Releases page. Download the plugins package from the latest release, unzip and store in a path you want snapteld
to access.
Fork https://github.com/intelsdi-x/snap-plugin-collector-cinder
Clone repo into $GOPATH/src/github/intelsdi-x/
:
$ git clone https://github.com/<yourGithubID>/snap-plugin-collector-cinder
Build the plugin by running make in repo:
$ make
This builds the plugin in /build/${GOOS}/${GOARCH}
- Set up the Snap framework.
- Create Global Config, see description in [Snap's Global Config] (https://github.com/intelsdi-x/snap-plugin-collector-cinder/blob/master/README.md#snaps-global-config).
- Load the plugin and create a task, see example in Examples.
- It is not recommended to set interval for task less than 20 seconds. This may lead to overloading Cinder API with requests.
This plugin has the ability to gather the following metrics:
Namespace | Data Type | Description |
---|---|---|
intel/openstack/cinder/<tenant_name>/volumes/count | int | Total number of OpenStack volumes for given tenant |
intel/openstack/cinder/<tenant_name>/volumes/bytes | int | Total number of bytes used by OpenStack volumes for given tenant |
intel/openstack/cinder/<tenant_name>/snapshots/count | int | Total number of OpenStack volumes snapshots for given tenant |
intel/openstack/cinder/<tenant_name>/snapshots/bytes | int | Total number of bytes used by OpenStack volumes snapshots for given tenant |
intel/openstack/cinder/<tenant_name>/limits/MaxTotalVolumeGigabytes | int64 | Tenant quota for volume size |
intel/openstack/cinder/<tenant_name>/limits/MaxTotalVolumes | int64 | Tenant quota for number of volumes |
Global configuration files are described in Snap's documentation. You have to add section "cinder" in "collector" section and then specify following options:
"endpoint"
- URL for OpenStack Identity endpoint aka Keystone (ex."http://keystone.public.org:5000"
)"user"
- user name which has access to OpenStack. It is highly prefer to provide user with administrative privileges. Otherwise returned metrics may not be complete."password"
- user password"tenant"
- name of project admin project. This parameter is optional for global config. It can be provided at later stage, in task manifest configuration section for metrics. If you're using authentication API in v3 you need to set one of those two configuration options:"domain_name"
- domain name"domain_id"
- domain name
See example Global Config in [examples/cfg/] (https://github.com/intelsdi-x/snap-plugin-collector-cinder/blob/master/examples/cfg/).
Example running snap-plugin-collector-cinder plugin and writing data to a file.
Create Global Config, see example in [examples/cfg/] (https://github.com/intelsdi-x/snap-plugin-collector-cinder/blob/master/examples/cfg/).
In one terminal window, open the Snap daemon (in this case with logging set to 1, trust disabled and global configuration saved in cfg.yaml):
$ snapteld -l 1 -t 0 --config examples/cfg/cfg.yaml
In another terminal window:
Load snap-plugin-collector-cinder plugin:
$ snaptel plugin load build/linux/x86_64/snap-plugin-collector-cinder
Download desired publisher plugin eg.
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-file/latest/linux/x86_64/snap-plugin-publisher-file
Load file plugin for publishing:
$ snaptel plugin load snap-plugin-publisher-file
See available metrics for your system:
$ snaptel metric list
Create a task manifest file to use snap-plugin-collector-cinder plugin (exemplary file in [examples/tasks/] (https://github.com/intelsdi-x/snap-plugin-collector-cinder/blob/master/examples/tasks/)):
---
version: 1
schedule:
type: simple
interval: 60s
workflow:
collect:
metrics:
"/intel/openstack/cinder/admin/limits/MaxTotalVolumeGigabytes": {}
"/intel/openstack/cinder/admin/volumes/count": {}
"/intel/openstack/cinder/admin/volumes/bytes": {}
"/intel/openstack/cinder/admin/snapshots/count": {}
"/intel/openstack/cinder/admin/snapshots/bytes": {}
config:
"/intel/openstack/cinder":
tenant: admin
publish:
- plugin_name: file
config:
file: "/tmp/snap-cinder-file.log"
Create a task:
$ snaptel task create -t examples/tasks/task.yaml
There are few items on current roadmap for this plugin:
- quotable Cinder resources like backups and consistency groups
- number of volumes per volume type
- handling wildcard for tenant
- support for Cinder V1 API
This repository is one of many plugins in Snap, a powerful telemetry framework. The full project is at http://github.com/intelsdi-x/snap.
We love contributions!
There's more than one way to give back, from examples to blogs to code updates. See our recommended process in CONTRIBUTING.md.
And thank you! Your contribution, through code and participation, is incredibly important to us.
Snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.
- Author: Marcin Krolik