iPlantCollaborativeOpenSource/hyper-stats

Name: hyper-stats

Owner: iPlant Collaborative Open Source

Description: A service to collect VM stats from libvirt.

Created: 2015-05-22 21:31:08.0

Updated: 2018-05-10 14:59:03.0

Pushed: 2015-12-02 19:35:44.0

Homepage: null

Size: 117

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

 __    __  __    ______   ______    ______
_\ \  /\ \_\ \  /\  __ \ /\  ___\  /\  __ \    ____
 __ \ \ \____ \ \ \  __/ \ \  __\  \ \  __<   /  __\
_\ \_\ \/\_____\ \ \_\    \ \_____\ \ \_\ \_\  /__ /
_/\/_/  \/_____/  \/_/     \/_____/  \/_/\/_/
 ______    ______   ______    ______   ______
/\  ___\  /\__  _\ /\  __ \  /\__  _\ /\  ___\
\ \___  \ \/_/\ \/ \ \  __ \ \/_/\ \/ \ \___  \
 \/\_____\   \ \_\  \ \_\ \_\   \ \_\  \/\_____\
  \/_____/    \/_/   \/_/\/_/    \/_/   \/_____/

rvice to collect VM stats from libvirt.
Overview

hyper-stats is built on several services.

er:               Central server:      Compute node:
_____________       ______________       _________________ 
  _________  |     |  __________  |     |  _____________  |
 | browser | |     | | Graphite | |     | | nrpe_server | |
  ---------  | <=> |  ----------  | <=> |  -------------  |
  ____^____  |     |  _____^____  |     |  ______^______  |
 | d3.js   | |     | | Graphios | |     | | nrpe plugin | |
  ---------  |     |  ----------  |     |  -------------  |
-------------      |  _____^____  |     |  ______^______  |
                   | | Nagios   | |     | | libvirt     | |
                   |  ----------  |     |  -------------  |
                   |  _____^____  |     |  __^__   __^__  |
                   | | nrpe     | |     | | vm1 | | ... | |
                   |  ----------  |     |  -----   -----  |
                    --------------       -----------------
Install

Throughout this document “compute node” will refer to the physical machine running a hypervisor. The other system mentioned is the “monitoring server”, a single machine which collects all the stats from the compute nodes.

Libvirt

Nagios uses the check_nrpe command to execute the nagios plugin libvirt/virt-stats.py on the compute nodes in your cloud. In turn the plugin depends on the version of libvirt and its python bindings.

Here is a commmand to check which version of libvirt is installed. The current plugin supports python bindings from version 0.9.8 and up.

> /usr/sbin/libvirtd --version

Fetch the libvirt python bindings.

t-get python-libvirt

Test the plugin.

> libvirt/virt-stats.py

If issues persist with libvirt, see these ubuntu packages:

irt-bin:    programs for the libvirt library
irt-dev:    development files for the libvirt library
irt0:       library for interfacing with different virtualization systems

For issues with the plugin, see the python libvirt bindings and the nagios plugin spec.

patches/PR's welcome :)

Nagios

nrpe diagram

The nagios install consists of installing nagios3 and the check_nrpe plugin on the monitoring server. check_nrpe is responsible for running programs on external servers and returning the output. The external servers must also run an nrpe daemon to handle those incoming connections.

The nagios install is involved see nagios/README.md

Graphios
Graphite
d3
License

See LICENSE.txt.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.