ExtremeCloud IQ- Site Engine & Extreme Management Center

Expand all | Collapse all

Custom Report / XML & MySQL

  • 1.  Custom Report / XML & MySQL

    Posted 05-03-2017 11:38
    In the process of creating a custom report that aggregates multiple reports into one, namely the ability to produce the results of the average availability of all switches over a custom period of time.

    Have managed to formulate the MySQL query below:
    SELECT rpt_target.objectIDName AS Switch_IP, from_unixtime(rpt_default_day.time_stamp / 1000) AS 'Date', rpt_default_day.average
    FROM rpt_default_day
    INNER JOIN rpt_target on rpt_target.targetID=rpt_default_day.targetID
    AND statisticID = 11
    AND time_stamp >= 1491174000000
    AND time_stamp <= 1493766000000
    ORDER BY average ASC LIMIT 1000[/code]This does the job, and all I need to do is change the dates to get the schedule I want. But what I would like to be able to do is create a 'MyReport', similar to the one shown in this post:

    https://community.extremenetworks.com/extreme/topics/oneview-top-interfaces-reports

    The problem is I don't understand how the XML code is formatted, and wondered if anyone could help or point me in the right direction?

    Many thanks in advance


  • 2.  RE: Custom Report / XML & MySQL

    Posted 05-03-2017 18:51
    Hello Martin,

    in my opinion, the easiest way to start is to look at existing reports.
    The reports are stored in "/usr/local/Extreme_Networks/NetSight/appdata/OneView/Reports".

    For example the report "IdentityAndAccessOverviewDailyReport.xml" contains an SQL query. Search in the report for ". The SQL query starts there.

    Your own reports need to be stored in the directory "/usr/local/Extreme_Networks/NetSight/appdata/OneView/MyReports".

    Create a own report via the web gui to see what happens in this folder to adapt this for your hand made report.

    Hop this helps for your next step.

    Regards
    Stephan


  • 3.  RE: Custom Report / XML & MySQL

    Posted 05-04-2017 05:57
    Hi Stephan,

    Thanks for the info. Managed to create the XML, which is great, but there is a couple of things extra I would like to do.

    First would be to add an icon that allows me to download it as an Excel, and the other is be able to dynamically add a date range in rather than use what's fixed in the query?

    Any ideas how to do that?

    As one example there is a report under Device -> Port Usage. If you load that you get a Excel icon in the top right corner. I couldn't find that report, but if I could, I could probably work it out?

    There is also examples of where you can dynamically add a date range, like Devices -> Device Availability Summary, which I found but can't workout how to make use of utilising the same code?

    Many thanks,

    Martin


  • 4.  RE: Custom Report / XML & MySQL

    Posted 05-04-2017 12:21
    With a bit of support, I got the answer:

    To create a table that is searchable, filterable and allows CSV exporting: