This plugin monitors openstack nova resources such as limits, quotas and hypervisors.
Plugin retrieves statistics using Nova Compute v2 Rest API.
- golang 1.6+ - needed only for building
All OSs currently supported by snap:
- Linux/amd64
You can get the pre-built binaries for your OS and architecture at plugins's GitHub Releases page. Download the plugins package from the latest release, unzip and store in a path you want snaptel
to access.
Fork https://github.com/intelsdi-x/snap-plugin-collector-nova
Clone repo into $GOPATH/src/github.com/intelsdi-x/
:
$ git clone https://github.com/<yourGithubID>/snap-plugin-collector-nova.git
Build the plugin by running make within the cloned repo:
$ make
This builds the plugin in ./build/
- Set up the snap framework.
- Create Global Config, see description in snap's Global Config.
- Load the plugin and create a task, see example in Examples.
Configuration for this plugin is given via global config. Global configuration files are described in snap's documentation. You have to add section "nova-compute" in "collector" section and then specify following options:
"openstack_user"
- user name used to authenticate (ex."admin"
),"openstack_pass"
- password used to authenticate (ex."admin"
),"openstack_tenant"
- tenant name used to authenticate (ex."admin"
),"openstack_auth_url"
- keystone url (ex."http://172.16.0.5:5000/v2.0/"
).
These values should correspond to values given in nova.conf
:
"allocation_ratio_cores"
- oversubscription ratio for vcpus, used to derive some metrics for hypervisors (ex. 1.5),"allocation_ratio_ram"
- oversubscription ratio for memory, used to derive some metrics for hypervisors (ex. 3),"reserved_node_cores"
- reserved virtual cores, used to derive some metrics for hypervisors (ex. 2),"reserved_node_ram_mb"
- reserved virtual memory, used to derive some metrics for hypervisors (ex. 2048).
Example global configuration file for snap-plugin-collector-nova plugin (exemplary file in [examples/cfg/] (examples/cfg/)):
{
"control": {
"plugins": {
"collector": {
"nova-compute": {
"all": {
"openstack_auth_url": "http://localhost:5000/v2.0/",
"openstack_user": "admin",
"openstack_pass": "admin",
"openstack_tenant": "admin",
"allocation_ratio_cores" : 1.5,
"allocation_ratio_ram": 3,
"reserved_node_cores" : 2,
"reserved_node_ram_mb" : 2048
}
}
},
"publisher": {},
"processor": {}
}
}
}
List of collected metrics is described in METRICS.md.
Example running nova collector and writing data to a file.
Create or download example global config on snapteld's node:
mkdir -p /etc/snap/
curl -sfLO https://github.com/intelsdi-x/snap-plugin-collector-nova/blob/master/examples/cfg/cfg.json -o /etc/snap/snapteld.conf
Ensure snap daemon is running:
- initd:
sudo service snap-telemetry start
- systemd:
sudo systemctl start snap-telemetry
- command line:
sudo snapteld -l 1 -t 0 &
Download and load snap plugins:
$ wget http://snap.ci.snap-telemetry.io/plugins/snap-plugin-collector-nova/latest/linux/x86_64/snap-plugin-collector-nova
$ 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-nova
$ snaptel plugin load snap-plugin-publisher-file
See available metrics for your system
$ snaptel metric list
Download an example task file and load it:
$ curl -sfLO https://github.com/intelsdi-x/snap-plugin-collector-nova/blob/master/examples/tasks/task.json
$ snaptel task create -t task.json
Using task manifest to create task
Task created
ID: 02dd7ff4-8106-47e9-8b86-70067cd0a850
Name: Task-02dd7ff4-8106-47e9-8b86-70067cd0a850
State: Running
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. If you have a feature request, please add it as an issue and/or submit a pull request.
This repository is one of many plugins in snap, a powerful telemetry framework. See the full project at http://github.com/intelsdi-x/snap To reach out to other users, head to the main framework
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: Lukasz Mroz