Help Index Home > Report > Script

Query Script

This page allows direct script access to the traffic data. It can be used for the following purposes:

  1. For extracting data into a web-aware application such as Microsoft Excel.
  2. For extracting data into custom scripts written in other languages such as awk or perl.
  3. For running specialized ad-hoc queries that can not be satisfied by any of the existing report sections.
  4. For prototyping queries that will be used in new report templates.

The scripting API is JavaScript(v1.6 with E4X), with predefined classes for accessing data stored by this application, such as traffic history, address mappings, host locations and interface counters.

Running a script

To run a script, simply type or paste it into the Script window, then click Submit. If the query executes successfully, you will see the results, with the following options above:

Querying data from Microsoft Excel

To load data into the cells of an Excel spreadsheet, follow these steps:

Note that it will often be easier to schedule the report to run on the server in the normal way, and then use the URL that points to the HTML view of the results. If you open that url in your Excel spreadsheet, then Excel will find the tabular data that is embedded in the page.

User Authentication

If the access permissions configured under File,Users for the Report,Run page are not set to "Guest" then a login and password must be supplied with the query. Basic authentication can be used in this case.