|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.trinetwatch.emailer.Emailer
Class Emailer is a non-GUI client for SeisNetWatch that monitors an SNW
server and sends status-alert email messages.
Emailer Parameters:
Parameter: -c --configFileName Specifies a configuration file of property values to be loaded. Parameter values placed before this one on the command line may be overwritten by property values in the loaded configuration file. The default value is "emailer.ini" (in the current working directory). Parameter: -g --GUIAcceptorRefFile Specifies the location of the file holding the IOR reference to the GUIAcceptor CORBA object for the NSI server. The parameter value may be a full URL, or, if not a URL, may reference a file. The default value is "gui_acceptor_ior.ref" (in the current working directory). Parameter: -x --maxConnAttempts The maximum # of initial connect-to-server attempts allowed before the program aborts. A value of zero corresponds to "infinity," meaning that connection attempts will continue indefinitely. The default value is 25. Parameter: -b --maxCommLimit The maximum number of station-update communication errors allowed in a row before the program is aborted. A value of zero corresponds to "infinity," meaning that communication attempts will continue indefinitely. The default value is 10. Parameter: -d --daemonMode Specifies that the program is run in "daemon" mode, with no console input requested. The default is false (not "daemon" mode). Parameter: -y --cycleTimeHours The cycle time (in hours) between reports, during which station information is gathered. This can be a floating-point number. The default value is 2.0. Parameter: -k --skipNoChgRepsFlag Specifies that a report will be generated only when station performance changes have occurred. The default is false (report always generated every cycle). Parameter: -u --updateSleepMS The delay between requests for station information updates from the server, specified in milliseconds. The default value is 5000 (5 seconds). Parameter: -t --reportToLevels A report item is generated whenever a station switches to one of the performance level names specified. Any number of valid performance level names may be listed, separated by commas. The default value is "Bad". Parameter: -f --reportFromLevels A report item is generated whenever a station switches from one of the performance level names specified. Any number of valid performance level names may be listed, separated by commas. The default value is "Bad". Parameter: -i --reportIgnoreLevels A report item is not generated if a station switches from or to one of the performance level names specified. Any number of valid performance level names may be listed, separated by commas. The parameter overrides the "reportToLevels" and "reportFromLevels" parameters. The default value is "Unknown". Parameter: -a --reportAtLevels A report item is generated whenever a station is at one of the performance level names specified. Any number of valid performance level names may be listed, separated by commas. The default value is "Bad". Parameter: -N --noChangeReportFlag If set to true then the station change events section of the stations report is not generated. The default value is false (station change section generated). Parameter: -n --noDetailReportFlag If set to true then the detail section of the stations report is not generated. The default value is false (detail section generated). Parameter: -S --smtpServerName The name of SMTP server to use for sending email report messages. The default value is an empty string (no emails sent). Parameter: -F --emailFromAddress The 'From' address to use for email report and alert messages. The default value is an empty string (no emails sent). Parameter: -T --emailToAddresses The list of recipients for email report messages--a comma-separated list of email addresses. The default value is an empty string (no report emails sent). Parameter: -e --alertToAddresses The list of recipients for email alert messages--a comma-separated list of email addresses. The default value is an empty string (no alert emails sent). Parameter: -v --alertTriggerLevels An alert email is generated when a station switches to one of the performance level names specified and stays at that level for the amount of time specified by the 'alertTriggerSecs' parameter (see below). Any number of valid performance level names may be listed, separated by commas. The default value is an empty string (no alert emails sent). Parameter: -A --alertTriggerSecs An alert email is generated when a station (or subset) switches to one of the performance level names specified by the 'alertTriggerLevels' (or 'alertSubsetLevels') parameter and stays at that level for the amount of time (in seconds) specified by this parameter. The default value is zero (no delay before alert email is sent). Parameter: -U --alertSubsetLevels An alert email is generated when all the stations in a subset switch to one of the performance level names specified and stays at that level for the amount of time specified by the 'alertTriggerSecs' parameter (and the 'alertSubsetLevelsFlag' parameter is not set to 'false'). Eligible subsets and stations are configured at the server. Any number of valid performance level names may be listed, separated by commas. The operation of this parameter may be affected by the 'alertSelectSubsets' and 'alertIgnoreSubsets' parameters. Specifying performance-level names via this parameter will also result in same-performance subsets being noted in the emailer reports. The default value is an empty string (no alert emails sent). Parameter: -B --alertSubsetLevelsFlag This optional flag parameter may be used to control whether or not alert email messages are sent when all the stations in a subset switch to any one of the performance levels specified by the 'alertSubsetLevels' parameter. The default value is true (enabled) if 'alertSubsetLevelsFlag' contains level names, otherwise false (disabled). Parameter: -M --alertSelectSubsets This parameter may be used to specify a list of subset names to be that must be matched when generating alert emails via the 'alertSubsetLevels' parameter. Any number of name strings may be listed, separated by commas and with each name surrounded by double-quote characters ("). A simple string-match algorithm is used, where an alert email is generated only when any part of a given subset name matches any 'alertSelectSubsets' entry. If this parameter is not specified or is set to an empty string then all subset names will be accepted. If both the 'alertSelectSubsets' and 'alertIgnoreSubsets' parameters are specified then the 'alertSelectSubsets' parameter will take precedence and the 'alertIgnoreSubsets' parameter will have no effect. Parameter: -O --alertIgnoreSubsets A list of subset names to be ignored when generating alert emails via the 'alertSubsetLevels' parameter. Any number of name strings may be listed, separated by commas and with each name surrounded by double-quote characters ("). A simple string-match algorithm is used, where if any part of a given subset name matches any 'alertIgnoreSubsets' entry then the subset is ignored. If this parameter is not specified or is set to an empty string then no subset names will be ignored. If both the 'alertSelectSubsets' and 'alertIgnoreSubsets' parameters are specified then the 'alertSelectSubsets' parameter will take precedence and the 'alertIgnoreSubsets' parameter will have no effect. Parameter: -s --alertShortMsgFlag If set to true then a short version of the alert message is generated. This short message can be easier to read if viewed on small displays. The default value is false (normal-sized message generated). Parameter: -j --reportSubject If this parameter is set to a non-empty string then the given string will be used as the "Subject:" line entry on all email report messages; otherwise the program generates a subject line for the email messages. The default value is an empty string (program generated subject lines). Parameter: -J --alertSubject If this parameter is set to a non-empty string then the given string will be used as the "Subject:" line entry on all email alert messages; otherwise the program generates a subject line for the email messages. The default value is an empty string (program generated subject lines). Parameter: -I --initSMTPTimeoutSec The timeout value for the initial connection test to the SMTP server, specified in seconds. The default value is 10 (seconds). Parameter: -E --sendSMTPTimeoutSec The timeout value for the send-mail connections made to the SMTP server, specified in seconds. The default value is 120 (2 minutes). Parameter: -P --dontSendPartialFlag If set to false, and a message has some valid and some invalid addresses, then the message is sent anyway. If set to true, the message is not sent to any of the recipients if there is an invalid recipient address. The default is false (send message anyway). Parameter: -D --mailDebugFlag If set to true then JavaMail session debug messages will be sent to the console. The default is false (no debug messages). Parameter: -o --consoleRedirectFileName Specifies a filename that the "standard" output and "standard" error console output streams are redirected into. The default value is an empty string (for no redirection). Parameter: -l --logFileName The filename for log message data output. The default value is "emailer.log" (in the current working directory). Parameter: -L --logfileLogLevel Specifies the level of log data send to log file. The allowed values are: ALL_MSGS, DEBUG, INFO, WARNING, ERROR, NO_MSGS. The default value is INFO. Parameter: -C --consoleLogLevel Specifies the level of log data send to display console. The allowed values are: ALL_MSGS, DEBUG, INFO, WARNING, ERROR, NO_MSGS. The default value is ERROR. Parameter: -m --consoleMonitor Specifies that a live console monitor of station updates is displayed. The default is false (no live monitor). Parameter: -r --reportsFileName The filename in which to save copies of emailed report messages. The default value is "emailer_reports.txt" (in the current working directory). Parameter: -ver --version Displays the program version information. Parameter: -h --help Displays a "help" screen of parameter information.
Constructor Summary | |
Emailer(java.lang.String[] args,
java.lang.String defConfigFnameStr)
Creates an instance of the SNW Emailer object. |
Method Summary | |
static boolean |
isEntryMatch(java.util.Vector vec,
java.lang.String str)
Determines if any part of the given string matches any entry in the given vector. |
static void |
main(java.lang.String[] args)
Program entry point. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Emailer(java.lang.String[] args, java.lang.String defConfigFnameStr)
args
- an array of command-line parameter strings.defConfigFnameStr
- the default configuration file name.Method Detail |
public static boolean isEntryMatch(java.util.Vector vec, java.lang.String str)
vec
- vector to use.str
- string to use.
public static void main(java.lang.String[] args)
args
- array of command-line parameters.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |