.. highlight:: rst .. _ql2ql: ##### 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 |scname| system in real time. Like :cite:t:`scimex` but contrary to :cite:t:`scimport` 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: .. code-block:: sh ql2ql -h .. _event_filter: 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: .. code-block:: none 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: .. code-block:: sql MAG >= 6.0 AND PHASES >= 10 AND DEPTH < 100 .. _object_filter: 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 ==================== | :file:`etc/defaults/global.cfg` | :file:`etc/defaults/ql2ql.cfg` | :file:`etc/global.cfg` | :file:`etc/ql2ql.cfg` | :file:`~/.seiscomp/global.cfg` | :file:`~/.seiscomp/ql2ql.cfg` ql2ql inherits :ref:`global options`. .. note:: Modules/plugins may require a license file. The default path to license files is :file:`@DATADIR@/licenses/` which can be overridden by global configuration of the parameter :confval:`gempa.licensePath`. Example: :: gempa.licensePath = @CONFIGDIR@/licenses .. confval:: server Default: ``localhost:18011`` Type: *string* QuakeLink server to push data to .. confval:: gzip Default: ``false`` Type: *boolean* Compress messages pushed to QuakeLink with gzip .. confval:: 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. .. confval:: backLog Default: ``1800`` Unit: *s* Type: *int* Number of seconds to fetch missed updates on start up. .. confval:: hosts Type: *list:string* Registration of QuakeLink hosts. .. _host: .. _host.$name: .. 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 :confval:`hosts` to become active. .. code-block:: sh 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 = ... .. confval:: 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. .. confval:: host.$name.gzip Default: ``false`` Type: *boolean* Enables\/disables GZip \(GNU zip\) compression. .. confval:: host.$name.native Default: ``false`` Type: *boolean* Request native data instead of XML format. Native data export may be disabled on some hosts. .. confval:: 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. .. confval:: 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. .. confval:: 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] .. confval:: host.$name.domain Default: ``event`` Type: *string* Select the object domain that will be requested. Either \"event\" or \"dyfi\". .. _host.$name.data: .. note:: **host.$name.data.\*** *QuakeLink options specifying which XML components to fetch.* *Note: These options are not used if 'native' data is requested.* .. confval:: host.$name.data.picks Default: ``true`` Type: *boolean* Include picks .. confval:: host.$name.data.amplitudes Default: ``true`` Type: *boolean* Include amplitudes .. confval:: host.$name.data.arrivals Default: ``true`` Type: *boolean* Include origin arrivals .. confval:: host.$name.data.staMags Default: ``true`` Type: *boolean* Include origin station magnitudes .. confval:: host.$name.data.staMts Default: ``true`` Type: *boolean* Include moment tensor station contributions and phase settings .. confval:: host.$name.data.preferred Default: ``true`` Type: *boolean* Include only preferred origin and magnitude information Command-Line Options ==================== .. _Generic: Generic ------- .. option:: -h, --help Show help message. .. option:: -V, --version Show version information. .. option:: --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. .. option:: --plugins arg Load given plugins. .. option:: -D, --daemon Run as daemon. This means the application will fork itself and doesn't need to be started with \&. .. _Verbosity: Verbosity --------- .. option:: --verbosity arg Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug. .. option:: -v, --v Increase verbosity level \(may be repeated, eg. \-vv\). .. option:: -q, --quiet Quiet mode: no logging output. .. option:: --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. .. option:: --component arg Limit the logging to a certain component. This option can be given more than once. .. option:: -s, --syslog Use syslog logging backend. The output usually goes to \/var\/lib\/messages. .. option:: -l, --lockfile arg Path to lock file. .. option:: --console arg Send log output to stdout. .. option:: --debug Execute in debug mode. Equivalent to \-\-verbosity\=4 \-\-console\=1 . .. option:: --trace Execute in trace mode. Equivalent to \-\-verbosity\=4 \-\-console\=1 \-\-print\-component\=1 \-\-print\-context\=1 . .. option:: --log-file arg Use alternative log file. .. _Sink: Sink ---- .. option:: --server arg Overrides configuration parameter :confval:`server`. .. option:: -z, --gzip arg Overrides configuration parameter :confval:`gzip`. .. option:: --event-buffer arg Overrides configuration parameter :confval:`bufferSize`. .. option:: --back-log arg Overrides configuration parameter :confval:`backLog`.