Starting with version 2.4.1 opReports supports user-defined detail levels for the WAN reports, and this document briefly describes how to configure this feature.
opReports ships with a single detail level called "Default" which includes the standard report columns and a few common extras (ResponseTime, InOutErrorDiscards and AvgMaxInOutBits). You can add any number of additional detail levels, which will be shown as options (in numeric order) on the Reporting Options Menu page.
The default set of reporting columns is not modifiable but you can extend the set by specifying any of the following options:
Option Name | Option Description |
---|---|
ResponseTime | shows the system's response time |
InOutErrorDiscards | includes packet discard and error statistics |
AvgMaxInOutBits | includes average and maxima of the data transfer rates |
ErrPct | include maxima of input and output error percentages |
ErrExc | include number of exceptions above |
DiscPct | include maxima of input and output packet discard percentages |
DiscExc | include number of exceptions above wan_discards_exception_threshold |
Util95 | include the 95th percentile of input and output interface utilisation |
UtilExc | include number of exceptions above wanutil_exception_threshold |
To define your own detail level, open conf/opReports.nmis
in an editor and look for the block named ''report_wan_levels
", which should look like this:
'report_wan_levels' => { '1' => { "name"=>"Default", "description" => "The Default report contains a modest default level of details.", "extras" => "ResponseTime,InOutErrorDiscards,AvgMaxInOutBits", }, '2' => { "name"=>"Full Detail", "description" => "The Full Detail report includes all known options.", "extras" => "ResponseTime,InOutErrorDiscards,AvgMaxInOutBits,ErrPct,ErrExc,DiscPct,DiscExc,Util95,UtilExc", }, },
Simply copy one of the existing definition blocks and paste it just before the last closing curly brace, then amend the level definition: First your custom detail level needs to be given an index number and name which define the order and entry text on the menu page. Second, the description text for all report levels will be shown in the right column on the menu page, so it should be kept short. Finally, the entry headed extras
defines what extra columns are to be included in your report. Insert only option names from the table above and separate them by single commas. The order of columns in the report is fixed and how you order your extras
is not relevant.
If your detail level uses the options ErrExc, DiscExc or UtilExc then you will also have to adjust the respective thresholds.
Look for the key "report_rules
" just below the level definitions, which will include a list similar to this:
'wan_error_exception_threshold' => 1.0, 'wan_discards_exception_threshold' => 1.0, 'wanutil_exception_threshold' => 60,
The three values above are given in percent and specify the thresholds for counting exceptions in terms of packet errors, packet discards and interface utilisation percentages, respectively.
Your new report detail levels will show up on the Reporting Option Menu page immediatly after you save the opReports.nmis
file.
To use these detail levels from the command line simply add the argument level=N
to your invocation of opReports.pl, with N
being the index of the desired detail level.