This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
ImportEW.config
302 lines (295 loc) · 11.5 KB
/
ImportEW.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
################################################################################
# Winston ImportEW configuration file
################################################################################
# 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.volcanoes.winston.in.ew.ImportEW [-options] [config file]
# or:
# java gov.usgs.volcanoes.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: winston.statementCacheCap
# optional, unique
# 'winston.statementCacheCap' is the the size of the prepared statement cache.
# A good starting point for this setting is twice the number of channels being
# imported. This line is usually @included from a separate file.
#
# example:
# winston.statementCacheCap=200
#
################################################################################
# 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.enableValarmView
# optional, unique
# 'import.enableValarmView' controls creation of views intended to be used with
# the VAlarm package.
#
# example:
# import.enableValarmView=false
#################################################################################
# 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
# terminal: If true, matching tracebufs will not be passed to further filters.
#
# The following filters are available:
# gov.usgs.volcanoes.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.volcanoes.winston.in.ew.TimeFilter
# TimeFilter.order=1
# TimeFilter.future=10
# TimeFilter.action=reject
# TimeFilter.log=1
# TimeFilter.terminal=true
#
# gov.usgs.volcanoes.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.volcanoes.winston.in.ew.SCNLFilter: filters TraceBufs by their SCNLs.
# options:
# scnl: a regular expression for the SCNLs to match. Four space-separated fields.
#
# gov.usgs.volcanoes.winston.in.ew.McCalPulseFilter: Identifies McVCO calibration pulses
# options:
# preambleFreq: McVCO preamble frequency. Default 21.25
# threshold: preamble detection limit. Default 500
#
# Full example for SCNLFilter that accepts all TraceBufs from network AV:
# filter=All
# All.class=gov.usgs.volcanoes.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.volcanoes.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.
#
# 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=130.118.183.9
import.port=15003
import.receiveID=AVO
import.sendID=AVO
import.heartbeatInterval=30000
import.expectedHeartbeatInterval=30000
import.timeout=60000
import.dropTableDelay=10
import.log.name=ImportEW.log
import.log.numFiles=10
import.log.maxSize=1000000
import.createValarmView=false
# include the database connection parameters
@include Winston.config
# Filters apply to incoming TraceBufs
# rejects packets from more than 10 seconds in the future
filter=TimeFilter
TimeFilter.class=gov.usgs.volcanoes.winston.in.ew.TimeFilter
TimeFilter.order=1
#TimeFilter.past=-100
TimeFilter.future=10
TimeFilter.action=reject
TimeFilter.log=1
# rejecs packets older than the max days allowance
filter=MaxDays
MaxDays.class=gov.usgs.volcanoes.winston.in.ew.MaxDaysFilter
MaxDays.order=0
MaxDays.action=reject
MaxDays.log=1
filter=McCalPulse
McCalPulse.class=gov.usgs.volcanoes.winston.in.ew.McCalPulseFilter
McCalPulse.order=0
McCalPulse.threshold=500
McCalPulse.terminal=false
# a final filter that accepts all tracebufs
filter=All
All.order=3
All.class=gov.usgs.volcanoes.winston.in.ew.SCNLFilter
All.scnl=* * * *
All.action=accept
# Default options
options=Default
Default.rsam.enable=true
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 * * *