1 Reply Latest reply on Jul 8, 2015 4:33 PM by tdanner

    AvgIOPSTotal in Orion.VIM.VMStatistics is null

    davotronic5000

      Hi

       

      I have hit a bit of an issue working with the RESTful API.  Currently I am attempting to perfrom a call that will return the last hour of CPU, Memory and total IOPS for a VM monitored in Orion VMM.

       

      I have an example call set up which returns data

      https://(IP of Orion server):17778/SolarWinds/InformationService/v3/Json/Query?query=SELECT+VirtualMachineID,+DateTime,+AvgCPULoad…

       

      This works fine to return everything apart from the AvgIOPSTotal which comes back as null. and is the same for all VMs that I try.

       

      I have checked the loging level in VMware as I am aware that can be an issue post vSphere 5.1 and that is all fine.  Also in the VMM console I can see the IOPS history chart and it has data.  I just cannot see why the data would not be returned via the API.

       

      Any suggestions for what this might be would be appreciated.

        • Re: AvgIOPSTotal in Orion.VIM.VMStatistics is null
          tdanner

          Extracting the query from the URL and adding some spacing, I get this:

           

          SELECT VirtualMachineID, DateTime, AvgCPULoad, AvgMemoryUsage, AvgIOPSTotal
          FROM Orion.VIM.VMStatistics
          WHERE VirtualMachineID = 77
            AND DateTime = (SELECT TOP 1 AddHour(-1, (SELECT GetUtcDate() as Date FROM Orion.Engines)) As NextPoll From Orion.Nodes)
          

           

          It's not entirely clear from that what you are trying to do. Are you looking for just the most recent stats from that VM? If so, I would use a query like this instead:

           

          SELECT TOP 1 VirtualMachineID, DateTime, AvgCPULoad, AvgMemoryUsage, AvgIOPSTotal
          FROM Orion.VIM.VMStatistics
          WHERE VirtualMachineID = 77
          ORDER BY DateTime DESC
          

           

          I suggest getting your queries working in SWQL Studio before switching over to API calls.

           

          Also, what version of the product are you using?