snap-plugin-collector-cinder

command module
v0.0.0-...-eebe1bb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

README

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.

DISCONTINUATION OF 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 collector plugin - cinder

Snap plugin for collecting metrics from OpenStack Cinder module.

  1. Getting Started
  1. Documentation
  1. Community Support
  2. Contributing
  3. License
  4. Acknowledgements

Getting Started

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)).

System Requirements
  • OpenStack deployment available
  • Cinder V2 API
Operating systems

All OSs currently supported by Snap:

  • Linux/amd64
Installation
Download cinder plugin binary:

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.

To build the plugin binary:

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}

Configuration and Usage
Suggestions
  • It is not recommended to set interval for task less than 20 seconds. This may lead to overloading Cinder API with requests.

Documentation

Collected Metrics

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
Snap's Global Config

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/).

Examples

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
Roadmap

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

Community Support

This repository is one of many plugins in Snap, a powerful telemetry framework. The full project is at http://github.com/intelsdi-x/snap.

Contributing

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.

License

Snap, along with this plugin, is an Open Source software released under the Apache 2.0 License.

Acknowledgements

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
v1/cinder
Cinder package contains wrapper functions designed to collect required metrics All functions are dependant on OpenStack BlockStorage API Version 1
Cinder package contains wrapper functions designed to collect required metrics All functions are dependant on OpenStack BlockStorage API Version 1
v2
v2/snapshots
Package contains code from Rackspace Gophercloud (https://github.com/rackspace/gophercloud) with following changes: - structure ListOpts:
Package contains code from Rackspace Gophercloud (https://github.com/rackspace/gophercloud) with following changes: - structure ListOpts:
v2/volumes
Package contains code from Rackspace Gophercloud (https://github.com/rackspace/gophercloud)
Package contains code from Rackspace Gophercloud (https://github.com/rackspace/gophercloud)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL