Operation

This document describes how to operate the Report Service Manager. The following topics can be found in this document:

Note: The command-line examples in this section have been broken into multiple lines for readability. The commands should be reassembled into a single line prior to execution.

Tool Execution

Report Service Manager can be executed in various ways. This section describes how to run the tool, as well as its behaviors and caveats.

Command-Line Options

The following describes the command-line options available:

usage: report-mgr [options]
 -b,--backup                   Force a backup of all logs in the staging
                               directory
 -c,--cleanup                  Cleanup logs in staging and old logs in final and
                               backup
 -f,--from <from_date>         Only pull log files on or after the date
                               specified with the format mm/dd/yyyy
 -h,--help                     Display usage.
 -i,--id-pattern <pattern>     Only operate on profiles with an ID that matches
                               the given RE pattern
 -n,--node-pattern <pattern>   Only operate on profiles with a node whose name
                               matches the given RE pattern
 -P,--process-logs             Process already downloaded logs
 -p,--pull-logs                Pull logs from remote sources.
 -r,--rebuild-sawmill          Rebuild the Sawmill DB
 -R,--sawmill-reports          Generate Sawmill reports
 -t,--to <to_date>             Only pull log files on or before the date
                               specified with the format mm/dd/yyyy
 -u,--update-sawmill           Update the Sawmill DB
 -v,--verbose <level>          Specify the severity level and above to include
                               in the log: (0=Debug, 1=Info, 2=Warning,
                               3=Error). Default is Info and above (level 1).
 -V,--version                  Display application version.
	

Usage

To pull logs from all nodes, execute the following from the command-line:

$ report-mgr -p
	

To pull logs for a specific node (i.e. img), execute the following:

$ report-mgr -p -n img
	

To pull and process logs, while also backing up the staging area (i.e. rings), run the following:

$ report-mgr -p -P -b -n rings
	

To generate montly metrics for all nodes for a specific month (-f and -t), including pulling the logs (-p) as needed, processing the logs (-P), backup the original downloaded logs (-b), update the sawmill database (-u), and generate the monthly reports (-R), execute the following from the command-line:

$ report-mgr -b -p -P -R -u -f 12/01/2014 -t 12/31/2014