gds¶
Gempa Dissemination Server (GDS)
Description¶
coming soon
Architecture¶
coming soon
Content Filter¶
coming soon
Bulletins¶
coming soon
Spooler¶
coming soon
Command interface¶
telnet localhost 20000
help
[COMMANDS]
HELP [command] Show this/command help
HELLO Test server version
ADDSUBSCRIPTION [params] Add subscription prior to dissemination
ADDQUEUE [params] Add queue prior to dissemination
ADDATTACHMENT [params] Add attachment prior to dissemination
ADDBULLETIN [params] Add bulletin prior to dissemination
DISSEMINATE [params] Trigger dissemination of data
SEND [params] Sends bulletins
PREVIEW Get bulletin previews
GETSUBSCRIPTIONS [params] Get subscriptions for XML data
GETBULLETINS [params] Get subscriptions and bulletins for XML data
RESET Resets session
BYE Close the session
Module Configuration¶
etc/defaults/global.cfg
etc/defaults/gds.cfg
etc/global.cfg
etc/gds.cfg
~/.seiscomp/global.cfg
~/.seiscomp/gds.cfg
gds 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
- database¶
Default:
mysql://sysop:sysop@localhost/gds
Type: string
Connection string to database which contains the dissemination configuration setup.
- dbSequencePrefix¶
Type: string
By default a database sequence is named after the table, suffixed by "_seq": "[tablename]_seq". Sometimes the column name is used as well, e.g. when using postgresql_psycopg2 as Django database back-end. If set, the value of this parameter will be added to the sequence suffix: "[tablename][dbSequencePrefix]_seq"
- bind¶
Default:
127.0.0.1:20000
Type: host-with-port
IP and port to bind the command interface to. Use 0.0.0.0 to bind to all interfaces. Either the port or the IP address may be omitted, e.g. "0.0.0.0" or ":1234". If set to an empty string the application will run without providing a command interface.
- sbind¶
Type: host-with-port
IP and port to listen for data requests with SSL.
- connections¶
Default:
200
Type: int
Maximum number of clients connected simultaneously to the command interface.
- backlog¶
Default:
3600.0
Unit: s
Type: double
Backlog time (in seconds) to fetch and process event data right after the start. Note: The Dissemination Server also stores the update time of the last successfully processed event in LOG_DIR/gds.last_update. The start time of the time window to fetch data from the QuakeLink server (at startup) is calculated from the maximum of both values: max(lastUpdateTime, NOW-backlogSeconds).
- cleanupInterval¶
Default:
0
Unit: s
Type: int
Interval in seconds to trigger DB cleanup routine. The type of information to clean up is configured in Service section of the web front-end.
- spoolOnly¶
Default:
false
Type: boolean
Sets the GDS to exclusive spooler mode. In this mode no quakelink and database connection is established. Also the command interface is not available. If enabled external services need to be configured.
- externalServices¶
Type: list:string
List of services managed outside the GDS. Triggering and content generation is done by an external application. The GDS will only serve as a spooler. Consequently no result is written to the GDS database.
- id¶
Type: string
ID of the GDS instance. Will be added to the event log. Used in HA configurations to distinguish triggering instance.
- SSL.certificate¶
Type: path
Path to SSL certificate file
- SSL.key¶
Type: path
Path to SSL private key file
Note
requestLimits.* Definition of limits for dissemination request at the GDS command interface.
- requestLimits.queues¶
Default:
100
Type: int
Maximum number of queues to trigger, see ADDQUEUE command.
- requestLimits.subscriptions¶
Default:
1000
Type: int
Maximum number of subscriptions to trigger, see ADDSUBSCRIPTION command.
- requestLimits.bulletins¶
Default:
100
Type: int
Maximum number of bulletins to attach, see ADDBULLETIN command.
- requestLimits.attachments¶
Default:
100
Type: int
Maximum number of attachments, see ADDATTACHMENT command.
- requestLimits.attachments¶
Default:
100
Type: int
Maximum number of attachments, see ADDATTACHMENT command.
- requestLimits.docSize¶
Default:
10
Unit: MiB
Type: double
Maximum document size, see ADDBULLETIN and DISSEMINATE commands.
- requestLimits.totalAttachmentSize¶
Default:
30
Unit: MiB
Type: double
Total size of all attachments, see ADDATTACHMENT command.
Note
ha.* Two or more GDS instances may operate in a high availability (HA) configuration sharing one database. Slave instances will only trigger if the master instance fails to disseminate an event after a given timeout.
For maximum reliability the database should be redundant too, e.g. by using a cluster configuration or master-master replication.
- ha.enable¶
Default:
false
Type: boolean
Enable HA feature.
- ha.slave¶
Default:
false
Type: boolean
Mark this GDS instance as slave.
- ha.timeout¶
Default:
10.0
Unit: s
Type: double
Timeout in seconds a GDS slave instance will wait for the master to disseminate an event.
Note
quakelink.* The Dissemination Server connects to the gempa QuakeLink service to obtain archived and continuous event information in SCML (SeisComP Markup Language) format.
- quakelink.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.
- quakelink.gzip¶
Default:
false
Type: boolean
Enables/disables GZip (GNU zip) compression.
- quakelink.native¶
Default:
false
Type: boolean
Request native data instead of XML format. Native data export may be disabled on some hosts.
- quakelink.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.
- quakelink.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.
- quakelink.filter¶
Type: string
SQL like WHERE clause to filter the result set. Example: "AGENCY = ‘GFZ’ AND MAG > 3"
Variables: MAG, DEPTH, LAT, LON, PHASES, UPDATED, OTIME, AGENCY, STATUS, TYPE, REGION, MAG_T
Note
quakelink.data.* QuakeLink options specifying which XML components to fetch. Note: These options are not used if ‘native’ data is requested.
- quakelink.data.indent¶
Default:
false
Type: boolean
Activate XML indentation (pretty print)
- quakelink.data.picks¶
Default:
true
Type: boolean
Include picks
- quakelink.data.amplitudes¶
Default:
true
Type: boolean
Include amplitudes
- quakelink.data.arrivals¶
Default:
true
Type: boolean
Include origin arrivals
- quakelink.data.staMags¶
Default:
true
Type: boolean
Include origin station magnitudes
- quakelink.data.staMts¶
Default:
false
Type: boolean
Include moment tensor station contributions and phase settings
- quakelink.data.preferred¶
Default:
true
Type: boolean
Include only preferred origin and magnitude information
Note
service.$name.* For each service found in the configuration database a service configuration with the same name must exist in the configuration file. $name is a placeholder for the name to be used.
- service.$name.directory¶
Type: string
Service directory (mandatory). For each service a folder must exist where ID.content and ID.address files are stored.
Note
service.$name.filter.primary.* Defines the 1st stage message filter. A message filter application reads SeisComP XML on stdin and writes filtered data on stdout.
- service.$name.filter.primary.cmd¶
Type: string
The full path to the filter application.
- service.$name.filter.primary.mimetype¶
Type: string
Optional MIME type of the filter output. This is necessary to display the output correctly in the web front-end. If empty then either raw, a Python dictionary (as string) or the internal message format is tested for.
- service.$name.filter.primary.timeout¶
Default:
10.0
Unit: s
Type: float
Timeout in seconds after which the command is aborted. Use a negative value to indicate an infinite timeout.
Note
service.$name.filter.secondary.* Defines the 2nd stage message filter. This filter takes the output of the 1st stage and creates the final message to be send. This can be useful if the final output is a binary format, e.g. PDF or image where the output of the 1st stage must be editable in the web front-end.
- service.$name.filter.secondary.cmd¶
Type: string
The full path to the filter application.
- service.$name.filter.secondary.mimetype¶
Type: string
Optional MIME type of the filter output. This is necessary to display the output correctly in the web front-end.
- service.$name.filter.secondary.timeout¶
Default:
10.0
Unit: s
Type: float
Timeout in seconds after which the command is aborted. Use a negative value to indicate an infinite timeout.
Note
service.$name.spooler.* A Spooler (optional) is launched by the server in a separate thread and polls the spool directory for new data. If an address file is found the configured spooler application is executed passing the base name of the address file as a command line parameter.
- service.$name.spooler.cmd¶
Type: string
Spool command to execute.
- service.$name.spooler.maxFileAge¶
Default:
3600
Unit: s
Type: int
Maximum file age in seconds. Files older this timespan will be deleted without processing.
- service.$name.spooler.interval¶
Default:
10.0
Unit: s
Type: float
Polling interval in seconds the spooler will scan the service directory for new files.
- service.$name.spooler.timeout¶
Default:
-1.0
Unit: s
Type: float
Timeout in seconds after which the command is aborted. Use a negative value to indicate an infinite timeout.
Note
filter.* Custom filter application. The default filter application defined by ‘service.$name.filter’ may be overridden for each subscription. These custom filter applications must be declared in the configuration database and the binary must be configured here. Without a valid configuration parameter the default service filter (if any) is executed.
Note
filter.$name.* $name is a placeholder for the name to be used.
Note
filter.$name.primary.* Defines the 1st stage message filter. A message filter application reads SeisComP XML on stdin and writes filtered data on stdout.
- filter.$name.primary.cmd¶
Type: string
The full path to the filter application.
- filter.$name.primary.mimetype¶
Type: string
Optional MIME type of the filter output. This is necessary to display the output correctly in the web front-end.
- filter.$name.primary.timeout¶
Default:
10.0
Unit: s
Type: float
Timeout in seconds after which the command is aborted. Use a negative value to indicate an infinite timeout.
Note
filter.$name.secondary.* Defines the 2nd stage message filter. This filter takes the output of the 1st stage and creates the final message to be send. This can be useful if the final output is a binary format, e.g. PDF or image where the output of the 1st stage must be editable in the web front-end.
- filter.$name.secondary.cmd¶
Type: string
The full path to the filter application.
- filter.$name.secondary.mimetype¶
Type: string
Optional MIME type of the filter output. This is necessary to display the output correctly in the web front-end.
- filter.$name.secondary.timeout¶
Default:
10.0
Unit: s
Type: float
Timeout in seconds after which the command is aborted. Use a negative value to indicate an infinite timeout.
Note
criterion.$name.* Typically criteria are defined in the GDS front-end. If the configuration options available in the front-end do not suffice, custom criterion scripts may be used. A custom criterion script is feed by SCML on stdin and must exit with code 0 indicating a match. $name is a placeholder for the name to be used.
- criterion.$name.cmd¶
Type: string
The full path to the criterion application.
- criterion.$name.timeout¶
Default:
10.0
Unit: s
Type: float
Timeout in seconds after which the command is aborted. Use a negative value to indicate an infinite timeout.
Command-Line Options¶
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. Example: 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¶
Limit the logging to a certain component. This option can be given more than once.
- -s, --syslog¶
Use syslog logging backend. The output usually goes to /var/lib/messages.
- -l, --lockfile arg¶
Path to lock file.
- --console arg¶
Send log output to stdout.
- --debug¶
Execute in debug mode. Equivalent to --verbosity=4 --console=1 .
- --trace¶
Execute in trace mode. Equivalent to --verbosity=4 --console=1 --print-component=1 --print-context=1 .
- --log-file arg¶
Use alternative log file.
Dissemination¶
Test Mode¶
- --xml arg¶
File to read SCML event data from. Supports ZLIB (*.zip) and GZIP (*.gz, *.gzip, *.gzxml) compressed files.
In test mode only one particular event is disseminated and afterwards the server is shutdown. Neither a connection to the QuakeLink server is established nor the command interface is bound.
- --contact arg¶
Read contacts from file, works only in combination with --xml. If unset query contacts from database.
QuakeLink¶
- -Q, --quakelink arg¶
Overrides configuration parameter
quakelink.url
.
- -z, --gzip¶
Overrides configuration parameter
quakelink.gzip
.