Adding the tlp-to-kafka service

This instruction applies to TLP 1.2.7. If you have a later release of TLP, see the tlp-to-kafka man page.

In IRIS Focus 7, the access to the Kafka cluster is on a different port than it was in Focus 6. Access now requires an authentication token. The details are described in 5.

The steps below require that the vaisala-tlp-to-kafka package is installed on your TLP system. If this package is missing, you can install it by logging in as the root user and running:

dnf install -y vaisala-tlp-to-kafka
  1. Log into your TLP system using the vops user account.
  2. Go to the startup.cfg file in the /opt/vai/tlp/etc directory.
  3. Add the following line to the file:
    core n java tlp-to-kafka -jar /opt/vai/tlp/lib/tlp-to-kafka.jar
  4. Edit the tlp-to-kafka.cfg file in the /opt/vai/tlp/etc directory according to how you want the lightning events to be sent to IRIS Focus:
    • If you want the lightning events sent to IRIS Focus to be composite flash events produced by the TLP, set the lp.tokafka.smqLightning parameter to "smq://fdata".
    • If you want the lightning events sent to IRIS Focus to include the individual lightning strokes produced by the TLP, set the lp.tokafka.smqLightning parameter to "smq://RLFxStrokeData".
    • You can use any shared memory queue of lightning data as the source for IRIS Focus. For example, if your TLP system is producing solutions from both VHF and LF based lightning sensors you can use the standard VHF event queue "smq://sdata3d", the standard VHF flash queue "smq://fdata3d", a merged data set "smq://tldata or smq://wmdata", or some customer filtered queue. If you choose a data set that includes VHF data, you will need the IRIS_VHF_LGT feature enabled in your IRIS Focus license. Depending on your use cases for IRIS Focus, there may be limited use of the forwarding all of the raw VHF data points available in the "smq://sdata3d" shared memory queue as there can be many VHF event points for each lightning discharge.
    • If you have the Lightning Threat Zone feature licensed, make sure that the lightning data source you select includes LF data. The Lightning Threat Zone engine ignores all VHF lightning events in the data stream and only uses the LF events that is sees in the data stream.

    To set the value, type:

    lp.tokafka.smqLightning <parameter-value>

    For example:

    lp.tokafka.smqLightning "smq://RLFxStrokeData"
  5. Access to the Kafka cluster requires an authentication token. The authentication token is randomly generated during the IRIS Focus 7 installation, and it is used in the password field.
    1. To find the value of this token, run the following command as root on the IRIS Focus system (in the example output below, the token is L5KpD55KqxI7kGUuM0mQrmCh9QqONKI4)
      [root@iris-focus ~]# grep kafka.*.ScramLoginModule /etc/vaisala/focus/k8s/vaisala-focus.yaml | head -1
                   config: org.apache.kafka.common.security.scram.ScramLoginModule required username="focus-kafka" password="L5KpD55KqxI7kGUuM0mQrmCh9QqONKI4";
      [root@iris-focus ~]# 
    2. When you have identified the fully qualified domain name and the authentication token for the IRIS Focus connection, go to the /opt/vai/tlp/etc directory on the TLP system, locate the kafka-producers.properties file there, and change the lines as follows:
      bootstrap.servers=helsinki.rd.vaisala.com:9094
      security.protocol=SASL_PLAINTEXT
      sasl.mechanism=SCRAM-SHA-512
      sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required \
         username="focus-kafka" \
         password="L5KpD55KqxI7kGUuM0mQrmCh9QqONKI4";
       
      # How many acknowledgements are required before considering the request complete                                                                                                                                                                                                                                    
      acks=all

      This example assumes that the fully qualified domain name of the IRIS Focus server is helsinki.rd.vaisala.com and that the randomly generated authentication token generated on the IRIS Focus server is L5KpD55KqxI7kGUuM0mQrmCh9QqONKI4. Make the appropriate substitutions for your installation.

  6. Start the tlp-to-kafka service by typing:
    lpstart start tlp-to-kafka

The tlp-to-kafka man page provides more information on configuring and running the tlp-to-kafka service on a TLP system.