Information Driver Configuration Guide for ONE 1.0

The IM (Information Driver) is in charge of monitoring the physical hosts. It comes with various sensors, each one responsible of a different aspects of the computer to be monitored (CPU, memory, hostname…). Also, there are sensors prepared to gather information from different hypervisors (currently KVM and XEN).

Requirements

Depending on the sensors that are going to conform the IM there are different requirements, mainly the availability of the hypervisor corresponding to the sensor if one of the KVM sensor or XEN sensor are used at all.

Also, as for all the ONE configuration, ssh access to the hosts without password has to be possible.

Driver Files

Common files

These files are used by the IM regardless of the hypervisor present on the machine to be monitored:

  • bin/one_im_ssh : shell script wrapper to the driver itself. Sets the environment and other bootstrap tasks.
  • bin/one_im_ssh.rb : The actual Information driver.
  • lib/im_probes/* : sensors home. Little scripts or binaries that extract information from the remote hosts. Let's see a simple one to understand how they work:
$> cat $ONE_LOCATION/lib/im_probes/name.sh
#!/bin/sh

echo NAME=`uname -n`

This uses the uname command to get the hostname of the remote cluster host, and then outputs the information as

NAME=host1.mydomain.org

Hypervisor specific

The following files contain premade configuration files to get the IM working with different hypervisors. These files are not fixed, they can be modified, and even the IM can be set to work with different files (this is set in ONE configuration file, more details in next section).

XEN Hypervisor

  • etc/im_xen/im_xenrc : environment setup and bootstrap instructions
  • etc/im_xen/im_xen.conf : This file defines the REMOTE_DIR, the path where the sensors will be uploaded in the remote physical to perform the monitoring. It also defines which sensors will be used (you can add and remove probes as you wish), for XEN the defaults are:
cpuarchitecture=lib/im_probes/architecture.sh
nodename=lib/im_probes/name.sh
cpu=lib/im_probes/cpu.sh
xen=lib/im_probes/xen.rb

KVM Hypervisor

  • etc/im_kvm/im_kvmrc : environment setup and bootstrap instructions
  • etc/im_kvm/im_kvm.conf : This file defines the REMOTE_DIR, the path where the sensors will be uploaded in the remote physical to perform the monitoring. It also defines which sensors will be used (you can add and remove probes as you wish), for KVM the defaults are:
cpuarchitecture=lib/im_probes/architecture.sh
nodename=lib/im_probes/name.sh
cpu=lib/im_probes/cpu.sh
kvm=lib/im_probes/kvm.rb
  • lib/im_probes/kvm.rb : kvm specific sensor.

ONE Configuration

The ONE daemon loads its drivers whenever it starts. Inside etc/oned.conf there are definitions of the drivers. In the IM case (and for the XEN hypervisor), it is something like the following:

IM_MAD = [
    name       = "im_xen",
    executable = "bin/one_im_ssh",
    arguments  = "etc/im_xen/im_xen.conf",
    default    = "etc/im_xen/im_xen.conf" ]
  • The name of the driver needs to be provided at the time of adding a new host to ONE, so that hosts will be monitored with this IM.
  • executable point to the path of the driver executable file.
  • The arguments points to the configuration file for the driver (see previous section).
  • default set the default configuration file, in case arguments one is not found.

Testing

In order to test the driver, add a host to ONE using onehost, specifying the defined IM driver:

# onehost add ursa06 im_xen vmm_xen

Now give it time to monitor the host (this time is determined by the value of HOST_MONITORING_INTERVAL in etc/oned.conf). After one interval, check the output of onehost list, it should look like the following:

 HID NAME                      RVM   TCPU   FCPU   ACPU    TMEM    FMEM STAT
   0 ursa06                      1    800    797    700 8387584 4584448   on