summarizer

summarizer - Aggregating Records in DB

summarizer command of bounceHammer is for aggregating records in a database or a log file. It aggregate the records by the following fields: A sender's email address (Addresser), A domain part of an Addresser (SenderDomain), A domain part of a Recipient (Destination), Reason of email bounce, HostGroup, and Provider.

And beginning with bounceHammer 2.5.0, Daily Updates function (refer the number of email bounces of each day) has been implemented. This command has been installed in INSTALL-DESTINATION/bin directory.

Usage

summarizer command will aggregate records in a log file which is created by mailboxparser command or is accumulated by logger command. The command also can aggregate records in a database with -D, --database option. It can be refered on WebUI.

Aggregate the records in the log file by HostGroup
# summarizer -a h /path/to/file
 
Aggregate the records in the DB by Addresser
# summarizer -a a -D
 
Aggregate the records in the DB by all the fields
# summarizer --aggregate-all -D
 
Aggregate the records in the log file by Reason and display descriptive statistics
# summarizer -a w -s /path/to/file
 
Add up the records in the DB by month
# summarizer -Us --totalsby m
 
Add up the records in the DB by year
# summarizer --dailyupdates --totalsby y
 
Show help screen
# summarizer --help

Available Options

Options for Aggregation

-A, --aggregate-all
Records will be aggreted by all the fileds: a sender's email address (Addresser), A domain part of an Addresser (SenderDomain), A domain part of a Recipient (Destination), a Reason, a HostGroup, and a Provider.
-a, --aggregate Field Name
Aggregate by the specified field. Available values as a field are a = a sender's email address (Addresser), s = a domain part of Addresser (Sender Domain), d = a domain part of Recipient (Destination), w or r = a Reason of email bounce, h = a HostGroup, and p = a Provider .
-D, --database
Record which will be aggregated is in a Database. This option should be set if you want to aggregate records in a database.

Options for Daily Updates

-U, --dailyupdates (Beginning with Ver. 2.5.0)
This option is for referring records of DailyUpdates (the number of email bounces of each day). When you use summarizer command, Either one of this option or aggregation option (-A,-a, described later) should be specified.
-p, --period Begin:End (Beginning with Ver. 2.5.0)
This option is for referring records of DailyUpdates within a specified period. Available date format is 2011/02/11 or 2011-02-11. For Example, you would like to refer the records of August, the option is --period 2010/08/01:2010/08/31 .
--totalsby Unit (Beginning with Ver. 2.5.0)
Add up Records of DailyUpdates by a specified unit. Available characters are day: Day, week: Week(Default), month: Month, and year: Year.

Common Options for Daily Updates and Aggregation

-b, --before nDays
The command with this option aggregate record of a specified date which is n days before from today (e.g. Today is 11 February 2011, The date is 10 February 2011). summarizer with --before 2 aggregate records of day which is 2 days before from today, --before 4 is 4 days before from today. --before 1 is equals to the option --yesterday (described later).
-d, --date Date-String (Beginning with Ver. 2.5.0)
The command with this option aggregate records of a specified date. If you specify --date 2011/02/11, the records of 11 February 2011 will be aggregated. Available format of date is 2011/02/11 or 2011-02-11 .
-y, --yesterday
Aggregate the records of yesterday. If today is 11 February 2011, The records of 10 February 2011 will be aggregated. This option is equals to the option --before 1 (described earlier).
-t, --today
Aggregate the records of today. This option is equals to the option --before 0 (described earlier).
-s, --summary
This option shows descriptive statistics (Minimum, Mean, Maximum, Standard Deviation) in the tail of the aggregated record.

Ohter Options

-C, --conf /path/to/configuration file
Use an alternative bounceHammer's configuration file. If this option is omitted, the command will use INSTALL-DESTINATION/etc/bouncehammer.cf .
-T, --test
Runs as test mode. This option is equals to the option -C INSTALL-DESTINATION/etc/test-run.cf .
-F, --fotmat Character
Display records as a specified format. When this option is omitted, the results are displayed as a ASCII Table. Available format characters are the following: yaml: YAML, asciitable: ASCII Table, and csv: CSV (Beginning with Ver. 2.5.0)
--silent (Beginning with ver.2.1.0)
Turn silent mode on. This option makes the command quiet in spite of -v, --verbose option (described later). And when the command is called from a daemon (such as sendmail), the command will exit with status 0 in spite of an error. If an MTA process (e.g. /usr/sbin/sendmail) which is called the command without this --silent option stopped by an error, the command will exit with status 75(EX_TEMPFAIL).
-v, --verbose
Turn verbose mode ON.
--help
Display help messages of this command.
--version
Display the version number of this command.
--silent

Screenshots of the running command

summarizer -a hostgroup -vvvv --database -s -p 2010/01/01:2010/12/31

The following screenshot shows that the command aggregate the records in the database by HostGroup and display the resutls and descriptive statistics.

summarizer -a destination -vvvv --yesterday -s

The following screenshot shows that the command aggregate records in yesterday's log file by Destination and display the results and descriptive statistics.

No TrackBacks

TrackBack URL: http://bouncehammer.jp/cgi-bin/mt/mt-tb.cgi/110

Leave a comment