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).
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.
These files are used by the IM regardless of the hypervisor present on the machine to be monitored:
$> 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
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
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
cpuarchitecture=lib/im_probes/architecture.sh nodename=lib/im_probes/name.sh cpu=lib/im_probes/cpu.sh kvm=lib/im_probes/kvm.rb
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" ]
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