cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Report / XML & MySQL

Custom Report / XML & MySQL

Anonymous
Not applicable
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 1000This 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
3 REPLIES 3

Anonymous
Not applicable
With a bit of support, I got the answer:

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





Test Report
true
true
true
Help for what fields are searchable


To get multiple forms within one report you could use tabs for example.:


none




pdf


-->



Overview

vbox


hbox



Look at this report to get an idea:
/usr/local/Extreme_Networks/NetSight/appdata/OneView/Reports/DataCenterManagerAllHypervisors_IA.xml

To display a date-time picker you can use this:


All Calls

All Calls
false
fit



Start:
End:

startDate
startDate

1

60


endDate
endDate

1

60




refresh






Anonymous
Not applicable
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

StephanH
Valued Contributor III
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
Regards Stephan
GTM-P2G8KFN