Centos7/Rhel7 – Collectd Config for Libvirt, Carbon-Cache

collectd-logo

The following is the collectd config that I am running on my RHEL 7 kvm hypervisor. This is not meant to be an all inclusive config for collectd, rather I am looking to gather basic performance metrics on my hypervisors and VMs.

Note that I have disabled selinux, as I am running these hypervisors in my lab. Do not do the same in your production environments.


1
#setenforce 0

I also edited /etc/selinux/config as shown below. Again, this is for non-prod/test envs. Do not disable in production


1
2
3
4
5
6
7
8
9
10
11
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Also note that I have already configured the EPEL repo.. again, not production.

EPEL repo installed via the command below


1
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

First a couple of steps to get us up and running. We need to install packages


1
# yum -y install collectd collectd-virt.x86_64 collectd-rrdtool.x86_64 collectd-sensors.x86_64 collectd-smart.x86_64 collectd-netlink.x86_64 collectd-ipmi.x86_64

We also need to write our config.

You can pull my config using the gist below

We now need to enable and start collectd


1
2
#systemctl enable collect
#systemctl start collectd 

 

Advertisements