Next Topic

Previous Topic

Book Contents

Export statistics data

The export statistics data event is capable of exporting collected statistical data for a given period. The data can be exported to CSV files (comma separated text files) for import into spreadsheet applications, or directly to another database via ODBC.

Event settings

The settings for this event are divided into two sections. In the first section the type and source of the exported data is defined.

Export statistics settings

  • Data type - Select the specific type of data to be exported. The data types are organized into categories. To add a data type to the export list, select it and click the Select button. Selected data types are added to the selected list. To remove a data type, select it and click the Remove button.
  • Period - Specify the period to export the data.
  • Object - To select objects for data export, first select the relevant network where the object is located, then select one or more objects from the list and click the Select button. Selected objects are added to the selected objects list. To remove an object from the data export, select it and click the Remove button.

Export options

In this section the details for the CSV file or database export is defined.

Export options settings

  • Export to file - Select this option to export statistics data to a CSV file.
  • Filename - This is the filename of the exported data file. Optionally include the following formatting variables when specifying the filename.
    • %date - the current date
    • %time - the current time
  • Export to database - Select this option to export statistics data to a database via ODBC.
  • Datasource name - The name of a previously defined ODBC datasource.
  • Database name - The name of the database to store the statistics into.
  • Username - If necessary, specify the username to connect to the database with.
  • Password -The password for connecting to the database.

Exporting statistics to a CSV file

When exporting statistics data to a file, Network Monitor produces two files every time the event is executed. The files are placed in the KNM\reports\export folder of the KNM host machine.

One file has the name specified in the Filename box in the event properties. This file contains the raw exported data. The second file has the same name, but has info_ prefixed to the name. This file contains a description of the kind of data that was exported.

The structure of the info file looks like this:

Network name;object name;monitor name;monitor-id;monitor-subid;datatype-id;unit;datatype description

Example

Default network;Backup;Disk utilization (C:);84;0;3;%;Disk utilization

The structure of the data file looks like this:

monitor-id;datatype-id;monitor-subid;timestamp;raw data;comment 

Example

84;3;0;2009/08/05 09:42:57;13.669434;

If the record is considered invalid by Network Monitor, a fixed value of -10000.0 is exported.

Exporting to a database

When exporting statistics data to a database, Network Monitor creates two tables in the database. The first table is called inmDataExportInformation. It has the following structure:

CREATE TABLE inmDataExportInformation (networkName char(128), objectName char(128),monitorName char(128), monitorID integer, atomID integer, dataType integer, unitNamechar(32), exportedDataType char(128));

This table contains information about the data that was exported, similar to to exporting data to a file.

The second table is called inmDataExport. It has the following structure:

CREATE TABLE inmDataExport (monitorID integer, atomID integer, dataType integer, dataTime DATETIME, dataRaw float);

This table contains all of the exported statistics data.

Warning: Network Monitor begins the export of data by dropping tables with these two names. The database user configured for Network Monitor will require appropriate access to DROP, CREATE and INSERT operations on the database in question. Refer to your database manual for information about how to configure a database user.