Categorygithub.com/intelsdi-x/snap-plugin-collector-libvirt
repositorypackage
0.0.0-20221107230844-0f6812c1d5d4
Repository: https://github.com/intelsdi-x/snap-plugin-collector-libvirt.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

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

Build Status Go Report Card

Snap collector plugin - libvirt

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

Getting Started

System Requirements

Linux/*BSD system with libvirt installed

Installation

Install libvirt and libvirt-dev package

For MacOS

brew install libvirt

For Ubuntu > 14.04

apt-get install libvirt-bin libvirt-dev

For Fedora >= 21 / CentOS >= 7 / RedHat >= 7

yum install libvirt libvirt-devel

Download the plugin binary:

You can get the pre-built binaries for your OS and architecture from the plugin's GitHub Releases page. Download the plugin from the latest release and load it into snapteld (/opt/snap/plugins is the default location for Snap packages).

To build the plugin binary:

Fork https://github.com/intelsdi-x/snap-plugin-collector-libvirt Clone repo into $GOPATH/src/github.com/intelsdi-x/:

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

Build the Snap libvirt plugin by running make within the cloned repo:

$ make

This builds the plugin in ./build/

Documentation

Examples

For quick plugin test using simple VM, you can go through steps below:

  1. Install QEMU and libvirt:
sudo apt install qemu-kvm libvirt-bin virtinst qemu-system
  1. Download Ubuntu cloud image:
wget https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
  1. Create VM:
virt-install --name=test_vm --arch=x86_64 --vcpus=1 --ram=512 --os-type=linux --hvm --connect=qemu:///system --network bridge:br0 --disk path=xenial-server-cloudimg-amd64-disk1.img,size=20 --boot hd --accelerate --vnc --noautoconsole --keymap=es
  1. Load Snap libvirt collector plugin and create task:
wget https://raw.githubusercontent.com/intelsdi-x/snap-plugin-collector-libvirt/master/example/tasks/task-example.yaml
snaptel plugin load snap-plugin-collector-libvirt
snaptel task create -t task-example.yaml
  1. Check task output:
snaptel task list
snaptel task watch <Task ID>
  1. Remove test VM:
virsh destroy test_vm
virsh undefine test_vm

By default the plugin is using qemu:///system uri. To monitor external systems, you can pass the uri parameter to the snapteld deamon configuration. An example configuration file can be found in example directory.

Collected Metrics

This plugin has the ability to gather the following metrics:

NamespaceData TypeDescription
/intel/libvirt/{domain_name}/disk/{device_name}/wrreqint64Write Requests
/intel/libvirt/{domain_name}/disk/{device_name}/rdreqint64Read Requests
/intel/libvirt/{domain_name}/disk/{device_name}/wrbytesint64Write Bytes
/intel/libvirt/{domain_name}/disk/{device_name}/rdbytesint64Read Bytes
/intel/libvirt/{domain_name}/memory/memint64Amount of memory specified on domain creation
/intel/libvirt/{domain_name}/memory/swap_inint64Amount of memory swapped in
/intel/libvirt/{domain_name}/memory/swap_outint64Amount of memory swapped out
/intel/libvirt/{domain_name}/memory/major_faultint64Number of major faults
/intel/libvirt/{domain_name}/memory/min_faultint64Number of minor faults
/intel/libvirt/{domain_name}/memory/maxint64Total amount of memory
/intel/libvirt/{domain_name}/memory/unusedint64Amount of memory left unused by the system
/intel/libvirt/{domain_name}/memory/availableint64Amount of usable memory
/intel/libvirt/{domain_name}/memory/actual_balloonint64Current balloon value
/intel/libvirt/{domain_name}/memory/rssint64Resident Set Size of the process running the domain
/intel/libvirt/{domain_name}/memory/nrint64Number of statistics supported by the interface
/intel/libvirt/{domain_name}/cpu/cputimeint64Cputime ( all vcpus )
/intel/libvirt/{domain_name}/cpu/cputime/{vcpu_nr}int64Cputime for one vcpu (not supported on qemu without kvm)
/intel/libvirt/{domain_name}/network/{interface_name}/rxbytesint64Bytes received
/intel/libvirt/{domain_name}/network/{interface_name}/rxpacketsint64Packets received
/intel/libvirt/{domain_name}/network/{interface_name}/rxerrsint64Errors on receive
/intel/libvirt/{domain_name}/network/{interface_name}/rxdropint64Drops on receive
/intel/libvirt/{domain_name}/network/{interface_name}/txbytesint64Bytes transmitted
/intel/libvirt/{domain_name}/network/{interface_name}/txpacketsint64Packets transmitted
/intel/libvirt/{domain_name}/network/{interface_name}/txerrsint64Errors on transmit
/intel/libvirt/{domain_name}/network/{interface_name}/txdropint64Drops on transmit

IMPORTANT: not all hypervisors expose all these metrics. Please check your hypervisor or libvirt documentation.

Roadmap

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.

If you have a feature request, please add it as an issue and/or submit a pull request.

Community Support

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.

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.

License

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

Acknowledgements

This is Open Source software released under the Apache 2.0 License. Please see the LICENSE file for full license details.

This software has been contributed by MIKELANGELO, a Horizon 2020 project co-funded by the European Union. https://www.mikelangelo-project.eu/

Thank You

And thank you! Your contribution, through code and participation, is incredibly important to us.