Collect KVM Virtual machine performance Real-time graphics using COLLECTD and Visage

Source: Internet
Author: User

Software Features:

Monitor the performance data collected from KVM VMS with COLLECTD software, including cpu,memory, disk IO, network traffic, etc.

Draw graphics from the collected data by Visage software.


Installation:

System Environment: ubuntu12.04

Collectd

First, download the COLLECTD package at COLLECTD official website collectd-5.4.0

Installing COLLECTD Dependency Packages

Apt-get Install Bison flex autoconf pkg-config libtool Libgcrypt11-dev Librrd-dev
After installation, compile the source code into the collectd-5.4.0 folder and install

./configure--prefix=/--exec-prefix=/usr  --enable-cpu--enable-network--enable-libvirt--enable-logfile-- Enable-rrdtool  --enable-rrdcachedmake&&make Install

Change Configuration

Mkdir/etc/collectmv/etc/collectd.conf/etc/collectvi/etc/collect/collectd.conf
Change content in collectd.conf file

Loadplugin syslogloadplugin logfile<plugin logfile> LogLevel info File STDOUT Timestamp True Printseverity false</plugin><plugin syslog> LogLevel info</plugin>loadplugin cpuLoadPlugin D Floadplugin diskloadplugin interfaceloadplugin irqloadplugin libvirtloadplugin loadloadplugin memoryLoadPlugin Networkloadplugin processesloadplugin rrdcachedloadplugin rrdtoolloadplugin users<plugin network># # client SE Tup:server "192.168.0.12" "25826"//Client configuration collects data for server-side IP +port Servers "192.168.0.16" "25826" # & Lt Server "239.192.74.66" "25826" ># securitylevel encrypt# Username "User" # Pas        Sword "Secret" # Interface "eth0" # </server># TimeToLive "$" # # # # Server Setup: Listen "192.168.0.16" "25826"//COLLECTD as a collection server need to open Listen IP + port# <listen "239.192.74.66" "25 826 "></plugin><plugin libvirt> Connection "Qemu:///system" RefreshInterval 60# Domain "name" Blockdevice "/:hd c/"# interfacedevice" Name:device "ignoreselected true Hostnameformat uuid Interfaceformat" a Ddress "</Plugin>

Under the installation folder, copy the COLLECTD run file to the/ect/init.d/folder and start the COLLECTD

Service COLLECTD Start


Visage

Installing Visage dependency Packages

Apt-get install-y build-essential librrd-ruby Ruby Ruby-dev RubyGems
Installing Visage software

Apt-get Install Gemgem Install Visage-app
Start Visage

Visage-app start
Access to Visage-app Web interface after launch

http://visage-app-server:9292

Error Answer:


Start Visage-app Error:

[email protected]:/# Visage-app start/var/lib/gems/1.8/gems/visage-app-2.1.0/lib/visage-app/types.rb:19:in ' Initialize ': No such file or directory-/usr/share/collectd/types.db (errno::enoent) From/var/lib/gems/1.8/gems/visag E-app-2.1.0/lib/visage-app/types.rb:19:in ' new ' from/var/lib/gems/1.8/gems/visage-app-2.1.0/lib/visage-app/  Types.rb:19:in ' Build ' from/var/lib/gems/1.8/gems/visage-app-2.1.0/lib/visage-app/types.rb:10:in ' Initialize ' from /var/lib/gems/1.8/gems/visage-app-2.1.0/lib/visage-app.rb:34:in ' new ' from/var/lib/gems/1.8/gems/ Visage-app-2.1.0/lib/visage-app.rb:34 From/var/lib/gems/1.8/gems/visage-app-2.1.0/lib/visage-app/config.rb:6:in ' Use ' from/var/lib/gems/1.8/gems/visage-app-2.1.0/lib/visage-app.rb:31 from/var/lib/gems/1.8/gems/sinatra-1.3.2/ Lib/sinatra/base.rb:1273:in ' Configure ' from/var/lib/gems/1.8/gems/visage-app-2.1.0/lib/visage-app.rb:30 from/usr /lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in ' Gem_original_rEquire ' from/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in ' require ' from/var/lib/gems/1.8/gems/v Isage-app-2.1.0/bin/visage-app:17 from/usr/local/bin/visage-app:19:in ' Load ' from/usr/local/bin/visage-app:19
ollectd compile types.rb by default in the folder/share/collectd/folder, copy the Types.rb file to the/usr/share/collectd folder, and set the number of parameters in the collectd.conf configuration file:
typesdb "/usr/share/collectd/types.db"
And then start COLLECTD and Visage-app .


Visage-app data is not collected

Can't see the server on the Visage-app interface? Visage-app boot default is to collect server in folder/var/lib/collectd/rrd folder, but collectd compile installation data by default under/var/lib/collectd/folder. Set the number of references in the collectd.conf configuration file: BaseDir     

Collect KVM Virtual machine performance Real-time graphics using COLLECTD and Visage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.