2 Replies Latest reply on Jan 3, 2014 4:08 PM by derhally

    Can the SDK be used to extract SAM component statistical data into CSV?

    rhart-ka

      I apologize if this has been asked or if the solution is already well-known. 

       

      I just found the SDK today and I'm going through the samples.  What I'd like to accomplish is some kind of scheduled data extract of component statistic data into CSV files, other flat file formats, or maybe an archive database.  The samples mainly cover grabbing really basic information and performing a few operations on nodes, volumes, etc.  I can't find anything like what I'd want to accomplish.  Are there any examples of this out there?  Like, say, grabbing the last month's worth of data for any component and dumping it to CSV?

       

      Thanks.

        • Re: Can the SDK be used to extract SAM component statistical data into CSV?
          rhart-ka

          In the Orion SAM database, component statistic data seems to reside in the [APM_PortEvidence_Detail], [APM_PortEvidence_Daily], and [APM_PortEvidence_Hourly] tables according to the configured data retention periods.  In the SWQL tool, there is a data structure called

          Orion.APM.PortEvidence that appears to return min/max/average statistic values like they exist in the daily, hourly, and detail PortEvidence tables in the database, but doesn't give access to the raw statistic polling data.  There are a few views into current component stats and details as well, but they also don't contain what I need.  Am I missing anything?

           

          For example, I wrote this SQL (not SWQL) query against the SAM database to return all statistic data for a given ComponentID, assuming the component actually stores statistic data.

          select 
          cd.TimeStamp,
          a.Name,
          c.Name,
          apd.StatisticData,
          cd.Availability,
          cd.PercentAvailability
          from [dbo].[APM_ComponentStatus_Detail] cd 
          inner join dbo.APM_Application a on a.ID=cd.ApplicationID
          inner join dbo.APM_Component c on c.ID=cd.ComponentID
          inner join [dbo].[APM_PortEvidence_Detail] apd on apd.ComponentStatusID=cd.ID
          where cd.ComponentID=1489 --enter component ID here
          order by cd.TimeStamp desc