Fetch seedlink data and store them into InfluxDB
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dashboard
docker
img
.gitignore
.pre-commit-config.yaml
README.md
delay.py
influx.py
seedlink.py
seedlink2influxdb.py
station.py
threads.py
trace.py

README.md

Seedlink to InfluxDB

Dump seedlink (seismological) time series into InfluxDB. Use Grafana to plot waveforms, real time latency delay, etc. Maps uses the grafana worldmap-panel plugin.

Dockerfile, docker-compse.yml are available here.

Usage

Usage: seedlink2influxdb.py [options]

Options:
  -h, --help            show this help message and exit
  --dbserver=DBSERVER   InfluxDB server name
  --dbport=DBPORT       InfluxDB server port
  --slserver=SLSERVER   seedlink server name
  --slport=SLPORT       seedlink server port
  --fdsnserver=FDSN_SERVER[:PORT]
                        fdsn station server name
  --streams=STREAMS     streams to fetch (regexp): [('.*','.*','.*Z','.*')]
  --flushtime=NUMBER    when to force the data flush to influxdb
  --db=DBNAME           InfluxDB name to use
  --dropdb              [WARNING] drop previous database !
  --keep=NUMBER         how many days to keep data
  --recover             use seedlink statefile to save/get streams from last

Example :

./seedlink2influxdb.py	--dbserver localhost \
						--dbport 8086 \
						--slserver rtserve.resif.fr \
						--fdsnserver http://ws.resif.fr \
						--db eost2 \
						--keep 1

Note :

Fdsnserver request (--fdsnserver option) is optional. It is only used and performed at the begining and could be slow (if too much stations info are requested) ! Data collected are only used to get station coordinates and are converted to geohash, needed to plot measurements on a map.

Screenshot

Delay/Latency Map

Latency & traces for multiple stations:

Waveform, RMS, latency plots for a given station:

InfluxDB

InluxDB data representation (measurements, tags, fields, timestamps).

Measurements:

  • queue: internal messages producer queue (seedlink thread) and consumer queue (influxdb exporter thread)

    • tags
      • type=(consumer|producer)
    • field
      • size=queue size
    • timestamp
  • count : amplitude in count (waveforms)

    • tags
      • channel = channel name (eg. FR.WLS.00.HHZ)
    • field
      • value = amplitude
    • timestamp
  • latency : seedlink packet propagation time from station to datacenter

    • tags
      • channel = channel name
    • field
      • value = latency value
    • timestamp
  • delay : time since last seedlink packet was received

    • tags
      • channel = channel name (eg. FR.WLS.00.HHZ)
      • geohash = station coordinates geohash formated
    • field
      • value = latency value
    • timestamp

Dependencies: