14.7. Sub-Collections

14.7.1. Host Network Attachments Sub-Collection

The network_attachments sub-collection represents the network configuration of the host. Each network_attachment element represents a network attached to the host and contains the following elements:

Table 14.3. Elements for a host's network attachments

Element
Type
Description
Properties
network id=
GUID
A reference to the network to which the host is attached.
host_nic id=
GUID
A reference to the host network interface to which the network is attached.
ip_address_assignments
complex
The IP configuration of the network. Each ip_address_assignment contains assignment_method and ip address= netmask= gateway= sub-elements.
 
properties
complex
Defines custom property keys for the network. Each property contains name and value sub-elements. See Section 14.7.2.3.2, “Network Attachment Custom Properties”.
 
reported_configurations
complex
A read-only list of configuration properties for the network attachment. The in_sync boolean is false when the network attachment is out of sync with the logical network definition of the data center. Each reported_configuration contains name, expected_value, actual_value, and in_sync sub-elements.
host id=
GUID
A reference to the host.

Example 14.9. An XML representation of a network attachment on a host

<network_attachment href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000">
    <network href="/ovirt-engine/api/networks/00000000-0000-0000-0000-000000000009" id="00000000-0000-0000-0000-000000000009"/>
    <host_nic href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
    <ip_address_assignments>
        <ip_address_assignment>
            <ip address="XX.XX.XX.XX" netmask="255.255.255.0" gateway="XX.XX.XX.XX"/>
            <assignment_method>dhcp</assignment_method>
        </ip_address_assignment>
    </ip_address_assignments>
    <reported_configurations>
        <in_sync>true</in_sync>
        <reported_configuration>
            <name>mtu</name>
            <expected_value>1500</expected_value>
            <actual_value>1500</actual_value>
            <in_sync>true</in_sync>
        </reported_configuration>
        <reported_configuration>
            <name>bridged</name>
            <expected_value>true</expected_value>
            <actual_value>true</actual_value>
            <in_sync>true</in_sync>
        </reported_configuration>
        <reported_configuration>
            <name>vlan</name>
            <in_sync>true</in_sync>
        </reported_configuration>
        <reported_configuration>
            <name>boot_protocol</name>
            <expected_value>DHCP</expected_value>
            <actual_value>DHCP</actual_value>
            <in_sync>true</in_sync>
        </reported_configuration>
    </reported_configurations>
    <host href="/ovirt-engine/api/hosts/f59a29cd-587d-48a3-b72a-db537eb21957" id="f59a29cd-587d-48a3-b72a-db537eb21957"/>
</network_attachment>
When attaching a network to a host, the network and host_nic elements are required, with either an id or a name. The host_nic ID can refer to either an unused network interface card or a bond.

Example 14.10. Attach a network to a host

POST /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments HTTP/1.1
Accept: application/xml
Content-type: application/xml

<network_attachment>
    <network id="00000000-0000-0000-0000-000000000000"/>
    <host_nic id="00000000-0000-0000-0000-000000000000"/>
</network_attachment>
The host_nic, ip_address_assignments, and properties elements are updatable post-creation. Changing the host_nic ID moves the network to a different network interface card.

Example 14.11. Modifying a host network attachment

PUT /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml

<network_attachment>
    <host_nic id="00000000-0000-0000-0000-000000000000"/>
    <ip_address_assignments>
        <ip_address_assignment> 
            <ip address="XX.XX.XX.XX" netmask="255.255.255.0" gateway="XX.XX.XX.XX"/>
	    <assignment_method>static</assignment_method>
	</ip_address_assignment>
    </ip_address_assignments>
    <properties>
        <property>
	    <name>bridge_opts</name>
	    <value>
	        forward_delay=1500 group_fwd_mask=0x0 multicast_snooping=1
	    </value>
        </property>
    </properties>
</network_attachment>
Detach a network from the host with a DELETE request on the network attachment.

Example 14.12. Detach a network from a host

DELETE /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml

HTTP/1.1 204 No Content

Important

Changes to network attachment configuration must be explicitly committed. See Section 14.8.8, “Commit Host Network Configuration Action”.

14.7.2. Host Network Interface Sub-Collection

14.7.2.1. Host Network Interface Sub-Collection

The nics sub-collection represents a host's physical network interfaces. Additional information can be retrieved for GET requests using the All-Content: true header. Each host_nic element in the representation acts as a network interface and contains the following elements:

Table 14.4. Elements for a host's network interfaces

Element Type Description Properties
name string The name of the host network interface, e.g. eth0. [a]
link rel="statistics" relationship A link to the statistics sub-collection for a host's network interface statistics.
link rel="labels" relationship A link to the labels sub-collection for a host's network interface labels.
link rel="networkattachments" relationship A link to the networkattachments sub-collection for a host's network interface configuration.  
link rel="master" relationship A reference to the master bonded interface, if this is a slave interface.
host id= GUID A reference to the host.
network id= GUID A reference to the network, if any, that the interface is attached. [b]
mac address= string The MAC address of the interface.
ip address= netmask= gateway= mtu= complex The IP level configuration of the interface.  
mtu complex The maximum transmission unit for the interface.  
boot_protocol enumerated The protocol for IP address assignment when the host is booting. A list of enumerated values is available in capabilities.  
status enumerated The link status for the network interface. These states are listed in host_nic_states under capabilities.
vlan id integer The VLAN which this interface represents.
bonding complex A list of options and slave NICs for bonded interfaces. [c]
bridged Boolean Defines the bridged network status. Set to true for a bridged network and false for a bridgeless network.  
[a] Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
[b] Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
[c] Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.

Example 14.13. An XML representation of a network interface on a host

<host_nic id="00000000-0000-0000-0000-000000000000"
  href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/
  00000000-0000-0000-0000-000000000000">
    <actions>
        <link rel="attach"
      href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/
      00000000-0000-0000-0000-000000000000/attach"/>
        <link rel="detach"
      href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/
      00000000-0000-0000-0000-000000000000/detach"/>
    </actions>
    <name>bond0</name>
    <link href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/statistics" rel="statistics"/>
    <link href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/labels" rel="labels"/>
    <link href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments" rel="networkattachments"/>
    <host href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
    <network href="/ovirt-engine/api/networks/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
    <mac address="00:00:00:00:00:00"/>
    <ip address="XX.XX.XX.XX" netmask="255.255.255.0" gateway="XX.XX.XX.XX"/>
    <boot_protocol>dhcp</boot_protocol>
    <status>
        <state>up</state>
    </status>
    <bonding>
        <options>
            <option name="mode" value="4" type="Dynamic link aggregation (802.3ad)"/>
            <option name="miimon" value="100"/>
        </options>
        <slaves>
            <host_nic id="00000000-0000-0000-0000-000000000000"/>
            <host_nic id="00000000-0000-0000-0000-000000000000"/>
        </slaves>
    </bonding>
    <mtu>1500</mtu>
    <bridged>true</bridged>
    <custom_configuration>false</custom_configuration>
</host_nic>
In the REST API, you can only create bonded interfaces. See Section 14.7.2.2, “Bonded Interfaces”. All other network interfaces contain updatable network, ip and boot_protocol elements.
Modify a network interface with a PUT request.
PUT /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/
00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml

<host_nic>
    <ip address="XX.XX.XX.XX" netmask="255.255.255.0" gateway="XX.XX.XX.XX"/>
    <boot_protocol>static</boot_protocol>
</host_nic>
Remove a network interface with a DELETE request.
DELETE /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/
00000000-0000-0000-0000-000000000000 HTTP/1.1

HTTP/1.1 204 No Content

14.7.2.2. Bonded Interfaces

A bonded interface is represented as a host_nic resource containing a bonding element.

Table 14.5. Bonded interface properties

Element Type Description Properties
options complex A list of option elements for a bonded interface. Each option contains property name and value attributes. [a]
slaves complex A list of slave host_nic id= elements for a bonded interface. [b]
[a] Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
[b] Only required when adding bonded interfaces. Other interfaces are read-only and cannot be added.
An API user creates a new bond when creating a new host_nic (POST) or updating a host_nic (PUT). Use either the id or name elements to identify the slave host_nic elements. When adding a new network interface, the name and network elements are required. Identify the network element with the id attribute or name element.

Example 14.14. Creating a bonded interface

POST /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics HTTP/1.1
Accept: application/xml
Content-Type: application/xml

<host_nic>
    <name>bond4</name>
    <network id="00000000-0000-0000-0000-000000000000"/>
    <bonding>
        <slaves>
            <host_nic id="00000000-0000-0000-0000-000000000000"/>
            <host_nic id="00000000-0000-0000-0000-000000000000"/>
        </slaves>
    </bonding>
</host_nic>

Important

bond0, bond1, bond2, bond3 and bond4 are the only valid names for a bonded interface.

Example 14.15. Removing a bonded interface

Remove a bonded interface with a DELETE request.
DELETE /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000 HTTP/1.1

HTTP/1.1 204 No Content

Important

Changes to bonded interface configuration must be explicitly committed. See Section 14.8.8, “Commit Host Network Configuration Action”.

14.7.2.3. Network Interface Network Attachments

14.7.2.3.1. Network Interface Network Attachments
Each network interface on a host exposes a network_attachments sub-collection representing the network interface card's network attachments. Each network_attachment represents a network attached to the network interface and contains the following elements:

Table 14.6. Elements for a host network interface's network attachments

Element
Type
Description
Properties
network id=
GUID
A reference to the network to which the interface is attached.
host_nic id=
GUID
A reference to the host network interface.
ip_address_assignments
complex
The IP configuration of the network. Each ip_address_assignment contains assignment_method and ip address= netmask= gateway= sub-elements.
 
properties
complex
Defines custom property keys for the network. Each property contains name and value sub-elements.
 
reported_configurations
complex
A read-only list of configuration properties for the network attachment. The in_sync boolean is false when the network attachment contains uncommitted network configuration. Each reported_configuration contains name, expected_value, actual_value, and in_sync sub-elements.

Example 14.16. An XML representation of a network attachment on a network interface card

<network_attachment href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000">
    <network href="/ovirt-engine/api/networks/00000000-0000-0000-0000-000000000009" id="00000000-0000-0000-0000-000000000009"/>
    <host_nic href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
    <ip_address_assignments>
        <ip_address_assignment>
            <ip address="XX.XX.XX.XX" netmask="255.255.255.0" gateway="XX.XX.XX.XX"/>
            <assignment_method>static</assignment_method>
        </ip_address_assignment>
    </ip_address_assignments>
    <reported_configurations>
        <in_sync>true</in_sync>
        <reported_configuration>
            <name>mtu</name>
            <expected_value>1500</expected_value>
            <actual_value>1500</actual_value>
            <in_sync>true</in_sync>
        </reported_configuration>
        <reported_configuration>
            <name>bridged</name>
            <expected_value>true</expected_value>
            <actual_value>true</actual_value>
            <in_sync>true</in_sync>
        </reported_configuration>
        <reported_configuration>
            <name>vlan</name>
            <in_sync>true</in_sync>
        </reported_configuration>
        <reported_configuration>
            <name>boot_protocol</name>
            <expected_value>DHCP</expected_value>
            <actual_value>DHCP</actual_value>
            <in_sync>true</in_sync>
        </reported_configuration>
    </reported_configurations>
</network_attachment>
When attaching a network to a network interface card, the network element is required, with either an id or a name.

Example 14.17. Attach a network to a host network interface card

POST /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments HTTP/1.1
Accept: application/xml
Content-type: application/xml

<networkattachment>
    <network id="00000000-0000-0000-0000-000000000000"/>
</networkattachment>
The ip_address_assignments and properties elements are updatable post-creation.

Example 14.18. Modifying a network attachment

PUT /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml

<networkattachment>
    <ip_address_assignments>
        <ip_address_assignment> 
            <ip address="XX.XX.XX.XX" netmask="255.255.255.0" gateway="XX.XX.XX.XX"/>
	    <assignment_method>static</assignment_method>
	</ip_address_assignment>
    </ip_address_assignments>
</networkattachment>
Detach a network from the network interface card with a DELETE request on the network attachment.

Example 14.19. Detach a network from a host network interface card

DELETE /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml

HTTP/1.1 204 No Content

Important

Changes to network attachment configuration must be explicitly committed. See Section 14.8.8, “Commit Host Network Configuration Action”.
14.7.2.3.2. Network Attachment Custom Properties
Custom properties can be applied to network attachments. Each property contains name and value sub-elements. To amend the custom properties, perform a PUT request on a network attachment, or a POST request with the setupnetworks action.

Table 14.7. Elements for custom bridge options for a host's network interface

Element Type Description
name string The unique identifier for the property. Bridge options have the set name of bridge_opts.
value string The bridge options, represented by a valid key and value with the following syntax: [key]=[value]. Separate multiple entries with a whitespace character. The following keys are valid, with the values provided as examples:

forward_delay=1500
gc_timer=3765 
group_addr=1:80:c2:0:0:0
group_fwd_mask=0x0
hash_elasticity=4
hash_max=512
hello_time=200
hello_timer=70
max_age=2000
multicast_last_member_count=2
multicast_last_member_interval=100
multicast_membership_interval=26000
multicast_querier=0
multicast_querier_interval=25500
multicast_query_interval=13000
multicast_query_response_interval=1000
multicast_query_use_ifaddr=0
multicast_router=1
multicast_snooping=1
multicast_startup_query_count=2
multicast_startup_query_interval=3125

Example 14.20. An XML representation of a network attachment's properties sub-collection

<network_attachment>
  ...
  <properties>
    <property>
      <name>bridge_opts</name>
      <value>
        forward_delay=1500 group_fwd_mask=0x0 multicast_snooping=1
      </value>
    </property>
  </properties>
  ...
</network_attachment>

14.7.2.4. Network Interface Labels

You can attach labels to a host network interface card to automate the association of that network interface card with logical networks to which the same label has been attached.

Example 14.21. Attaching a label to a network interface card

POST /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/labels HTTP/1.1
Accept: application/xml
Content-type: application/xml

<label id="Label_001" />
Removal of a label from a physical host network interface card requires a DELETE request.

Example 14.22. Removing a label from a network interface card

DELETE /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/labels/00000000-0000-0000-0000-000000000000 HTTP/1.1

HTTP/1.1 204 No Content

14.7.2.5. Network Interface Statistics

Each host's network interface exposes a statistics sub-collection for a host's network interface statistics. Each statistic contains the following elements:

Table 14.8. Elements for a host's network interface statistics

Element Type Description
name string The unique identifier for the statistic entry.
description string A plain text description of the statistic.
unit string The unit or rate to measure the statistical values.
type One of GAUGE or COUNTER The type of statistic measures.
values type= One of INTEGER or DECIMAL The data type for the statistical values that follow.
value complex A data set that contains datum.
datum see values type An individual piece of data from a value.
host_nic id= relationship A relationship to the containing host_nic resource.
The following table lists the statistic types for network interfaces on hosts.

Table 14.9. Host NIC statistic types

Name
Description
data.current.rx
The rate in bytes per second of data received.
data.current.tx
The rate in bytes per second of data transmitted.
data.total.rx
Total received data.
data.total.tx
Total transmitted data.
errors.total.rx
Total errors from receiving data.
errors.total.tx
Total errors from transmitting data.

Example 14.23. An XML representation of a host's network interface statistics sub-collection

<statistics>
    <statistic id="00000000-0000-0000-0000-000000000000"
      href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/
      00000000-0000-0000-0000-000000000000/statistics/
      00000000-0000-0000-0000-000000000000">
        <name>data.current.rx</name>
        <description>Receive data rate</description>
        <values type="DECIMAL">
            <value>
                <datum>0</datum>
            </value>
        </values>
        <type>GAUGE</type>
        <unit>BYTES_PER_SECOND</unit>
        <host_nic id="00000000-0000-0000-0000-000000000000"
          href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/
          00000000-0000-0000-0000-000000000000"/>
    </statistic>
    ...
</statistics>

Note

This statistics sub-collection is read-only.

14.7.3. Storage Sub-Collection

The storage sub-collection provides a list of the iSCSI and FCP storage representations available on the host. This storage is used to create storage domains.
Each storage representation in the sub-collection represents a SCSI LUN.

Example 14.24. An XML representation of the storage sub-collection on a host

<host_storage>
    <storage id="82fb123b-321e-40a1-9889-95dcd2654463"
      href="/ovirt-engine/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/storage/
      82fb123b-321e-40a1-9889-95dcd2654463">
        <name>LUN0</name>
        <type>iscsi</type>
        <logical_unit id="LUN0">
            <address>mysan.example.com</address>
            <target>iqn.2009-08.com.example:mysan.foobar</target>
        </logical_unit>
    </storage>
</host_storage>

Note

The host_storage collection is read-only.

Important

The API as documented in this section is experimental and subject to change. It is not covered by the backwards compatibility statement.

14.7.4. Host NUMA Nodes Sub-Collection

14.7.4.1. NUMA Nodes Sub-Collection

The numanodes sub-collection represents the host's NUMA topology. Each host_numa_node element in the sub-collection represents a NUMA node.

Example 14.25. An XML representation of the numanodes sub-collection on a host

<host_numa_nodes>
    <host_numa_node href="/ovirt-engine/api/hosts/f6735fa9-4ee5-47ce-b750-a87863736cc2/numanodes/91d8537c-699e-460b-9a70-285f651e7d68" id="91d8537c-699e-460b-9a70-285f651e7d68">
        <link href="/ovirt-engine/api/hosts/f6735fa9-4ee5-47ce-b750-a87863736cc2/numanodes/91d8537c-699e-460b-9a70-285f651e7d68/statistics" rel="statistics"/>
        <host href="/ovirt-engine/api/hosts/f6735fa9-4ee5-47ce-b750-a87863736cc2" id="f6735fa9-4ee5-47ce-b750-a87863736cc2"/>
        <index>0</index>
        <memory>8157</memory>
        <cpu>
            <cores>
                <core index="0"/>
                <core index="2"/>
                <core index="4"/>
                <core index="6"/>
            </cores>
        </cpu>
        <node_distance>10 16</node_distance>
    </host_numa_node>
    <host_numa_node href="/ovirt-engine/api/hosts/f6735fa9-4ee5-47ce-b750-a87863736cc2/numanodes/4b18926e-6faf-43f5-9fc2-0503f1531562" id="4b18926e-6faf-43f5-9fc2-0503f1531562">
        <link href="/ovirt-engine/api/hosts/f6735fa9-4ee5-47ce-b750-a87863736cc2/numanodes/4b18926e-6faf-43f5-9fc2-0503f1531562/statistics" rel="statistics"/>
        <host href="/ovirt-engine/api/hosts/f6735fa9-4ee5-47ce-b750-a87863736cc2" id="f6735fa9-4ee5-47ce-b750-a87863736cc2"/>
        <index>2</index>
        <memory>8175</memory>
        <cpu>
            <cores>
                <core index="1"/>
                <core index="3"/>
                <core index="5"/>
                <core index="7"/>
            </cores>
        </cpu>
        <node_distance>16 10</node_distance>
    </host_numa_node>
</host_numa_nodes>

Note

The host_numa_nodes sub-collection is read-only.

14.7.4.2. NUMA Node Statistics

Each host NUMA node exposes a statistics sub-collection for NUMA node statistics. Each statistic contains the following elements:

Table 14.10. Elements for a host's NUMA node statistics

Element Type Description
name string The unique identifier for the statistic entry.
description string A plain text description of the statistic.
unit string The unit or rate to measure the statistical values.
type One of GAUGE or COUNTER The type of statistic measures.
values type= One of INTEGER or DECIMAL The data type for the statistical values that follow.
value complex A data set that contains datum.
datum see values type An individual piece of data from a value.
host_numa_node id= relationship A relationship to the containing numanode resource.
The following table lists the statistic types for host NUMA nodes.

Table 14.11. Host NUMA node statistics

Name Description
memory.total Total memory in bytes on the NUMA node.
memory.used Memory in bytes used on the NUMA node.
memory.free Memory in bytes free on the NUMA node.
cpu.current.user Percentage of CPU usage for users.
cpu.current.system Percentage of CPU usage for the system.
cpu.current.idle Percentage of idle CPU usage.

Example 14.26. An XML representation of the host NUMA node's statistics sub-collection

<statistics>
    <statistic href="/ovirt-engine/api/hosts/f6745fa9-4ee5-47ce-b750-a87863736cc2/numanodes/91d8537c-689e-460b-9a70-285f651e7d68/statistics/7816602b-c05c-3dc7-a4da-3769f7ad8896" id="7816602b-c05c-3dc7-a4da-3769f7ad8896">
        <name>memory.total</name>
        <description>Total memory</description>
        <values type="INTEGER">
            <value>
                <datum>8157</datum>
            </value>
        </values>
        <type>GAUGE</type>
        <unit>BYTES</unit>
        <host_numa_node href="/ovirt-engine/api/hosts/f6745fa9-4ee5-47ce-b750-a87863736cc2/numanodes/91d8537c-689e-460b-9a70-285f651e7d68" id="91d8537c-689e-460b-9a70-285f651e7d68"/>
    </statistic>
    ...
</statistics>

Note

A host NUMA node's statistics sub-collection is read-only.

14.7.5. Host Statistics Sub-Collection

14.7.5.1. Host Statistics Sub-Collection

Each host resource exposes a statistics sub-collection for host-specific statistics. Each statistic contains the following elements:

Table 14.12. Elements for host statistics

Element Type Description
name string The unique identifier for the statistic entry.
description string A plain text description of the statistic.
unit string The unit or rate to measure the statistical values.
type One of GAUGE or COUNTER The type of statistic measures.
values type= One of INTEGER or DECIMAL The data type for the statistical values that follow.
value complex A data set that contains datum.
datum see values type An individual piece of data from a value.
host id= relationship A relationship to the containing host resource.
The following table lists the statistic types for hosts.

Table 14.13. Host statistic types

Name
Description
memory.total
Total memory in bytes on the host.
memory.used
Memory in bytes used on the host.
memory.free
Memory in bytes free on the host.
memory.shared
Memory in bytes shared on the host.
memory.buffers
I/O buffers in bytes.
memory.cached
OS caches in bytes.
swap.total
Total swap memory in bytes on the host.
swap.free
Swap memory in bytes free on the host.
swap.used
Swap memory in bytes used on the host.
swap.cached
Swap memory in bytes also cached in host's memory.
ksm.cpu.current
Percentage of CPU usage for Kernel SamePage Merging.
cpu.current.user
Percentage of CPU usage for users.
cpu.current.system
Percentage of CPU usage for system.
cpu.current.idle
Percentage of idle CPU usage.
cpu.load.avg.5m
CPU load average per five minutes.

Example 14.27. An XML representation of the host's statistics sub-collection

<statistics>
    <statistic id="4ae97794-f56d-3f05-a9e7-8798887cd1ac"
      href="/ovirt-engine/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3/
      statistics/4ae97794-f56d-3f05-a9e7-8798887cd1ac">
        <name>memory.total</name>
        <description>Total memory</description>
        <unit>BYTES</unit>
        <type>GUAGE</type>
        <values type="INTEGER">
            <value>
                <datum>3983540224<datum>
            </value>
        </values>
        <host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"
          href="/ovirt-engine/api/hosts/2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/>
    </statistic>
    ...
</statistics>

Note

A host's statistics sub-collection is read-only.