Initialize the Gmail Message Tracking Beat

Prerequisites

  • The Open Collector is installed. If you have not already installed it, follow the instructions in the Open Collector Installation and User Guide, and then return to this topic.

  • You have the required keys: GCP Credential file contents, GCP Project ID, and the GCP BigQuery Dataset name.

  • The following port is open:

    Direction

    Port

    Protocol

    Source

    Outbound

    443

    HTTPS

    gmtbeat


Initialize the Beat

  1. Confirm the Open Collector is running:

    ./lrctl status
    

    You should see the open_collector and metrics as shown in the following graphic:
    image2020-5-26_16-33-53.png

    If the Open Collector is not running correctly, see the

    Troubleshoot the Open Collector

    topic in the Open Collector Installation and User Guide.


  2. Start the beat:

    ./lrctl gmtbeat start
    


  3. Enter the following details:

    Starting with GMT Beat version 0.1.2, the contents of this user credential file are saved in encrypted format.

    1. GCP credential file contents:
      gmtcred1.png
      gmtcred2.png

    2. GCP Project ID:
      2.PNG

    3. GCP BigQuery Dataset name:
      3.PNG

      To change the dataset name in the beat after changing the configuration, use the following to delete the previous position file and re-enable log collection:

      Bash
      rm /var/lib/docker/volumes/gmtbeat_logs/_data/pos.json
      



    The configuration has been saved and the service has been started successfully.

  4. Check the status of the service:

    ./lrctl gmtbeat status
    

    image2020-5-26_16-35-40.png

Default Config Values for GMTBeat:

S. No.

Field Name

Default Value

1.

project

User Provided

2.

HeartbeatInterval

5m0s 

3.

HeartbeatDisabled

false

4.

CredentialsFile

/beats/gmtbeat/config/gmt_credentials.json 

5.

Datadet

User Provided

6.

NumberOfBackDays

7

7.

Period

10s