router RecordStream

router is a RecordStream implementation that routes requests for particular channels to a configured RecordStream source. The router recordstream is provided by the gempa plugin rsrouter located in @DATADIR@/plugins/rsrouter.so of the recordstream software package.

Application

The router RecordStream is in particular useful to avoid archiving large amounts of data which are avilable on mulitple public sources:

  1. Real-time data is received, e.g., from a Seedlink or CAPS server but only archived for a short period of time or not at all,

  2. The data can be later retrieved from different sources which are specific to networks, stations, location and even streams (routing). The routing table is provided in a configured file.

Setup

Add the rsrouter plugin, the RecordStream parameters and the routing table to your module configuration. Write the URI to the data provider and the network codes in the routing table file, e.g. router.conf. It is a simple text file where each line contains a target URI and a list of channel IDs which must have wildcards for unspecified components. The first occurrence takes priority, e.g. CX.PB01.* wins over CX.* when configured in this order.

Note

router can be combined with other RecordStream implementations available in SeisComP or in CAPS.

Examples

  1. Run a local Seedlink server which receives data from multiple real-time sources. Archive the data only from some but not all stations. For accessing non-real-time data, fetch the archived data from a local SDS archive but from different FDSN servers otherwise. Here, the Seedlink server keeps the data for 3 hours. Thus, only after 3 hours archived data is considered.

    • Global configuration (global.cfg):

      plugins = ${plugins}, rsrouter
      
      recordstream = combined://slink/localhost:18000;router/@SYSTEMCONFIGDIR@/router.conf??rtMax=3h
      
    • Routing table (@SYSTEMCONFIGDIR@/router.conf):

      # local
      sdsarchive:///home/sysop/seiscomp/var/lib/archive GR.CLL.*
      
      # GEOFON FDSNWS
      fdsnws://geofon.gfz-potsdam.de GR.*
      
      # IRIS FDSNWS
      fdsnws://service.iris.edu II.*
      
      # all others:
      sdsarchive:///home/sysop/seiscomp/var/lib/archive
      
  2. Use one local host for providing real-time and archived data from the CX network by a CAPS server but a different remote FDSN server for the GE network.

    • Global configuration (global.cfg):

      plugins = ${plugins}, rsrouter
      
      recordstream = router://@SYSTEMCONFIGDIR@/router.conf
      
    • Routing table (@SYSTEMCONFIGDIR@/router.conf):

      caps://localhost:18002 CX.*
      combined://slink/geofon.gfz-potsdam.de:18000;fdsnws/geofon.gfz-potsdam.de:18001 GE.*
      
  3. Get real-time data from a CAPS server where it is stored for 3 hours. Older data is fetched from remote servers. The servers depend on the network. Some data, in this case from the CX network, remains locally stored.

    • Global configuration (global.cfg):

      plugins = ${plugins}, rsrouter
      
      recordstream = combined://caps/localhost:18002;router/@SYSTEMCONFIGDIR@/router.conf??rtMax=3h
      
    • Routing table (@SYSTEMCONFIGDIR@/router.conf):

      fdsnws://eida.bgr.de GR.*
      fdsnws://geofon.gfz-potsdam.de GE.*
      
      caps://localhost CX.*