Oneview top interfaces reports

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hi community

I am look for some advice on the interface reports in oneview.
In my Netsight (6.3) I have over 100 S series switches (Various S8,S6 and SSA's)

In one view I can generate custom reports for each infividual interface on every device/port.
If I look at the predefined reports under "Reports", we find "Interface Reports" and then we find "Top interfaces by Bandwidth".
The reports looks as follows:

 

The problem I have is that this reports is across all 100 switches.
I am looking for the same report but for a individual device.
I would like to see the top 10 ports on a specific S series switch.
How do you generate the same report but on a per device basis?

Regards
Photo of Andre Brits Kannemeyer

Andre Brits Kannemeyer

  • 5,330 Points 5k badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of Andre Brits Kannemeyer

Andre Brits Kannemeyer

  • 5,330 Points 5k badge 2x thumb
Also is their a way to add this report to the scheduler so that it can be emailed?
Currently you can only create a report with the "Top 5 Interfaces" under the device category but this again is across all devices not a individual device.
(Edited)
Photo of Thomas, Frank

Thomas, Frank, Employee

  • 1,902 Points 1k badge 2x thumb
How's your mysql skills?

Here is a template that you could use.



<?xml version="1.0" encoding="UTF-8"?><report>
<reportId>Network Utilization X.X.X.X</reportId> <!-- must be unique -->
<title>Network Utilization X.X.X.X</title>
<category>Network Utilization X.X.X.X</category>
<showInTree>true</showInTree>
<iconCls>table-icon</iconCls>
<schedulable>true</schedulable>
<scheduleClass>com.enterasys.netsight.reporting.server.webapps.monitor.schedule.SchedTabbedPDFReport</scheduleClass>
<scheduleOptions>
<scheduleOption>
<option>--pdfWidth</option>
<value>1425</value>
</scheduleOption>
<scheduleOption>
<option>--pdfHeight</option>
<value>1800</value><!-- Taller to fill the whole page -->
</scheduleOption>
<scheduleOption>
<option>customArgs</option>
<value>Interface Utilization</value>
</scheduleOption>
<scheduleOption>
<option>--javascript-delay</option>
<value>45000</value>
</scheduleOption>
</scheduleOptions>
 <panel>
  <pack>none</pack>
<layout>fit</layout>
<showtitle>false</showtitle>
<items>
<tabpanel>
<tab>
<tabtitle>Interface Utilization</tabtitle>
<panel>
<layout>fit</layout>
<items>
<grid>
<autoExpandColumnId>description</autoExpandColumnId> <!-- column id that should auto expand -->
<columns>
<column>
<dataIndex>Name</dataIndex> <!-- must match db column name -->
<id>displayName</id>
<header>displayName</header>
<width>250</width>
</column>
<column>
<dataIndex>Utilization</dataIndex> <!-- must match db column name -->
<id>ifUtilization</id>
<header>ifUtilization</header>
<width>200</width>
</column>
</columns>
<data>
<dataId>targetData</dataId>
<query><![CDATA[
SELECT t.displayName AS Name, (truncate(r.val ,3)) AS Utilization
FROM netsightrpt.rpt_default_raw r LEFT OUTER JOIN netsightrpt.rpt_target t
ON r.targetID=t.targetID WHERE r.statisticID=(
SELECT statisticID FROM netsightrpt.rpt_statistic WHERE name="ifUtilization")
AND time_stamp > UNIX_TIMESTAMP(NOW() - INTERVAL 20 MINUTE) * 1000 and t.displayName like '%X.X.X.X%' 
ORDER BY r.val DESC
LIMIT 100;
]]>
</query>
</data>
</grid>
</items>
</panel>
</tab>
</tabpanel>
</items>
    </panel>
</report>


  1. So copy and paste this into notepad
  2. Change the X.X.X.X to the IP you want
  3. Save it as an xml file
  4. Drop it in /NetSight/appdata/OneView/MyReports. 
  5. Refresh Report Tree.
This is also able to be scheduled and emailed.
(Edited)
Photo of Andre Brits Kannemeyer

Andre Brits Kannemeyer

  • 5,330 Points 5k badge 2x thumb
Hi Thomas

Thank you very much for this, this report is just what I was looking for.
I have copied the template and replaced with x.x.x.x with the device IP.
I have renamed the file to .xml but am not seeing this report listed in my reports.

Any ideas??

PS my "MYSQL" skills = 0 
(Edited)
Photo of Thomas, Frank

Thomas, Frank, Employee

  • 1,902 Points 1k badge 2x thumb
My first guess would be to double check where the file was dropped on the server, and refresh the tree (report tree must be refreshed for new reports to show up.

Second would guess there is an error. Any errors in the server log? In the admin panel under diagnostics. If there was an error in the report, it'll show which line it failed on.
Photo of Andre Brits Kannemeyer

Andre Brits Kannemeyer

  • 5,330 Points 5k badge 2x thumb
Hi Thomas

I see no errors in the Server log regarding the report.

As mentioned I know very little about MYSQL but looking at the template you only refer to 4 locations with X.X.X.X that I substitute with the device IP:

<reportId>Network Utilization X.X.X.X</reportId> <!-- must be unique -->
<title>Network Utilization X.X.X.X</title>
<category>Network Utilization X.X.X.X</category>

As far as I can read the above three lines refer to the naming convention of the report  and does not actually refer to the device.

AND time_stamp > UNIX_TIMESTAMP(NOW() - INTERVAL 20 MINUTE) * 1000 and t.displayName like '%X.X.X.X%' 

Then the the above is a reference to another display name.
I have changed all 4 x.x.x.x to the switch IP but see no report

Should their not be a reference to something like ip=192.168.x.x?

Regards
Photo of Thomas, Frank

Thomas, Frank, Employee

  • 1,902 Points 1k badge 2x thumb
Correct,
The first 3 are for the report itself, having duplicate report ids is a bad thing. You could have the title and category be whatever you like. 

Anyways the in regards to the sql query.
You can try it yourself on the netsight server.
1.) /usr/local/Extreme_Networks/NetSight/scripts$ ./mysql.sh
you'll now be in the sql interface.

2.) Enter the following
SELECT t.displayName AS Name, (truncate(r.val ,3)) AS Utilization
FROM netsightrpt.rpt_default_raw r LEFT OUTER JOIN netsightrpt.rpt_target t
ON r.targetID=t.targetID WHERE r.statisticID=(
SELECT statisticID FROM netsightrpt.rpt_statistic WHERE name="ifUtilization")
AND time_stamp > UNIX_TIMESTAMP(NOW() - INTERVAL 20 MINUTE) * 1000;

This will output 100 stat variables similar to default report.
3.) Add the filter for one of the switches you desire
SELECT t.displayName AS Name, (truncate(r.val ,3)) AS Utilization
FROM netsightrpt.rpt_default_raw r LEFT OUTER JOIN netsightrpt.rpt_target t
ON r.targetID=t.targetID WHERE r.statisticID=(
SELECT statisticID FROM netsightrpt.rpt_statistic WHERE name="ifUtilization")
AND time_stamp > UNIX_TIMESTAMP(NOW() - INTERVAL 20 MINUTE) * 1000 and t.displayName like '%134.141.106.11%' ;

Basically, what we're taking is the t.displayName and filtering the output to a particular IP at that point. My example it would be '%134.141.106.11%'
Photo of Thomas, Frank

Thomas, Frank, Employee

  • 1,902 Points 1k badge 2x thumb
Just a sanity check as well.
You did refresh the tree correct? This reloads the tree with everything from the reports and myreports directory