ql2ql

QuakeLink (gempa GmbH) to QuakeLink event parameter exchange

Description

ql2ql manages the import of SeisComP objects from one or several QuakeLink servers into a SeisComP system in real time. Like scimex [5] but contrary to scimport [6] the exchange of the SeisComP objects is event based. This means no messages will be exchanged until the exporting system has produced an event.

ql2ql is part of the QuakeLink suite.

Please read the command-line help for more options:

ql2ql -h

Server-side event filter

QuakeLink provides a filter syntax similar to SQL-WHERE clauses which may be used to filter interesting events on the server side:

clause    := condition[ AND|OR [(]clause[)]]
condition := MAG|DEPTH|LAT|LON|PHASES|OTIME|UPDATED [op float|time]|[IS [NOT] NULL]
op        := =|>|>=|<|<=|eq|gt|ge|lt|ge
time      := %Y,%m,%d[,%H,%M,%S,%f]

E.g. the following filter string would select only those events with a minimum magnitude of 6, detected by at least 10 stations and which are shallower than 100km:

MAG >= 6.0 AND PHASES >= 10 AND DEPTH < 100

Server-side object filter

QuakeLink provides a coarse object filter for the most relevant SeisComP objects:

Option

Impact

picks

include picks

amplitudes

include amplitudes

arrivals

include origin arrivals

staMags

include origin station magnitudes

staMts

include moment tensor station contributions and phase settings

preferred

include only preferred origin and magnitude information

Module Configuration

etc/defaults/global.cfg
etc/defaults/ql2ql.cfg
etc/global.cfg
etc/ql2ql.cfg
~/.seiscomp/global.cfg
~/.seiscomp/ql2ql.cfg

ql2ql inherits global options.

Note

Modules/plugins may require a license file. The default path to license files is @DATADIR@/licenses/ which can be overridden by global configuration of the parameter gempa.licensePath. Example:

gempa.licensePath = @CONFIGDIR@/licenses
server

Default: localhost:18011

Type: string

QuakeLink server to push data to

gzip

Default: false

Type: boolean

Compress messages pushed to QuakeLink with gzip

bufferSize

Default: 50

Unit: MiB

Type: int

Buffer size in megabytes (1024*1024 bytes). If the QuakeLink server is not reachable messages up to X MiB are buffered in a ring buffer. If the server is reachable again all buffered messages will be sent first.

backLog

Default: 1800

Unit: s

Type: int

Number of seconds to fetch missed updates on start up.

hosts

Type: list:string

Registration of QuakeLink hosts.

Note

host.$name.* For each host profile a connection to a QuakeLink server is established. $name is a placeholder for the name to be used and needs to be added to hosts to become active.

hosts = a,b
host.a.value1 = ...
host.b.value1 = ...
# c is not active because it has not been added
# to the list of hosts
host.c.value1 = ...
host.$name.url

Default: ql://localhost:18010

Type: string

URL of the QuakeLink service, the scheme ‘qls’ enables SSL.

Format: [ql[s]://][user:pwd@][host][:port].

If set to an empty string the application will run without any QuakeLink connection attempt.

host.$name.gzip

Default: false

Type: boolean

Enables/disables GZip (GNU zip) compression.

host.$name.native

Default: false

Type: boolean

Request native data instead of XML format. Native data export may be disabled on some hosts.

host.$name.keepAlive

Default: false

Type: boolean

Request server to send keep alive message every 30s to prevent connection reset by firewalls on long idle periods. If activated the client will reset the connection if no alive message is received within 60s. The default timeout maybe overridden with the ‘keepAliveTimeout’ parameter.

host.$name.keepAliveTimeout

Default: 60

Unit: s

Type: int

Timeout in seconds to wait for a server response when listening for updates with active keep alive messages (see parameter ‘keepAlive’). The response might be a alive message or a message containing actual data. The value defined here should be larger than the value configured in the QuakeLink server’s ‘keepAliveInterval’ parameter. If undefined a server interval of 30 is assumed and a timeout value of 60s is used. Set the value to 0 to deactivate the timeout entirely.

host.$name.filter

Type: string

SQL like WHERE clause to filter the result set.

clause := condition[ AND|OR [(]clause[)]] __ condition := MAG|DEPTH|LAT|LON|PHASES|OTIME|UPDATED [op float|time]|[IS [NOT] NULL] __ op := =|>|>=|<|<=|eq|gt|ge|lt|ge __ time := %Y,%m,%d[,%H,%M,%S,%f]

host.$name.domain

Default: event

Type: string

Select the object domain that will be requested. Either "event" or "dyfi".

Note

host.$name.data.* QuakeLink options specifying which XML components to fetch. Note: These options are not used if ‘native’ data is requested.

host.$name.data.picks

Default: true

Type: boolean

Include picks

host.$name.data.amplitudes

Default: true

Type: boolean

Include amplitudes

host.$name.data.arrivals

Default: true

Type: boolean

Include origin arrivals

host.$name.data.staMags

Default: true

Type: boolean

Include origin station magnitudes

host.$name.data.staMts

Default: true

Type: boolean

Include moment tensor station contributions and phase settings

host.$name.data.preferred

Default: true

Type: boolean

Include only preferred origin and magnitude information

Command-Line Options

Generic

-h, --help

Show help message.

-V, --version

Show version information.

--config-file arg

Use alternative configuration file. When this option is used the loading of all stages is disabled. Only the given configuration file is parsed and used. To use another name for the configuration create a symbolic link of the application or copy it. Example: scautopick -> scautopick2.

--plugins arg

Load given plugins.

-D, --daemon

Run as daemon. This means the application will fork itself and doesn’t need to be started with &.

Verbosity

--verbosity arg

Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug.

-v, --v

Increase verbosity level (may be repeated, eg. -vv).

-q, --quiet

Quiet mode: no logging output.

--print-component arg

For each log entry print the component right after the log level. By default the component output is enabled for file output but disabled for console output.

--component arg

Limit the logging to a certain component. This option can be given more than once.

-s, --syslog

Use syslog logging backend. The output usually goes to /var/lib/messages.

-l, --lockfile arg

Path to lock file.

--console arg

Send log output to stdout.

--debug

Execute in debug mode. Equivalent to --verbosity=4 --console=1 .

--trace

Execute in trace mode. Equivalent to --verbosity=4 --console=1 --print-component=1 --print-context=1 .

--log-file arg

Use alternative log file.

Sink

--server arg

Overrides configuration parameter server.

-z, --gzip arg

Overrides configuration parameter gzip.

--event-buffer arg

Overrides configuration parameter bufferSize.

--back-log arg

Overrides configuration parameter backLog.