Examples

3-Systems setup

  • Goal: Parameter exchange between 3 separate SeisComP systems (A, B, C)

  • Setup:

    • Run one QuakeLink instances along with each separate SeisComP system.

    • sc2ql delivers the own Origins to own QuakeLink instance.

    • ql2sc [1] imports Origins from remote QuakeLink instance and sends them to the own messaging system.

    • scevent [3] on the own system associates all Origins.

    • Check the parameters example of the 1+2 system setup for the detailed setup parameters at system A. Repeat for the system B and C.

../_images/quakelink_3systems.png

Figure 2: 3-System setup.

1+2 Systems setup

Parameter exchange at agency A with agencies B, C. Configuration at agency A.

  • Goals:

    • Push Event parameters of agency A to own QuakeLink instance running on the same machine of agency A.

    • Agency A allows secure connection from agencies B, C to QuakeLink at A.

    • Import Origins from agencies B and C to A.

  • Parameters:

    • Global configuration in global.cfg

      agencyID = A
      
    • scevent [3] configuration in scevent.cfg

      # Configures a timespan in seconds to delay event creation. If a new origin
      # arrives which cannot be associated to an existing event, delay the event
      # creation for a certain timespan.
      eventAssociation.delayTimeSpan = 10
      
      # The agencyID of the origin to be delayed.
      eventAssociation.delayFilter.agencyID = B,C
      
    • ql2sc [1] configuration in ql2sc.cfg

      Decide whether to use secure connection (example: hostB) or non-secure connection (example: hostC).

      # Defines a whitelist of agencies that are allowed for processing separated by
      # comma.
      processing.whitelist.agencies = B,C
      
      # Registration of QuakeLink hosts.
      hosts = hostB,hostC
      
      # 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.hostB.url = qls://user:passwd@remotehostB:18010
      # Request server to send keep alive messages to prevent connection reset by
      # firewalls on long idle periods.
      host.hostB.keepAlive = true
      # 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.hostB.filter = "MAG > 5.0 AND AGENCY != 'A'"
      # Request native data instead of XML format. Native data export may be disabled
      # on some hosts.
      host.hostB.native = true
      # Tries to update the event attributes of the target event with the attributes
      # of the source event which includes event type and event certainty. It will
      # not import events but tries to find the associated event of the input
      # preferred origin at the target system and will update the event attributes
      # via journaling.
      host.hostB.syncEventAttributes = false
      
      # 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.hostC.url = ql://remotehostC:18010
      # Request server to send keep alive messages to prevent connection reset by
      # firewalls on long idle periods.
      host.hostC.keepAlive = true
      # Request native data instead of XML format. Native data export may be disabled
      # on some hosts.
      host.hostC.native = true
      # Tries to update the event attributes of the target event with the attributes
      # of the source event which includes event type and event certainty. It will
      # not import events but tries to find the associated event of the input
      # preferred origin at the target system and will update the event attributes
      # via journaling.
      host.hostC.syncEventAttributes = false
      
    • quakelink configuration in quakelink.cfg:

      # Port to listen for data requests
      QL.port = 18010
      
      # Port to listen for plugin data feeds
      QL.pluginPort = 18011
      
      # Path to the access control file. Format: Multiples lines of form 'KEY =
      # VALUE'.
      # KEY: '[DOMAIN].ALLOW|DENY'. VALUE: comma-separated list of IP addresses or
      # network masks. DOMAIN: Allowed values: 'PLUGINS, COMMANDS, URLS'. PLUGINS:
      # Access control of plugin data connections. COMMANDS: Allowed values: 'SET,
      # FORMAT::[NATIVE, GZNATIVE, SUMMARY, XML, GZXML], INFO::[CLIENTS, EVENTS,
      # OPTIONS]'.
      QL.access-list = @ROOTDIR@/etc/quakelink-access.cfg
      # Port to listen for data requests with SSL
      QL.SSL.port = 22
      
      # Path to SSL certificate file
      QL.SSL.certificate = "xyz..."
      
      # Path to SSL private key file
      QL.SSL.key = "xyz..."
      
      # Path to the SSL users database (same format Apache users file). The tool
      # htpasswd can be used with switch "-d" to force usage of crypt() function. MD5
      # is currently not implemented.
      QL.SSL.users = "xyz..."
      
      # Port to listen for HTTPS request
      QL.https.port = 22
      

Import events from an external SeisComP

  • Goal: Read events back in time from a remote QuakeLink server on demand and provide the parameters to QuakeLink in local system.

  • Solution: use ql2sc [1]. The remote is configured in ql2sc.cfg. Example for fetching events from the past 10 days from quakelink which are sent to a SeisComP system:

    ql2sc --backLog 864000 --debug
    

Retrieve event information from a QuakeLink server

  • Goal: Connect to quakelink to fetch the updated event parameters for an event from the QuakeLink server.

  • Solution 1: use qltool. Example for fetching the parameters from event gempa2018abcd and storing in a SCML file:

    qltool -E gempa2018abcd > gempa2018abcd.xml
    

    Solution 2: use the download button in the event browser of the QuakeLink web interface.