sc2ql

QuakeLink plugin to import SeisComP events.

Description

sc2ql is an application to export SeisComP objects, e.g. event parameters, from SeisComP to a QuakeLink server in real time. sc2ql is part of the QuakeLink suite.

The application is demonstrated in the examples.

Please read the command-line help for the options:

sc2ql -h

Configuration

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

sc2ql inherits global options.

QL.server

Type: string

QuakeLink server to push data to Default is localhost:18011.

QL.compression

Type: boolean

Compress messages pushed to QuakeLink with gzip Default is false.

QL.binary

Type: boolean

Encode messages in SeisComP binary format instead of SCML Default is false.

QL.fetchAllAmplitudes

Type: boolean

If enabled then all amplitudes which reference an arrival of the preferred origin are included regardless of being referenced by a magnitude. Otherwise only the amplitudes are included which are referenced by the available station magnitudes. Default is false.

QL.onlyPublishedEvents

Type: boolean

An event is only forwarded to QuakeLink if the preferred origin contains a comment with text “OriginPublished”. Default is false.

QL.indentation

Type: boolean

Use indentation for SCML encoding Default is false.

QL.bufferSize

Type: int

Buffer size in megabytes. If the QuakeLink server is not reachable buffer messages up to X mb in a ring buffer. If the server is reachable again all buffered messages will be sent first. Default is 128.

QL.inventoryFlushTimeout

Type: int

Timeout in seconds. Anytime the inventory is changed (triggered by receiving messages on the INVENTORY group) a timeout is set to this value in order to avoid too many updates. When the timeout expires the complete inventory is sent to QuakeLink. The default value of 60 seconds is a very conservative value to make sure that everything has been processed by eg “seiscomp config” and/or sync_dlsv. Default is 60.

QL.inventoryGroup

Type: string

Name of the inventory group of the source system. Whenever a message from this message group is received it is taken as an inventory update and the inventory flush timer is started. Default is INVENTORY.

Command Line

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, eg 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

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

-s, --syslog

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

-l, --lockfile arg

Path to lock file.

--console arg

Send log output to stdout.

--debug

Debug mode: –verbosity=4 –console=1

--trace

Trace mode: –verbosity=4 –console=1 –print-component=1 –print-context=1

--log-file arg

Use alternative log file.

Messaging

-u, --user arg

Overrides configuration parameter connection.username.

-H, --host arg

Overrides configuration parameter connection.server.

-t, --timeout arg

Overrides configuration parameter connection.timeout.

-g, --primary-group arg

Overrides configuration parameter connection.primaryGroup.

-S, --subscribe-group arg

A group to subscribe to. This option can be given more than once.

--start-stop-msg arg

Sets sending of a start- and a stop message.

Database

--db-driver-list

List all supported database drivers.

-d, --database arg

The database connection string, format: service://user:pwd@host/database. “service” is the name of the database driver which can be queried with “–db-driver-list”.

--config-module arg

The configmodule to use.

--inventory-db arg

Load the inventory from the given database or file, format: [service://]location

--config-db arg

Load the configuration from the given database or file, format: [service://]location

Sink

--test

Test output and read SCML from stdin

--push-inv-only

Send inventory and exit

--server arg

Overrides configuration parameter QL.server.

-z, --gzip arg

Overrides configuration parameter QL.compression.

--bin arg

Overrides configuration parameter QL.binary.

-p, --pretty-print arg

Overrides configuration parameter QL.indentation.

--end-buffer arg

Overrides configuration parameter QL.bufferSize.

Inventory

--inv-group arg

Use notifiers sent to this group as a trigger for inventory updates

--flush-timeout arg

Overrides configuration parameter QL.inventoryFlushTimeout.