vhostmd/vhostmd.conf
Richard W.M. Jones e2f04176bd Initial import.
2009-10-13 17:57:10 +00:00

94 lines
3.1 KiB
XML

<?xml version="1.0" ?>
<!DOCTYPE vhostmd SYSTEM "vhostmd.dtd">
<!--
Configuration file for virtual host metrics daemon (vhostmd).
A better, less noisy, more minimal configuration file
which doesn't depend on Xen.
Supported metric types are: int32, uint32, int64, uint64, real32,
real64, and string.
A metric's value is set to the output produced by executing its action.
'action' can include the special token NAME, in which case the name of
the vm currently under inspection is substituted for NAME. Only useful
within the vm element.
-->
<vhostmd>
<globals>
<disk>
<name>host-metrics-disk</name>
<path>/dev/shm/vhostmd0</path>
<!-- must be between [128 KB, 256 MB] in size -->
<size unit="k">256</size>
</disk>
<update_period>60</update_period>
<path>/bin:/sbin:/usr/bin:/usr/sbin:/usr/share/vhostmd/scripts</path>
<transport>vbd</transport>
<!-- <transport>xenstore</transport> -->
</globals>
<metrics>
<metric type="string" context="host">
<name>HostName</name>
<action>hostname</action>
</metric>
<metric type="string" context="host">
<name>VirtualizationVendor</name>
<action>echo Fedora</action>
</metric>
<metric type="string" context="host">
<name>VirtualizationProductInfo</name>
<action>virsh version | grep API | gawk -F': ' '{print $2}'</action>
</metric>
<metric type="uint32" context="host">
<name>TotalPhyCPUs</name>
<action>virsh nodeinfo | grep 'CPU(s):' | gawk -F': +' '{print $2}'</action>
</metric>
<metric type="uint32" context="host">
<name>NumCPUs</name>
<action>virsh nodeinfo | grep 'CPU(s):' | gawk -F': +' '{print $2}'</action>
</metric>
<metric type="uint64" context="host">
<name>TotalPhyMem</name>
<action>virsh nodeinfo | grep 'Memory size:' | gawk -F' +' '{print $3}'</action>
</metric>
<metric type="uint64" context="host">
<name>UsedMem</name>
<action>free | grep '^Mem:' | gawk '{print $3}'</action>
</metric>
<metric type="uint64" context="host">
<name>FreeMem</name>
<action>free | grep '^Mem:' | gawk '{print $4}'</action>
</metric>
<metric type="uint64" context="host">
<name>PagedInMemory</name>
<action>echo "$((`vmstat -s | gawk '/pages paged in/ {print $1}'` / 1024))"</action>
</metric>
<metric type="uint64" context="host">
<name>PagedOutMemory</name>
<action>echo "$((`vmstat -s | gawk '/pages paged out/ {print $1}'` / 1024))"</action>
</metric>
<metric type="group" context="host">
<name>PageRates</name>
<action>pagerate.pl</action>
<variable name="PageInRate" type="uint64"/>
<variable name="PageFaultRate" type="uint64"/>
</metric>
<!--<metric type="real64" context="host">
<name>TotalCPUTime</name>
<action>virsh dominfo 0 | sed 's/: */:/' | \
gawk -F: '/CPU time/ {print $2;}'</action>
</metric>-->
<metric type="real64" context="vm">
<name>TotalCPUTime</name>
<action>virsh dominfo NAME | sed 's/: */:/' | \
gawk -F: '/CPU time/ {print $2;}'</action>
</metric>
</metrics>
</vhostmd>