- Add a timestamp to the metrics.

- Fix a typo in MemoryAllocatedToVirtualServers metric
    (https://bugzilla.redhat.com/show_bug.cgi?id=532070#c7)
- %{_sysconfdir}/sysconfig/vhostmd: Use libvirt default URI
    (https://bugzilla.redhat.com/show_bug.cgi?id=537828)
- %{_sysconfdir}/init.d/vhostmd: If using libvirt's default URI, then pass
    the root URI to vhostmd (the default URI changes in some circumstances
    when vhostmd switches to the non-root user).
This commit is contained in:
Richard W.M. Jones 2009-11-17 11:16:24 +00:00
parent b6d5045b2f
commit 65ca3e0122
4 changed files with 23 additions and 3 deletions

View File

@ -37,6 +37,10 @@ within the vm element.
<name>HostName</name>
<action>hostname</action>
</metric>
<metric type="uint64" context="host">
<name>Time</name>
<action>date +%s</action>
</metric>
<metric type="string" context="host">
<name>VirtualizationVendor</name>
<action>rpm -qi libvirt| grep Vendor: |awk '{print substr($0, index($0,$5)) }'</action>
@ -59,7 +63,7 @@ within the vm element.
<!-- SAP "CIM" -->
<metric type="uint64" context="host">
<name>MemoryAllocatedToVirtualServers</name>
<action>virsh -r CONNECT nodeinfo | grep 'Memory size:' | gawk -F' +' '{ printf "%d\n" $3/1024 }'</action>
<action>virsh -r CONNECT nodeinfo | grep 'Memory size:' | gawk -F' +' '{ printf "%d\n", $3/1024 }'</action>
</metric>
<!-- SAP "CIM" -->
<metric type="uint64" context="host">

View File

@ -35,6 +35,9 @@ if [ -n "$VHOSTMD_USER" ]; then
fi
if [ -n "$VHOSTMD_URI" ]; then
ARGS="$ARGS --connect $VHOSTMD_URI"
elif virsh uri >/dev/null 2>&1; then
default_uri=$(virsh uri)
ARGS="$ARGS --connect '$default_uri'"
fi
lockfile=/var/lock/subsys/$prog

View File

@ -8,7 +8,7 @@
Summary: Virtualization host metrics daemon
Name: vhostmd
Version: 0.4
Release: 0.8.gite9db007b%{?dist}
Release: 0.9.gite9db007b%{?dist}
License: GPLv2+
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -184,6 +184,16 @@ exit 0
%changelog
* Tue Nov 17 2009 Richard W.M. Jones <rjones@redhat.com> - 0.4-0.9.gite9db007b
- Add a timestamp to the metrics.
- Fix a typo in MemoryAllocatedToVirtualServers metric
(https://bugzilla.redhat.com/show_bug.cgi?id=532070#c7)
- %{_sysconfdir}/sysconfig/vhostmd: Use libvirt default URI
(https://bugzilla.redhat.com/show_bug.cgi?id=537828)
- %{_sysconfdir}/init.d/vhostmd: If using libvirt's default URI, then pass
the root URI to vhostmd (the default URI changes in some circumstances
when vhostmd switches to the non-root user).
* Wed Nov 11 2009 Richard W.M. Jones <rjones@redhat.com> - 0.4-0.8.gite9db007b
- Use fixed UID:GID 112:112 (RHBZ#534109).

View File

@ -8,4 +8,7 @@
VHOSTMD_USER=vhostmd
# Set the libvirt URI.
VHOSTMD_URI=qemu:///system
# Uncomment one of these to force KVM or Xen, otherwise libvirt
# will try to choose a suitable default.
#VHOSTMD_URI=qemu:///system
#VHOSTMD_URI=xen:///