Monitoring VMs on OpenStack (or KVM) using Graphite + Collectd

Dashboard

Collect metric of instances via Libvirt on all Compute node
Last updated: a year ago

Start with Grafana Cloud and the new FREE tier. Includes 10K series Prometheus or Graphite Metrics and 50gb Loki Logs

Downloads: 163

Reviews: 0

  • Screenshot_3.png
    Screenshot_3.png

Install Collectd on all Compute node (or KVM node) or any node that installed Libvirt to collect the metrics (ram, cpu, iops,..) of VMs, then push to a Graphite server.

Workflow: Collectd -> Graphite -> Grafana

Collector Configuration Details

Install on CentOS 7

yum install epel-release -y 
yum install collectd -y 
yum install collectd-virt.x86_64 -y

Example /etc/collectd.conf file

Hostname    "compute01"
FQDNLookup   false

LoadPlugin write_graphite
LoadPlugin unixsock
LoadPlugin virt
Interval 120

<Plugin unixsock>
    SocketFile "/var/run/collectd-unixsock"
    SocketGroup "collectd"
    SocketPerms "0770"
    DeleteSocket false
</Plugin>

<Plugin "virt">
   RefreshInterval 120
   Connection "qemu:///system"
   BlockDeviceFormat "target"
   HostnameFormat "uuid"
   InterfaceFormat "address"
   PluginInstanceFormat name
   ExtraStats "cpu_util disk_err domain_state job_stats_background perf vcpupin"
</Plugin>

<Plugin write_graphite>
  <Node "graphite">
    Host "<ip_graphite>"
    Port "2003"
    Protocol "tcp"
    LogSendErrors true
    Prefix "collectd.compute01."
    #Postfix "collectd"
    StoreRates true
    AlwaysAppendDS false
    EscapeCharacter "_"
  </Node>
</Plugin>

Start service

systemctl restart collectd