caps2caps

caps2caps synchronizes CAPS servers in real-time

Description

caps2caps can connect two CAPS server instances to synchronize the data in real time. When one server 1 fails and the other one, server 2, continues to operate, the server 1 can back fill the data as soon as it becomes alive again.

caps2caps can run on either side to pull the data from the other server or to push the data to this server.

../_images/caps2caps.png

caps2caps connects 2 CAPS servers.

Configuration

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

caps2caps 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
streams

Type: string

Comma separated list of streams. Stream format is [NET.STA.LOC.CHA]. Streams may contain wildcards

begin

Type: string

Start time of data time window, default is ‘GMT’. Date time format is [YYYY-MM-DD HH:MM:SS]

end

Type: string

End time of data time window. Date time format is [YYYY-MM-DD HH:MM:SS]

days

Type: int

Use to set the start time of data time window n days before the current time Default is -1.

daysBefore

Type: int

Use to set the end time of data time window n days before the current time Default is -1.

timeWindowUpdateInterval

Type: int

Unit: s

Sets the interval in seconds at which the relative request time window defined by option days and/or daysBefore is updated. Use a value less or equal zero to disable the update. This feature is supported in archive mode only. A typical use case is when data has to be transmitted continuously with a time delay. Default is -1.

realtime

Type: boolean

Enable/disable realtime mode Default is true.

outOfOrder

Type: boolean

Enable/disable out of order mode Default is false.

input.address

Type: string

Data input URL [[caps|capss]://][user:pass@]host[:port]

output.address

Type: string

Data output URL [[caps|capss]://][user:pass@]host[:port] Default is localhost:18003.

output.bufferSize

Type: uint

Unit: byte

Size (bytes) of the packet buffer Default is 1048576.

output.backfillingBufferSize

Type: uint

Unit: s

Length of backfilling buffer which is a tool to mitigate out-of-order data. Whenever a gap is detected, records will be held in a buffer and not sent out. Records are flushed from front to back if the buffer size is exceeded. A value of 0 will disable this feature. Default is 0.

output.mseed

Type: boolean

Enables Steim2 encoding for received RAW packets Default is false.

output.timeout

Type: int

Unit: s

Timeout when sending a packet. If the timeout expires the connection will be closed and re-established. Default is 60.

journal.file

Type: string

File to store stream states Default is @ROOTDIR@/var/run/caps2caps/journal.

journal.flush

Type: uint

Unit: s

Flush stream states to disk every n seconds Default is 10.

journal.waitForAck

Type: uint

Unit: s

Wait when a sync has been forced, up to n seconds Default is 60.

journal.waitForLastAck

Type: uint

Unit: s

Wait on shutdown to receive acknownledgement messages, up to n seconds Default is 5.

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.

Input

-I, --input arg

Overrides configuration parameter input.address.

Output

-O, --output arg

Data output host

-b, --buffer-size arg

Size (bytes) of the journal buffer, if exceeded a sync of the journal is forced.

--mseed

Enables Steim2 encoding for received RAW packets

Streams

-i, --inventory arg

Inventory XML defining streams to add

-A, --add-stream arg

List of streamIDs [net.sta.loc.cha] to add, wildcards supported.

--begin arg

Request start time. Applied only on streams not found in the journal.

--days arg

Request start time in days before now. Applied only on streams not found in the journal.

--days-before arg

End time of data time window n days before the current time.

--end arg

Request end time.

Mode

--archive

Disables realtime mode. Only archived data is fetched.

--out-of-order

Enables out of order mode.

Journal

-j, --journal arg

File to store stream states. Use an empty string to log to standard out.

-f, --flush arg

Flush stream states to disk every n seconds

--waitForAck arg

Wait when a sync has been forced, up to n seconds

-w, --waitForLastAck arg

Wait on shutdown to receive acknownledgement messages, up to n seconds