Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# EEWD setup

The Earthquake Early Warning Display [1] (EEWD, Cauzzi et al., 2016) is an open-source Java application, that can receive and display EEW messages broadcast via ActiveMQ [2]. It is not part of the EEW package.

## Installation

Note

Make sure all ports used by ActiveMQ [2] are closed to public access, connection should only be allowed via VPN and from specific client identified by their fixed IP. Do not enable ActiveMQ [2] otherwise.

1. Install and enable ActiveMQ [2] (requires superuser privileges):

       apt install activemq defaultjava-jre
       ln -s /etc/activemq/instances-available/main /etc/activemq/instances-enabled/main
       systemctl status activemq.service

2. Download the Earthquake Early Warning Display [1] software:

       curl -L https://github.com/SED-EEW/EEWD/releases/download/latest/eewd.zip > eewd.zip
       unzip eewd.zip

## Configuration

### ActiveMQ configuration

Note

The following assumes that sceewlog would provide EEW solutions via the ActiveMQ [2] topic `/topic/your-topic-for-alert` on port `61619` (adjust the username and password consistently).

1. Setup ActiveMQ [2] with the following in the `broker` element of `/etc/activemq/instances-enabled/main/activemq.xml`:

       <plugins xmlns:spring="http://www.springframework.org/schema/beans">
            <simpleAuthenticationPlugin>
                 <users>
                      <authenticationUser username="your-ActiveMQ-username" password="your-ActiveMQ-password" groups="everyone,admins,sysWriters" />
                 </users>
            </simpleAuthenticationPlugin>
            <authorizationPlugin>
                 <map>
                      <authorizationMap>
                           <authorizationEntries>
                                <authorizationEntry queue=">" read="admins" write="admins" admin="admins" />
                                <authorizationEntry topic=">" read="admins" write="admins" admin="admins" />
                                <authorizationEntry topic="your-ActiveMQ-topics"   read="everyone" write="sysWriters" admin="sysWriters,admins" />
                                <authorizationEntry topic="ActiveMQ.Advisory.>" read="everyone" write="everyone" admin="everyone"/>
                           </authorizationEntries>
                           <tempDestinationAuthorizationEntry>
                                <tempDestinationAuthorizationEntry read="tempDestinationAdmins" write="tempDestinationAdmins" admin="tempDestinationAdmins"/>
                           </tempDestinationAuthorizationEntry>
                      </authorizationMap>
                 </map>
            </authorizationPlugin>
       </plugins>
       <transportConnectors>
            <transportConnector name="stomp" uri="stomp://0.0.0.0:61618?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
       </transportConnectors>

2. Restart ActiveMQ [2] (requires superuser privileges):

       systemctl status activemq.service

3. Restart sceewlog and check successful connection in the log (`.seiscomp/log/sceewlog.log`):

       seiscomp restart sceewlog

### EEWD configuration

1. Setup Earthquake Early Warning Display [1] with the required adjustments in:

   1. `eewd/data/targets.csv`: The list of EEW target sites.

   2. `eewd/data/stations.csv`: The list of seismic stations.

   3. `eewd/eewd.properties`: The EEWD parameters, e.g., connection credential.

   4. `eewd/openmap.properties`: The map parameters, e.g., background map.

2. Start Earthquake Early Warning Display [1] and check successful connection to ActiveMQ [2] (in the window title, e.g., `EEWD (connected to ...`) and sceewlog (in the lower-right window corner, e.g., `hearbeat: ...` updating every 5s):

       cd eewd && java -jar eewd.jar

## References

Cauzzi, C., Behr, Y. D., Clinton, J., Kastli, P., Elia, L., & Zollo, A. (2016)

  An Open-Source Earthquake Early Warning Display. Seismological Research Letters, 87(3), 737–742, doi:10.1785/0220150284

[1] (1,2,3,4)

https://github.com/SED-EEW/EEWD

[2] (1,2,3,4,5,6,7,8)

https://activemq.apache.org