Git Product home page Git Product logo

snap-plugin-collector-cinder's Introduction

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

snap-plugin-collector-cinder's People

Contributors

candysmurf avatar geauxvirtual avatar katarzyna-z avatar lmroz avatar marcin-krolik avatar mkleina avatar nanliu avatar nguyenddn avatar patrykmatyjasek avatar rdower avatar taotod avatar zhengqingyuan avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snap-plugin-collector-cinder's Issues

Plugin panics when running a task.

Snap version
master-668a381

What happened:
Plugin panics when running an exemplary task.

Steps to reproduce it (as minimally and precisely as possible):

  1. Run Snap with global config: cfg .txt
  2. Load Cinder plugin and file publisher.
  3. Create task: task.txt

task fails with message:
panic: Expected HTTP response code [200 204] when accessing, but got 300 instead

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.