======================================================================
                     Halcyon Monitoring Solutions
                          www.HalcyonInc.com

                          Neuron Data Export 
                            Version 1.16.0

                           README.DataExport
======================================================================



Overview
======================================================================
This README describes the ProcessPerfdbExport utility that is part of
the Halcyon Neuron Management Suite distribution:

The ProcessPerfdbExport utility allows you to export data collected
by the Halcyon Neuron Management Suite from one or more Halcyon Neuron Agents 
into an xml file, or as a graph into an mhtml file.

This file consists of the following sections:
   - Definitions
   - Exporting Data
       - 1) Determine what hosts/agents to export data from
       - 2) Determine what data to export
       - 3) Determine Report/Graph Required properties
       - 4) Determine Report/Graph Optional configuration properties
       - 5) Export Data - Generate graph or report
   - Locations of generated graphs/reports



Definitions
======================================================================
BASEDIR     The base directory where the Halcyon Neuron Management
            Suite was installed. The default value is /opt/HMF. To
            determine the value of BASEDIR, run one of the following
            commands:

            On a Solaris host (for Solaris 10+ zoned environment,
            this must be a non-sparse root zone):

                # pkgparam HALhmfcom BASEDIR

            On a Linux host:

                # rpm -q --queryformat '%{INSTPREFIXES}\n' HALhmfcom

LOCALDIR    The configuration and logfile directory of the Halcyon
            Neuron Management Suite. By default this is /var/opt/HMF.
            To determine LOCALDIR, run on of the one of the following
            commands:

            On a Solaris host (for Solaris 10+ zoned environment,
            this must be a non-sparse root zone):

                # pkgparam HALhmfcom LOCALDIR

            On a Linux host:

                # cat [BASEDIR]/globalInstallVariables | grep LOCALDIR



Exporting Data
======================================================================
In order to export data into either an xml report or an mhtml graph,
the following steps must be performed:


1) Determine what hosts/agents to export data from
----------------------------------------------------------------------
In running this utility, you must provide a list of ids identifying
which Neuron Agents data should be exported from. To determine
which ids to provide, run the utility to list out the agents that
data is being collected from:

    [BASEDIR]/bin/ProcessPerfdbExport -user [USER] -listAssets

where USER is the Neuron Management Suite username. The utility will
ask for the user's password. See section 4 User Management of the
Neuron Management Server User's Guide for information on how to set
up users.

The result will be a table like the following:

    Host Name   Port   Asset Id   Asset Type     Asset Type Id
    ----------------------------------------------------------
    atlantis    6680   620        agent.neuron   12
    discovery   6680   720        agent.neuron   12
    toronto     6680   725        agent.neuron   12

Take note of the Asset Id numbers for the agent hosts you wish to
export data for.


2) Determine what data to export
----------------------------------------------------------------------
In addition to the asset ids, ids for modules, module types, metrics
and metric types can be provided. While they are optional, the more
you provide the more specific the report/graph generated will be.
At least ONE of moduleAssetIds, moduleTypeIds, metricIds, and
metricTypeIds must be provided to the utility.

To determine which ids to provide for any of these parameters, the
utility should be run using the listModules and/or listMetrics 
commands.

For example, to list out the modules run the following:

    [BASEDIR]/bin/ProcessPerfdbExport -user [user] -listModules

where USER is the Neuron Management Suite username. The utility will
ask for the user's password. See section 4 User Management of the
Neuron Management Server User's Guide for information on how to set
up users.

The result will be a table like the following:

    ModuleName   ModuleAssetId   ModuleAssetType   ModuleAssetTypeId
    ----------------------------------------------------------------
    LocalProcs   512             HALProcessAlert   19
    WebProcs     514             HALProcessAlert   19
    WebLogs      621             HALFileSizeAlert  22

Take note of the Module Asset Id numbers and/or the Module Asset
Type Id numbers for the modules you wish to export data for.


3) Determine Report/Graph Required properties
----------------------------------------------------------------------
When exporting data to a report or graph, some additional properties
must be specified in the following parameters:

  reportName - The name given to the generated report.
   startTime - The date and time at which the exported data should 
               start from (of the form YYYY/MM/DD:hh:mm:ss)
     endTime - The date and time at which the exported data should end 
               at (of the form YYYY/MM/DD:hh:mm:ss)


4) Determine Report/Graph Optional configuration properties
----------------------------------------------------------------------
When exporting data to a report or graph, some additional properties
may be provided to better configure what data is returned and how
it is displayed.  These configurations can be specified in the
following parameters:

       cascadeType - The cascade type for the data returned in the 
                     report (AVG, MIN, MAX, LAST) (default is AVG).

        exportType - The type of file the data should be exported to 
                     (xml or mhtml) (default is xml).
                     NOTE: To generate a graph report, set this
                           to mhtml. 

  reportAttributes - A comma separated list of key=value pairs
                     listing graph properties:
                         graphType (LINE, AREA, STACKED)
                         legendPosition (TOP, BOTTOM)
                         height
                         width
                         connectGaps (TRUE, FALSE)
                             If it is detected that data to be
                             graphed contains missing data points
                             set this to TRUE in order to connect
                             the resulting gaps. The default value
                             is FALSE.
                     Default is: 
            graphType=LINE,legendPosition=BOTTOM,height=250,width=400


5) Export Data - Generate graph or report 
----------------------------------------------------------------------
After collecting all the ids and parameters required (as outlined
above), run the ProcessPerfdbExport utility's export command
specifying those parameters.

For example, running the following:

    [BASEDIR]/bin/ProcessPerfdbExport -user admin -export
        -reportName MyReport -startTime 2009/07/08:09:10:11
        -endTime 2009/07/08:17:10:11 -exportType mhtml
        -reportAttributes legendPosition=TOP,height=550,width=750
        -assetIds 620 -moduleAssetIds 512 514

will produce a graph report for data collected from the LocalProcs 
and WebProcs ProcessAlert module instances on atlantis on July 8th.
The graph report will be named "MyReport" and will be setup based
on the given attributes (it will be a line graph as that is the
default graph type).

Please see the following section for information about where the
generated reports can be found.



Locations of generated graphs/reports
======================================================================
By default, generated graphs can be found in the following directory:
  [LOCALDIR]/publish

By default, exported xml data can be found in the following directory:
  [LOCALDIR]/export 



---//---