################################################################################ # Winston ImportEW configuration file ################################################################################ # $Id: ImportEW.config,v 1.3 2006/08/14 17:42:09 dcervelli Exp $ ################################################################################ # Winston ImportEW is a program that gets data from an Earthworm export_* # process. It collects TRACEBUF or TRACEBUF2 messages sent over IP and # stores them in the Winston database. This program can handle out of order # TRACEBUFs. # # This configuration file is simply an unordered list of [key]=[value] pairs. # Some keys can be specified multiple times, essentially making a list. # The different keys for this file are listed below. # # Command-line usage: # java gov.usgs.winston.in.ew.ImportEW [-options] [config file] # or: # java gov.usgs.winston.in.ew.ImportEW --help # to display a list of command-line options. # # If the last item on the command line does not begin with '-' then it is # assumed to be the name of the config file to use. If nothing is specified # then the default, ImportEW.config in the current directory, is used. # ################################################################################ # key: winston.driver # required, unique # 'winston.driver' is the fully qualified class name for the database driver to # use to connect to the Winston database. Most likely you'll never have to # change this. This line is usually @included from a separate file. # # example: # winston.driver=com.mysql.jdbc.Driver # ################################################################################ # key: winston.url # required, unique # 'winston.url' is the jdbc url to connect to the Winston. You'll only have to # change this if the database server resides on a different computer than the # Import program is running on. Of course, you'll have to change the user name # and password to whatever you have set up for your system. This line is # usually @included from a separate file. # # example: # winston.url=jdbc:mysql://localhost/?user=winstonuser&password=winstonpass # ################################################################################ # key: winston.prefix # required, unique # 'winston.prefix' is the prefix to all of the Winston databases. Unless you # already have databases starting with W_ or are running two separated Winstons # in the same database you shouldn't need to change this. This line is usually # @included from a separate file. # # example: # winston.prefix=W # ################################################################################ # key; import.host # required, unique # 'import.host' is the host name or IP address of the Earthworm export_generic # module that is sending us data. # # example: # import.host=192.168.0.121 # ################################################################################ # key: import.port # required, unique # 'import.port' is the port number of the Earthworm export_generic module that # is sending us data. # # example: # import.port=18000 # ################################################################################ # key: import.receiveID # required, unique # 'import.receiveID' is the identification string that is sent from the # Earthworm export_generic module. # # example: # import.receiveID=from_export # ################################################################################ # key: import.sendID # required, unique # 'import.sendID' is the identification string that is sent to the # Earthworm export_generic module from ImportEW # # example: # import.sendID=to_export # ################################################################################ # key: import.heartbeatInterval # required, unique # 'import.heartbeatInterval' is the number of milliseconds between sending # heartbeats to the export. # # example: # import.heartbeatInterval=30000 # ################################################################################ # key: import.expectedHeartbeatInterval # required, unique # 'import.expectedHeartbeatInterval' is the number of milliseconds between # expected heartbeats from the export. # # example: # import.expectedHeartbeatInterval=30000 # ################################################################################ # key: import.timeout # required, unique # 'import.timeout' is the number of milliseconds before socket timeouts. # # example: # import.timeout=10000 # ################################################################################ # key: import.dropTableDelay # required, unique # 'import.dropTableDelay' is the number of seconds to delay between successive # table drops after the GMT day changes. For users with a large number of # channels this can eliminate some slowdown during the GMT day change. # # example: # import.dropTableDelay=10 # ################################################################################ # key: import.log.name # required, unique # 'import.log.name' is the name of the ImportEW log. Each log file will have # a number appended to it. # # example: # import.log.name=ImportEW.log # ################################################################################ # key: import.log.numFiles # required, unique # 'import.log.numFiles' is the number of log files to rotate through. # # example: # import.log.numFiles=10 # ################################################################################ # key: import.log.maxSize # required, unique # 'import.log.numFiles' is the maximum number of bytes for a single log file. # # example: # import.log.maxSize=1000000 #reject ################################################################################ # key: filter # at least one required, multiple allowed # 'filter' specifies a filter for incoming TraceBufs. Each filter needs further # information about how to run. This information is provided on subsequent # lines of the configuration file. All TraceBufs are rejected unless accepted # by one of the filters. # # example: # filter=All # # The following options are available for all filters: # class: a required line that specifies the Java class for the filter # order: the order in which this filter should be applied if there are multiple filters # action: whether to 'reject' or to 'accept' the TraceBuf if it meets the filter's criteria. # log: whether (1) or not (0) to log the acceptance/rejection of a TraceBuf by a filter # # The following filters are available: # gov.usgs.winston.in.ew.TimeFilter: filters TraceBufs by their start time # options: # past: matches if start time is older than this number of seconds, leave undefined to not perform this check # future: matches if start time is in the future more than this number of seconds, leave undefined to not perform this check # # Full example for TimeFilter that rejects all TraceBufs from more than 10 seconds in the future: # filter=TimeFilter # TimeFilter.class=gov.usgs.winston.in.ew.TimeFilter # TimeFilter.order=1 # TimeFilter.future=10 # TimeFilter.action=reject # TimeFilter.log=1 # # gov.usgs.winston.in.ew.MaxDaysFilter: filters TraceBufs by whether or not they are older than the maxDays value in their option set (see below). # There are no options for this filter. # # gov.usgs.winston.in.ew.SCNLFilter: filters TraceBufs by their SCNLs. # options: # scnl: a regular expression for the SCNLs to match. Four space-separated fields. # # Full example for SCNLFilter that accepts all TraceBufs from network AV: # filter=All # All.class=govreject.usgs.winston.in.ew.SCNLFilter # All.order=3 # All.scnl=* * AV * # All.action=accept # # Full example for SCNLFilter that rejects all north component TraceBufs: # filter=RejectNorth # RejectNorth.class=gov.usgs.winston.in.ew.SCNLFilter # RejectNorth.order=2 # RejectNorth.scnl=* .N. * * # RejectNorth.action=reject # ################################################################################ # key: options # options=Default required, multiple allowed # 'options' specify options specific to a class of SCNLs. #reject # The following options are available for each options set: # rsam.delta: the number of seconds behind current time to calculate the average sample value # rsam.duration: the number of seconds used to calculate the RSAM value # timeThreshold: time threshold for whether or not to flush buffered packets to the database # If a currently buffered packet is older than this number of seconds then all packets for this channel # are written to the database. # traceBufThreshold: number of TraceBuf threshold for whether or not to flush buffered packets to the database # If the number of buffered TraceBufs for a channel meets or exceeds this number then all packets for this channel # are written to the database. # maxBacklog: the maximum number of TraceBufs to hold before dropping them # The backlog is used when the database slows down or otherwise malfunctions # maxDays: the maximum number of days to store in the database # Whenever a new GMT day occurs a new table is created that stores the tracebufs # for that day. At that time, ImportEW checks to see if more than # maxDays tables exist for that channel. If so, it drops as many tables as necessary to # get down to maxDays tables. An unspecified or 0 value means to never drop tables. # applyTo: a comma-separated list of four space-separated SCNL regular expressions that specifies which # channels this option set should apply to. # # Here is an example options set that ensures that TraceBufs from vertical components are written # to the database as soon as they come in: # options=Fast # Fast.timeThreshold=1 # Fast.traceBufThreshold=1 # Fast.maxBacklog=200 # Fast.rsam.delta=10 # Fast.rsam.duration=60 # Fast.applyTo=* ..Z * * # import.host= 127.0.0.1 #196.3.3.69 #196.3.3.13 #127.0.0.1 import.port=16006 import.receiveID=from_ew import.sendID=to_ew import.heartbeatInterval=25000 import.expectedHeartbeatInterval=30000 import.timeout=120000 import.dropTableDelay=10 import.log.name=ImportEW.log import.log.numFiles=10 import.log.maxSize=1000000 # include the database connection parameters @include Winston.config # Filters apply to incoming TraceBufs # rejects packets from more than 60 seconds in the future filter=TimeFilter TimeFilter.class=gov.usgs.winston.in.ew.TimeFilter TimeFilter.order=1 TimeFilter.past=-100 TimeFilter.future=60 TimeFilter.action=reject TimeFilter.log=1 # rejecs packets older than the max days allowance filter=MaxDays MaxDays.class=gov.usgs.winston.in.ew.MaxDaysFilter MaxDays.order=0 MaxDays.action=reject MaxDays.log=1 # a final filter that accepts all tracebufs filter=All All.order=3 All.class=gov.usgs.winston.in.ew.SCNLFilter All.scnl=* * * * All.action=accept # Default options options=Default Default.rsam.delta=10 Default.rsam.duration=60 Default.timeThreshold=60 Default.traceBufThreshold=60 Default.maxBacklog=200 Default.maxDays=0 # Fast options (for writing tracebufs immediately to the database) options=Fast Fast.timeThreshold=1 Fast.traceBufThreshold=1 Fast.maxBacklog=200 Fast.rsam.delta=10 Fast.rsam.duration=60 Fast.applyTo=AU.* * * *, TAPA * * *