You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

274 lines
15 KiB
HTML

<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8" />
<title>Enable local FDSNWS server &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<link rel="shortcut icon" href="../../_static/favicon.ico"/>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Play back archived waveforms" href="waveformplayback.html" />
<link rel="prev" title="Add real-time stations from GEOFON" href="geofon_waveforms.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">5.3.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="waveformplayback.html" title="Play back archived waveforms"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="geofon_waveforms.html" title="Add real-time stations from GEOFON"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<div class="section" id="enable-local-fdsnws-server">
<span id="tutorials-servefdsnws"></span><h1>Enable local FDSNWS server<a class="headerlink" href="#enable-local-fdsnws-server" title="Permalink to this headline"></a></h1>
<p>You will …</p>
<ul class="simple">
<li><p>Enable FDSN web service by <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a> to serve waveforms and inventory for
a configured station</p></li>
</ul>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p>Tutorial on <a class="reference internal" href="archiving.html#tutorials-archiving"><span class="std std-ref">Set up local waveform archiving</span></a></p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p>The station meta data and waveforms are available from a local web server</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>10 minutes</p></li>
</ul>
<hr class="docutils" />
<p>By default, <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a> will serve the three FDSN web services</p>
<ul class="simple">
<li><p>fdsnws-dataselect</p></li>
<li><p>fdsnws-event</p></li>
<li><p>fdsnws-station</p></li>
</ul>
<p>on a server running locally on port 8080.</p>
<p>The additional <em>availability</em> feature allows users to obtain information
on continuous data segments in the waveform archive.
This information is written to the
<a class="reference internal" href="../concepts/database.html#concepts-database"><span class="std std-ref">database</span></a> by <a class="reference internal" href="../../apps/scardac.html#scardac"><span class="std std-ref">scardac</span></a>.
To active the availability feature set <a class="reference internal" href="../../apps/fdsnws.html#confval-serveAvailability"><code class="xref std std-confval docutils literal notranslate"><span class="pre">serveAvailability</span></code></a> and
<a class="reference internal" href="../../apps/fdsnws.html#confval-dataAvailability.enable"><code class="xref std std-confval docutils literal notranslate"><span class="pre">dataAvailability.enable</span></code></a> to true.
The availability information can be retrieved using <a class="reference internal" href="../../apps/scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a> or <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a>.</p>
<div class="section" id="set-up">
<h2>Set-up<a class="headerlink" href="#set-up" title="Permalink to this headline"></a></h2>
<ol class="arabic">
<li><p>Configure <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a>:</p>
<ul class="simple">
<li><p>set the <a class="reference internal" href="../concepts/recordstream.html#concepts-recordstream"><span class="std std-ref">RecordStream</span></a> to point to archived data.</p></li>
<li><p>configured and enable the desired services.</p></li>
</ul>
</li>
<li><p>Enable and start fdsnws locally:</p>
<ul>
<li><p>in <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>, go to the System tab.
Click on the line for the “fdsnws” module, and press “Enable module(s)”.
Then restart SeisComP.</p></li>
<li><p>or from the command line</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ seiscomp <span class="nb">enable</span> fdsnws
$ seiscomp start fdsnws
</pre></div>
</div>
</li>
</ul>
</li>
<li><p>Test by <a class="reference internal" href="#tutorials-servefdsnws-visit"><span class="std std-ref">visiting the locally started fdsnws</span></a>.</p></li>
</ol>
<p>Logging information goes to <code class="file docutils literal notranslate"><span class="pre">~/.seiscomp/log/fdsnws.log</span></code> by default.
Information about requests handled goes to the file named in <cite>accessLog</cite>,
if you set this.</p>
<p>To see the available configuration options, go to the Modules tab in
<a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a>.
Under Utilities open “fdsnws” to reveal the options.
To disable fdsnws-event, for instance, unlock the “serveEvent” area
and uncheck this parameter.</p>
<p>You can limit the choice of stations shared to be less than what is in your
SeisComP <a class="reference internal" href="../concepts/inventory.html#concepts-inventory"><span class="std std-ref">inventory</span></a> using the <cite>allowRestricted</cite>,
<cite>dataSelectFilter</cite> and <cite>stationFilter</cite> options.</p>
</div>
<div class="section" id="visiting-the-service">
<span id="tutorials-servefdsnws-visit"></span><h2>Visiting the Service<a class="headerlink" href="#visiting-the-service" title="Permalink to this headline"></a></h2>
<p>Once <a class="reference internal" href="../../apps/fdsnws.html#fdsnws"><span class="std std-ref">fdsnws</span></a> is running, you can visit the local web server
that it runs.
In your browser, visit <a class="reference external" href="http://localhost:8080/fdsnws/dataselect/1/">http://localhost:8080/fdsnws/dataselect/1/</a></p>
<div class="figure align-center" id="id2">
<a class="reference internal image-reference" href="../../_images/servefdsnws_dataselect.png"><img alt="../../_images/servefdsnws_dataselect.png" src="../../_images/servefdsnws_dataselect.png" style="width: 16cm;" /></a>
<p class="caption"><span class="caption-text">Information screen shown by fdsnws-dataselect at
<a class="reference external" href="http://localhost:8080/fdsnws/dataselect/1/">http://localhost:8080/fdsnws/dataselect/1/</a></span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</div>
</div>
<div class="section" id="check-it-works">
<h2>Check it Works<a class="headerlink" href="#check-it-works" title="Permalink to this headline"></a></h2>
<ul>
<li><p>If you visit the URL <a class="reference external" href="http://localhost:8080/fdsnws/dataselect/1/version">http://localhost:8080/fdsnws/dataselect/1/version</a>
you should receive a version number string - currently <cite>1.1.0</cite>.</p></li>
<li><p>To view all activated services visit <a class="reference external" href="http://localhost:8080/fdsnws/">http://localhost:8080/fdsnws/</a></p></li>
<li><p>The fdsnws-station service should give a list of networks configured
and served by the service, e.g. visiting
<a class="reference external" href="http://localhost:8080/fdsnws/station/1/query?level=network&amp;format=text">http://localhost:8080/fdsnws/station/1/query?level=network&amp;format=text</a>
produces</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1">#Network|Description|StartTime|EndTime|TotalStations</span>
GE<span class="p">|</span>GEOFON Program, GFZ Potsdam, Germany<span class="p">|</span><span class="m">1993</span>-01-01T00:00:00<span class="o">||</span><span class="m">84</span>
</pre></div>
</div>
<p>Omitting the <cite>format=text</cite> argument in the query string of the above URL
results in the service returning a StationXML file.</p>
</li>
</ul>
<div class="figure align-center" id="id3">
<a class="reference internal image-reference" href="../../_images/servefdsnws_stationxml.png"><img alt="../../_images/servefdsnws_stationxml.png" src="../../_images/servefdsnws_stationxml.png" style="width: 16cm;" /></a>
<p class="caption"><span class="caption-text">Example of StationXML returned by the fdsnws-station service at</span><a class="headerlink" href="#id3" title="Permalink to this image"></a></p>
<div class="legend">
<p><a class="reference external" href="http://localhost:8080/fdsnws/station/1/query?level=network">http://localhost:8080/fdsnws/station/1/query?level=network</a></p>
</div>
</div>
</div>
<div class="section" id="further-information">
<h2>Further Information<a class="headerlink" href="#further-information" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p>The <a class="reference external" href="https://geofon.gfz-potsdam.de/waveform/builder.php">URL Builder at GEOFON</a>
lets you fill out a form to tailor your request.
The URL to use to make your request is displayed at the bottom of that page.</p></li>
<li><p>More example requests are at the
<a class="reference external" href="https://geofon.gfz-potsdam.de/waveform/webservices.php">FDSNWS description at GEOFON</a></p></li>
<li><p>The FDSN Web Services specification document <span id="id1">[<a class="reference internal" href="../references.html#id102" title="FDSN Web Service Specifications. International Federation of Digital Seismograph Networks. URL: http://www.fdsn.org/webservices/FDSN-WS-Specifications-1.2.pdf.">5</a>]</span> provides the
technical documentation and examples.</p></li>
</ul>
</div>
<div class="section" id="final-tests">
<h2>Final Tests<a class="headerlink" href="#final-tests" title="Permalink to this headline"></a></h2>
<ul>
<li><p>The station should now be visible when you query your local fdsnws instance.
In your browser, visit
<a class="reference external" href="http://localhost:8080/fdsnws/station/1/query?format=text">http://localhost:8080/fdsnws/station/1/query?format=text</a>
to see a list of all channels available from your fdsnws server.</p></li>
<li><p>Request waveform data like this:</p>
<p><a class="reference external" href="http://localhost:8080/fdsnws/dataselect/1/query?start=2020-01-01T01:01:01&amp;end=2020-01-01T02:00:00">http://localhost:8080/fdsnws/dataselect/1/query?start=2020-01-01T01:01:01&amp;end=2020-01-01T02:00:00</a></p>
<p>Dont forget to adjust your start and end times to match the data
actually present in your archive.
The above example is just for the first hour of 2020.</p>
</li>
</ul>
</div>
</div>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Enable local FDSNWS server</a><ul>
<li><a class="reference internal" href="#set-up">Set-up</a></li>
<li><a class="reference internal" href="#visiting-the-service">Visiting the Service</a></li>
<li><a class="reference internal" href="#check-it-works">Check it Works</a></li>
<li><a class="reference internal" href="#further-information">Further Information</a></li>
<li><a class="reference internal" href="#final-tests">Final Tests</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="geofon_waveforms.html"
title="previous chapter">Add real-time stations from GEOFON</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="waveformplayback.html"
title="next chapter">Play back archived waveforms</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/servefdsnws.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>5.3.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>