Collect real-time kvm vm performance graphics using collectD and visage

Source: Internet
Author: User
Tags rrd

Software features:

The collectD software is used to monitor and collect performance data of KVM virtual machines, including CPU, memory, disk Io, and network traffic.

Use the visage software to plot the collected data.


Installation:

System Environment: ubuntu12.04

CollectD

First, download the collectD package collectd-5.4.0 on the collectD Official Website

Install the collectD dependency package

apt-get install bison flex autoconf pkg-config libtool libgcrypt11-dev librrd-dev
After the installation is complete, go to the collectd-5.4.0 directory to compile the source code and install

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

Modify configurations

mkdir /etc/collectmv /etc/collectd.conf /etc/collectvi /etc/collect/collectd.conf
Modify the content in the collectD. conf file

Loadplugin logging logfile <plugin logfile> loglevel info file stdout timestamp true printseverity false </plugin> <plugin syslog> loglevel info </plugin> loadplugin logging into diskloadplugin logging into loadloadplugin in logging networkloadplugin Logging rrdcachedloadplugin rrdtoolloadplugin users <plugin network> # Client Setup: server "192.168.0.12" 25826 "// the IP address of the server that the client configures to collect data + port server" 192.168.0.16 "" 25826 "# <server" 239.192.74.66 "" 25826 "> # securitylevel encrypt # Username "user" # password "secret" # interface "eth0" #</Server> # timetolive "128" ### server setup: listen "192.168.0.16" 25826 "// as the collection server, you need to open the listen IP address + port # <listen" 239.192.74.66 "" 25826 "> </plugin> <plugin libvirt> connection" qemu: /// System "refreshinterval 60 # domain" name "blockdevice"/: HDC/"# interfacedevice" Name: Device "ignoreselected true hostnameformat UUID interfaceformat" Address "</plugin>

Copy the collectD execution file to the/ECT/init. d/directory under the installation directory and start collectD.

service collectd start


Visage

Install the visage dependency package

apt-get install -y build-essential librrd-ruby ruby ruby-dev rubygems
Install visage Software

apt-get install gemgem install visage-app
Start visage

visage-app start
Access the web interface of visage-app after startup

http://visage-app-server:9292

Answer:


When visage-app is started, the following error occurs:

[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/visage-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/visage-app-2.1.0/bin/visage-app:17    from /usr/local/bin/visage-app:19:in `load‘    from /usr/local/bin/visage-app:19
Compile ollectd to install types. RB is in the/share/collectD/directory by default. copy the RB file to the/usr/share/collectD directory and set collectD. set parameters in the conf configuration file:
Typesdb "/usr/share/collectD/types. DB"
Then start collectD and visage-app


Visage-the app cannot collect data

Why can't I find the server on the visage-app interface? By default, the visage-app starts to collect servers in the/var/lib/collectD/RRD directory, but the collectD compilation and installation data is in the/var/lib/collectD/directory by default. In the collectD. conf configuration file, set the parameter basedir "/var/lib/collectD/RRD"

Collect real-time kvm vm performance 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.