4 Replies Latest reply on Mar 15, 2016 2:02 PM by mteichrob

    Storage Report - Sum of two data series

    mteichrob

      Hi all,

       

      I have created a Storage report which reports on two disk arrays. I have two data series: "Capacity Usable Total" and "Capacity Usable Used". This creates 4 lines on the resulting graph as expected (image attached). I would like to combine the sum total of Capacity Usable Total (array 1 + array 2) as well as the Capacity Usable Used (array 1 + array 2). This would produce two lines on the resulting graph.

       

      I contacted SolarWinds support about this and they suggested I try to use the following SWQL query as my data source:

       

      SELECT ObservationTimestamp, SUM(CapacityUserTotal) AS CapacityUserTotal, SUM(CapacityUserUsed) AS CapacityUserUsed, '' AS GroupField, '' AS LegendField

      FROM Orion.SRM.StorageArrayCapacityStatistics

      GROUP BY StorageArrayID, ObservationTimestamp

      HAVING SUM(CapacityUserTotal) <> 0

       

      This provided incorrect results, i.e. the calculated numbers did not accurately represent the sum of the two arrays. The support agent said: "I talked to our developers and this is truly a product limitation thus they are encouraging you to log into twack and raised your concern their and they will happy to assist you further." Reference: CUST-13273.

       

      Has anyone done something similar?

       

      Thanks!

      Matt

        • Re: Storage Report - Sum of two data series
          Lubomir Krausko

          Hi,

          would you try to update your query with this one and reply whether it displays data in way what you'd like to?

           

          SELECT DateTrunc('hour', ObservationTimestamp) AS ObservationTimestamp, SUM(CapacityUserTotal) AS CapacityUserTotal, SUM(CapacityUserUsed) AS CapacityUserUsed, '' AS GroupField, '' AS LegendField

          FROM Orion.SRM.StorageArrayCapacityStatistics

          GROUP BY DateTrunc('hour', ObservationTimestamp)

          HAVING SUM(CapacityUserTotal) <> 0

           

          Thanks

          Regards

          Lubo

            • Re: Storage Report - Sum of two data series
              mteichrob

              Hi Lubo,

               

              That definitely worked - thanks!

               

              One other question - this is pulling data from ALL arrays I'm monitoring in SolarWinds. Is there an easy way to specify only specific arrays? I'm assuming I could simply add a WHERE clause, but I'm not familiar with the field names...

               

              Thanks,

              Matt

                • Re: Storage Report - Sum of two data series
                  Lubomir Krausko

                  Hi

                  yes, that should work also, you have two options:

                   

                  First - update your query like this:

                  ...

                  FROM Orion.SRM.StorageArrayCapacityStatistics

                  WHERE StorageArrayCapacityStatistics.StorageArray.DisplayName IN ('<name of your array>', '<name of your other array>', ...)

                  GROUP BY DateTrunc('hour', ObservationTimestamp)

                  ...

                   

                  Second - update your query like this:

                  ...

                  FROM Orion.SRM.StorageArrayCapacityStatistics

                  WHERE StorageArrayID IN (1, 2)

                  GROUP BY DateTrunc('hour', ObservationTimestamp)

                  ...

                   

                   

                  Here are advantages and disadvantages:

                  First:

                  Advantages: simpler, better visibility in query what arrays you have selected

                  Disadvantages: once you change name of your storage array, you have to adapt your query

                  Second:

                  Advantages: this query will safely work until you drop the array from the system or you re-add it into the SRM (IDs are changing in this way)

                  Disadvantages: you have to get StorageArrayID numbers of storage arrays you would like to use in report (small hint: click on Storage Array to navigate to its detail page and you'll see its StorageArrayID in your browser url: e.g. "...NetObject=SMSA:<this number is StorageArrayID you should use>")

                   

                   

                  Regards

                  Lubo