User Tools

Site Tools


reporttool

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
reporttool [2007/10/01 16:22]
faltin
reporttool [2011/04/03 19:28] (current)
faltin [Reports]
Line 1: Line 1:
 ====== The report tool ====== ====== The report tool ======
  
-{{tools:​report.png| }} The report tool presents a number of reports with information from your network. The report tool also links to the IP device center, ​to the "IP address scope - graphical view" and the services ​- graphical view.+{{tools:​report.png| }} The report tool presents a number of reports with information from your network. The report tool also links to the "IP address scope - graphical view" and the services ​matrix.
  
 Each NAV report is in essence an SQL query to the database. It shown its data in a number of columns. The Each NAV report is in essence an SQL query to the database. It shown its data in a number of columns. The
 data is in many cases also hyperlinks to other reports or other tools in NAV. The whole report system data is in many cases also hyperlinks to other reports or other tools in NAV. The whole report system
 is highly configurable,​ the basis for the system is the configuration file report.conf. Details on  is highly configurable,​ the basis for the system is the configuration file report.conf. Details on 
-the configuration is provides ​below.+the configuration is provided [[#​report.conf|below]].
  
 ===== Reports ===== ===== Reports =====
Line 12: Line 12:
 An example report showing all your network equipment sorted by type: An example report showing all your network equipment sorted by type:
  
-{{screenshot:​equipmtypes.png?800|The equipment type report}}+{{screenshot:​3.3:​equipmentypes.png|The equipment type report}}
  
 From this report you can drill down on a particularly type and see the number of devices you have of this From this report you can drill down on a particularly type and see the number of devices you have of this
Line 22: Line 22:
  
    * To navigate back to the report home page, use the "​current path" provided below the NAV bar.    * To navigate back to the report home page, use the "​current path" provided below the NAV bar.
-   * The search bars on top are shortcuts ​to interesting reports. The room searc lets you go directly to a room of interest. You may also search for a particular port name, or you may dive directly into the IP device center of a device in interest.+   * The search bars on top are short-cuts ​to interesting reports. The room search ​lets you go directly to a room of interest. You may also search for a particular port name, or you may dive directly into the IP device center of a device in interest.
  
-===== IP Device Center ===== 
  
-The IP device center is a dashboard for a given device showing relevant information. It presents +===== IP address scope - graphical ​view =====
-recent events for the device, if any. If the device is a switch or router a switch port and/or +
-router interface ​view is given.+
  
-{{screenshot:​devcenter.png?​800|IP device center }}+For large networks the task of maintaining the total IP address scope may be a challenge in itself. It is useful to have an overview of all the subnets in operation, and what is more, how full they are, i.e. how many machines they contain. NAV introduces a tabular view that gives an excellent overview on a single page:
  
-===== IP address scope - graphical view =====+{{ screenshot:​3.3:​prefixmatrix.png?​700 |The prefix matrix }} 
 + 
 +A prerequisite for this tool to work is that you have seeded your database with one or more scope prefixes. The scope prefixes defines your total address ​room. You may have both IPv4 and IPv4 scopes. Each scope can be visualized as shown in the example.
  
-For large networks ​the task of maintaining the total IP address scope may be a challenge ​in itselfIt is useful to have an overview of all the subnets ​in operation, ​and whats more, how full they are, i.e. how many machines do they contain. NAV introduces a tabular view that gives an excellent overview on a single page:+You may also use the reserved prefix option ​in Seed DatabaseA reserved prefix ​is a prefix that is allocated for a purpose, but is not yet in production. For more info on registering scope and reserved prefixes [[seedessentials#​prefix|see here]].
  
-{{screenshot:​prefixmatrix.png?​800|The ​prefix matrix ​}}+A brief explanation of the functionality in the prefix matrix:
  
 +  * Layout
 +    * For IPv4 each row is a /24 scope and the columns counts from 0-255
 +    * For IPv6... (to be completed)
 +  * A coloured area means that this prefix is in use or allocated
 +    * reserved prefixes are brown
 +    * in cases where there are many small subnets (meaning too small to display in a good manner), the row is blue
 +    * prefixes in use follow a colour scheme based on their utilization rate: 
 +      * a very heavily used prefix will be red
 +      * a lightly used prefix will have a light colour
 +  * The displayed percentage is the actual percentage of the IP addresses in the prefix that are in use. If you click on this link you will be directed to the machine tracker that can display the actual IP addresses (and mac addresses) that are in use.
 +  * If you click on the row titles on the left you will be directed to a report displaying all prefixes in that area
 +  * If you click on an actual allocated prefix you will e directed to a report displaying details regarding this prefixes ​
 +  * If you uncheck the "Show unused address rows" you will get a collapsed view removing rows where there are no allocations.
 ===== Service matrix ===== ===== Service matrix =====
  
 This tool is quite simple and only useful if you use the NAV service monitor to an extent. It displays This tool is quite simple and only useful if you use the NAV service monitor to an extent. It displays
 all servers and services in a matrix showing operational status. all servers and services in a matrix showing operational status.
 +
  
  
Line 47: Line 60:
 ====== Configuration ====== ====== Configuration ======
  
-As mentioned the report system is higly configurable,​ you can alter the configuration file report.conf. +As mentioned the report system is highly ​configurable,​ you can alter the configuration file "report.local.conf", either ​adding ​new reports ​or overloading existing reports that exists in "​report.conf"​.
-In NAV 3.4 we will strengthen the means of editing reports by adding ​support for local reports+
-see [[devel:​tasklist#​smj3improve_the_report_tool|Task SMJ3]].+
  
-==== report.conf ==== 
  
-The NAV reports are made based on the ''​report.conf''​ configuration file. One can expand this file + 
-with new reports as one likes. Each report is in essence an SQL-query to the database (with some + 
-limitations). It is easy to make hyperlinks ​from data in the report to other reports or elsewhere.+==== Report configuration ==== 
 + 
 +The NAV reports are made based on the ''​report.conf''​ configuration file. You can expand this file 
 +with new reports as you like in ''​report.local.conf''​. Each report is in essence an SQL-query to the database (with some 
 +limitations). It is easy to make hyper links from data in the report to other reports or elsewhere.
  
 An example report is given, this is the router port report: ​ An example report is given, this is the router port report: ​
Line 61: Line 75:
 <​code>​ <​code>​
 gwport { gwport {
 +$description = "​Extended information about router ports.";​
 $sql= " $sql= "
  ​SELECT netbox.sysname,​ gwport.ifindex,​ gwport.interface,​ module.module,​  ​SELECT netbox.sysname,​ gwport.ifindex,​ gwport.interface,​ module.module,​
Line 90: Line 105:
 $url_otherbox="​netbox?​sysname=$otherbox";​ $url_otherbox="​netbox?​sysname=$otherbox";​
 $url_remoteif="​swport?​b1.sysname=$otherbox&​s1.interface=$remoteif";​ $url_remoteif="​swport?​b1.sysname=$otherbox&​s1.interface=$remoteif";​
 +$explain_gwp="​Router Ports";​
 +$sum="​gwport";​
 } }
 </​code>​ </​code>​
  
-The syntax of report.conf is:+The syntax of the report ​configuration ​is:
  
 Each report is enclosed within brackets: Each report is enclosed within brackets:
Line 99: Line 116:
 <​code>​ <​code>​
       r1{       r1{
-              ​... +            ​... 
-              }+          }
 </​code>​ </​code>​
  
 This report is seen as ''​https://​your_nav/​report/​r1''​ This report is seen as ''​https://​your_nav/​report/​r1''​
  
-Further explanation of the report.conf syntax: +Further explanation of the report ​configuration ​syntax:
  
  
 ^Command ​ ^Description | ^Command ​ ^Description |
-|$sql="​SELECT ..."; ​ |The SQL query | +| $description="​...";​ | Textual description of what the report shows | 
-| $title="​..."; ​     |The report title |  +| $sql="​SELECT ..."; ​ | The SQL query | 
-| $name_MYCOL ​ |changes ​the column header. | +| $title="​..."; ​      ​| The report title |  
-| $explain_MYCOL |shows an explanation as popup in the browser when you hold the curser over the column header.| +| $name_MYCOL ​        ​Changes ​the column header. | 
-| $order_by |defines ​the default ordering of the sql query. By clicking on the column headers in the report, you can sort/​reverse sort on other criteria. | +| $explain_MYCOL ​     Shows an explanation as popup in the browser when you hold the curser over the column header.| 
-| $url_MYCOL |makes a hyperlink to another report or elsewhere. Takes parameters from the current report| +| $order_by ​          ​Defines ​the default ordering of the sql query. By clicking on the column headers in the report, you can sort/​reverse sort on other criteria. | 
-| $hide |columns ​that must be included in the $sql because they are used in $url. $hide will not show the column in the report. | +| $url_MYCOL ​         Makes a hyperlink to another report or elsewhere. Takes parameters from the current report| 
-| $extra |extra "​static"​ columns at the right that can be used for hyperlinks | +| $hide               ​Columns ​that must be included in the $sql because they are used in $url. $hide will not show the column in the report. | 
-| $sum |shows the total of a given column (may not work...)|+| $extra ​             Extra "​static"​ columns at the right that can be used for hyperlinks | 
 +| $sum                Show the sum total of a given column (which must contain numeric values) |
  
  
    
  
reporttool.1191248534.txt.gz · Last modified: 2007/10/01 16:22 by faltin