Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

intelsdi-x/snap-plugin-collector-neutron

Repository files navigation

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 plugin collector - neutron

Snap plugin for collecting metrics from OpenStack Neutron.

  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 using Networking API v2.0. It can be used locally on the OpenStack host or remotely communicating with the OpenStack host via HTTP(S).

System Requirements

  • OpenStack deployment available

Operating systems

All OSs currently supported by snap:

  • Linux/amd64

Installation

Download neutron plugin binary:

You can get the pre-built binaries for your OS and architecture from plugin's Github Releases page.

To build the plugin binary:

Fork https://github.com/intelsdi-x/snap-plugin-collector-neutron

Clone repo into $GOPATH/src/github/intelsdi-x/:

$ git clone https://github.com/<yourGithubID>/snap-plugin-collector-neutron

Build the plugin by running make in repo:

$ make

This builds the plugin in ./build

Configuration and Usage

Suggestions

  • It is not recommended to set interval for task less than 20 seconds. This may lead to overloading Neutron API with requests.

Documentation

Collected Metrics

List of collected metrics is described in METRICS.md.

snap's Global Config

Global configuration files are described in Snap's documentation. You have to add section "neutron" in "collector" section and then specify following options:

  • "openstack_auth_url" - URL for OpenStack Identity endpoint (ex. "http://127.0.0.1:5000/v2.0/")
  • "openstack_user" - user name used to authenticate (ex. "admin")
  • "openstack_password"- password used to authenticate (ex. "admin")
  • "openstack_tenant" - tenant name used to authenticate (ex. "admin") 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

Example global configuration file for snap-plugin-collector-neutron plugin (exemplary file in [examples/cfg/] (https://github.com/intelsdi-x/snap-plugin-collector-neutron/blob/master/examples/cfg/):

{
  "control": {
    "plugins": {
    "collector": {
      "neutron": {
        "all": {
          "openstack_auth_url": "http://localhost:5000/v2.0/",
          "openstack_user": "admin",
          "openstack_password": "admin",
          "openstack_tenant": "admin"
        }
      }
    },
    "publisher": {},
    "processor": {}
  }
  }
}

Examples

Example running snap-plugin-collector-neutron plugin and writing data to a file using snap-plugin-publisher-file.

Create Global Config, see example in [examples/cfg/] (https://github.com/intelsdi-x/snap-plugin-collector-neutron/blob/master/examples/cfg/).

Set up the Snap framework, in one terminal window, run snapteld (in this case with logging set to 1, trust disabled and global configuration saved in cfg.json):

$ $SNAP_PATH/bin/snapteld -l 1 -t 0 --config cfg.json

In another terminal window:

Download and load Snap plugins:

$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-collector-neutron/latest/linux/x86_64/snap-plugin-collector-neutron
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-publisher-file/latest/linux/x86_64/snap-plugin-publisher-file
$ snaptel plugin load snap-plugin-collector-neutron
$ 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-neutron plugin (exemplary file in [examples/tasks/] (https://github.com/intelsdi-x/snap-plugin-collector-neutron/blob/master/examples/tasks/)):

{
  "version": 1,
  "schedule": {
    "type": "simple",
    "interval": "60s"
  },
  "workflow": {
    "collect": {
      "metrics": {
        "/intel/openstack/neutron/admin/networks_count": {},
        "/intel/openstack/neutron/admin/subnets_count": {},
        "/intel/openstack/neutron/admin/routers_count": {},
        "/intel/openstack/neutron/admin/ports_count": {},
        "/intel/openstack/neutron/admin/floatingips_count": {},
        "/intel/openstack/neutron/admin/quotas_subnet": {},
        "/intel/openstack/neutron/admin/quotas_network": {},
        "/intel/openstack/neutron/admin/quotas_floatingip": {},
        "/intel/openstack/neutron/admin/quotas_security_group_rule": {},
        "/intel/openstack/neutron/admin/quotas_security_group": {},
        "/intel/openstack/neutron/admin/quotas_router": {},
        "/intel/openstack/neutron/admin/quotas_port": {}
      },
      "publish": [
        {
          "plugin_name": "file",
          "config": {
            "file": "/tmp/published_neutron"
          }
        }
      ]
    }
  }
}

Create a task:

$ snaptel task create -t examples/tasks/task.json

And watch the metrics populate:

$ snaptel task watch <task_id>

Stop previously created task:

$ snaptel task stop <task_id>

Roadmap

There isn't a current roadmap for this plugin, but it is in active development. As we launch this plugin, we do not have any outstanding requirements for the next release.

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. To reach out to other users, head to the main framework.

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