Re: BGP Accounting report (including MB/s for any given interval)

From: neil mckee <neil.mckee@inmon.com>
Date: 06/20/06
Message-Id: <85DA4B08-281B-4B86-9BA4-C9FED4002851@inmon.com>

Landon,

I posted a new (gzip'd) version of the report template:

http://www.inmon.com/sample_scripts/ASAccounting.xml.gz

This xml file should go into a directory under /usr/local/inmsf/
report. For example, it could be /usr/local/inmsf/report/contrib/
ASAccounting.xml. (Or, in your case, you can just replace the xml
template you already have).

Adding "rate(bytes)" to the select list didn't help here because the
roll-up by AS required a second pass (sorry if I misled you on
that). If you look at this template you'll see that I added the
Mbits/sec column after the roll-up by AS, using the fact that the
query result table knows his start and end time.

This template supports all the scheduling options you want. Here is
the relevant help page:

http://sentinel.inmon.com/inmsf/help/en/report/edit_timeinterval.shtml

So, for example, here are the steps to schedule it to run every hour
and show the previous hour's data:

1. Create a new report under Report->Edit
2. Add a "accounting>BGP Accounting>Totals by AS" section to it
3. Customize the section to set the interval as "now - 1 hour"
4. Schedule the report to run every hour

If you do that and leave your browser pointing to the "latest" report
under Reports>View, then it will refresh automatically every hour as
new data is available. (Although I imagine if you used it that way
then you might want to use report.chart() to include a pie or trend
chart as well as the tabular data).

To get the daily report, you can repeat these steps to schedule a
new report to run at 2am every night, with the interval set to
"yesterday".

For the weekly report, you can set the interval to "last week".

Hope this helps,

regards,
neil

P.S. If you would really rather do this kind of manipulation in
perl, you could use JavaScript to make just the initial query and
then dump it to stdout using table.printCSV(). See Report>Script for
an example. To do that server-side (bypassing apache) you can invoke
the program /usr/local/inmsf/bin/query and pass the JavaScript in as
standard input.

----
Neil McKee
InMon Corp.
http://www.inmon.com
Received on Tue Jun 20 18:23:22 2006

This archive was generated by hypermail 2.1.8 : 06/20/06 PDT