Where can I find list of xpath_expressions?

Hi!
In the description of API method OpenNebula.VirtualMachine.monitoring() there is a parameter xpath_expressions and some examples like [“HOST_SHARE/FREE_CPU”], but there are not any lists with another expressions. For example, I want to know on which host the virtual machine is deployed now, but any tries with ["HOST’], [‘HOSTNAME’] or anothers are failed. So the question is where I can find valid xpath_expressions to such methods?
Questions 1.a is how to know on what host the VM is now deployed?
Thank you

Hello @mykytkad,

You need to check last history record of the VM:

    <HISTORY>
      <OID>587</OID>
      <SEQ>3</SEQ>
      <HOSTNAME>localhost</HOSTNAME>
      <HID>0</HID>
      <CID>100</CID>
      <STIME>1631790820</STIME>
      <ETIME>0</ETIME>
      <VM_MAD><![CDATA[kvm]]></VM_MAD>
      <TM_MAD><![CDATA[ssh]]></TM_MAD>
      <DS_ID>0</DS_ID>
      <PSTIME>0</PSTIME>
      <PETIME>0</PETIME>
      <RSTIME>1631790820</RSTIME>
      <RETIME>1633010834</RETIME>
      <ESTIME>0</ESTIME>
      <EETIME>0</EETIME>
      <ACTION>44</ACTION>
      <UID>-1</UID>
      <GID>-1</GID>
      <REQUEST_ID>-1</REQUEST_ID>
    </HISTORY>

See HID and HOSTNAME.

Best,
Álex.

Hi @ahuertas
Can you please give an example how to use this as a xpath_expressions?
For example, OpenNebula::VirtualMachinePool.monitoring( [ ‘HID’ ] ) is not working, also as OpenNebula::VirtualMachinePool.monitoring( [ ‘HISTORY/HID’ ] )
Thank you

Hi @mykytkad,

This is normal XPATH expression, please check this tutorial.

Best,
Álex.