4 Replies Latest reply: Jul 2, 2013 1:35 PM by Clint Doyle RSS

Trouble with Report API

I am assisting a colleague of mine in working up a URL to utilize API to generate a report for consumption outside our team.  I have created an interface group with the devices/interfaces in question.  We are able to run the API and get a report, but we want to limit this to just the summary table shown by interfaces.  I would also like to show only a few specific columns of out put as a result of this.  Can someone help me nail down if I can get this specific with the API and perhaps give me some pointers on getting it to display only the information I want?

  • Re: Trouble with Report API
    Christopher White

    Hi Clint,


    It sounds like you are using the "Profiler Reporting API".  You might try using either the REST API or the FlyScript Python SDK (which uses the REST API).  This is going to be more flexible than the reporting API and will let you report on just the columns you're interested in as well as just the summary table of interest.


    Take a look SteelScript for more info.  You can get started Getting started with SteelScript for Python.


    I'd be happy to sketch out a simple Python script that should get you going in the right direction.  Just let me know.



    • Re: Trouble with Report API

      You are correct we are using the "Profiler Reporting API".  A sample script or something to work with would be a big help!  Thanks so much.

    • Re: Re: Trouble with Report API
      Christopher White

      Here's a simple Python script (based on the FlyScript SDK) that reports on all interface in the interface group "/WAN/Optimized":


      from rvbd.profiler import *
      from rvbd.profiler.app import ProfilerApp
      from rvbd.profiler.filters import TimeFilter, TrafficFilter
      import pprint
      def main(app):
          # Create and run a traffic summary report of all interfaces in
          # the /WAN/Optimized interface group
          report = TrafficSummaryReport(app.profiler)
          key = app.profiler.columns.key
          value = app.profiler.columns.value
          # Run the report
              groupby = app.profiler.groupbys.interface,
              columns = [key.interface,
              sort_col = app.profiler.columns.value.avg_util,
              timefilter = TimeFilter.parse_range("last 15 m"),
              trafficexpr = TrafficFilter("interfacegroup /WAN/Optimized")
          # Retrieve and print data
          data = report.get_data()
          printer = pprint.PrettyPrinter(2)
      if __name__ == '__main__':


      Follow the instructions in the Getting Started article linked above to get the SDK installed and running on your laptop on a server running Python 2.6 or 2.7.  Then save the above in a file such as 'top_interfaces.py' and run as follows:


      $ python top_interfaces.py <profiler> -u <username> -p <password>
      [ [ '',
        [ '',
        [ '',
          29.875] ]


      This list of columns is available by using the "profiler_columns.py" tool:


      python utilities/profiler_columns.py <profiler> -u <username> -p <password> -g interface | head -20
      Key Columns            Label                    ID    
      idx                    Index                    1     
      interface              Interface IP             29    
      interface_alias        Description (ifAlias)    132   
      interface_dns          Interface                126   
      interface_speed_in     Speed, bps (In)          292   
      interface_speed_out    Speed, bps (Out)         293   
      Value Columns                    Label                               ID    
      avg_bytes                        Avg Bytes/s                         33    
      avg_bytes_app                    Avg App Bytes/s                     504   
      avg_bytes_app_persecconn         Avg App Bytes/s per Conn            578   
      avg_bytes_persecconn             Avg Bytes/s per Conn                556   
      avg_bytes_rtx                    Avg Retrans Bytes/s                 391   


      If you run into issues, post a question in the SteelScript group.