-
Notifications
You must be signed in to change notification settings - Fork 9
Collectors
This page contains information about all Collectors included with MOM including the data collected and configuration information. The most up to date information on Collector fields will always be in the source code itself but this page will be kept as up to date as possible.
When writing MOM policies, use the data fields described here to access host and guest statistics. The fields may only be accessed in a policy if the corresponding Collector is loaded. When two Collectors provide the same field, the Collector listed first in the mom configuration file will supersede the others.
Host statistics are accessed using the following syntax:
Host.<field> |
Access the latest value for <field> |
(Host.StatAvg "<field>") |
Access the moving average of <field> |
Guest statistics are accessed in a similar fashion using the iterator given by the with
construct (see Policy for details):
(with Guests guest {
(defvar foo guest.<field>)
(defvar bar (guest.StatAvg "<field>"))
})
This collector gathers general memory statistics about the host.
Setup: To use this Collector, simply enable it in the mom configuration file
For example:
[host]
collectors: HostMemory
Data: This Collector provides the following data
mem_available | The total amount of available memory (kB) |
mem_unused | The amount of memory that is not being used for any purpose (kB) |
mem_free | The amount of free memory including some caches (kB) |
swap_in | The amount of memory swapped in since the last collection (pages) |
swap_out | The amount of memory swapped out since the last collection (pages) |
anon_pages | The amount of memory used for anonymous memory areas (kB) |
This collector exposes host KSM statistics as reported in sysfs.
Setup: Enable in the mom config file. If your host does not support KSM this Collector will raise a Fatal Error.
[host]
collectors: HostMemory, HostKSM
Data: This Collector provides the following data
ksm_run | Status of the KSM daemon: 0 – Stopped, 1 – Running |
ksm_sleep_millisecs | The amount of idle time between scans (ms) |
ksm_pages_shared | The number of pages being shared |
ksm_pages_sharing | The number of sites where a shared page is in use |
ksm_pages_unshared | The number of pages that are scanned but not shared |
ksm_pages_to_scan | The number of pages to scan in each work interval |
ksm_pages_volatile | The number of pages that are changing too fast to be shared |
ksm_full_scans | The number of times all mergeable memory areas have been scanned |
ksm_shareable | Estimated amount of host memory that is eligible for sharing |
A collector that uses libvirt to gather information about running guests.
Setup: Enable in the mom configuration file
[guest]
collectors: GuestLibvirt
Data: This Collector always provides the following data
libvirt_state | The domain state defined by libvirt as: |
VIR_DOMAIN_NOSTATE = 0 : no state |
|
VIR_DOMAIN_RUNNING = 1 : the domain is running |
|
VIR_DOMAIN_BLOCKED = 2 : the domain is blocked on resource |
|
VIR_DOMAIN_PAUSED = 3 : the domain is paused by user |
|
VIR_DOMAIN_SHUTDOWN = 4 : the domain is being shut down |
|
VIR_DOMAIN_SHUTOFF = 5 : the domain is shut off |
|
VIR_DOMAIN_CRASHED = 6 : the domain is crashed |
|
libvirt_maxmem | The maximum amount of memory the guest may use |
libvirt_curmem | The current memory limit (set by ballooning) |
If libvirt memory statistics are enabled on the host and guest then the following statistics are provided:
mem_available | Total amount of memory available (kB) |
mem_unused | Amount of free memory not including caches (kB) |
major_fault | Total number of major page faults |
minor_fault | Total number of minor page faults |
swap_in | Total amount of memory swapped in (kB) |
swap_out | Total amount of memory swapped out (kB) |
This collector provides statistics related to the guest’s host QEMU process.
Setup:
Data: This Collector provides the following data
This collector communicates over the network with a program running on the guest to gather guest memory statistics.
Setup:
Data: This Collector provides the following data