Gmail Trace Logs Source
This source was originally developed for Gmail logs in BigQuery, which has been replaced by Google Workspace logs and reports in BigQuery.
You'll need to use our Google BigQuery source instead (see Example 3: Query Gmail Logs).
The Gmail Trace Logs integration pulls the Gmail log from the BigQuery using BigQuery Library APIs and ingests them into the Sumo Logic to store, analyze, and alert.
Data collected​
Polling Interval | Data |
---|---|
5 min | Set up Gmail logs in BigQuery |
5 min | Schema for Gmail logs in BigQuery |
Setup​
Vendor configuration​
Follow the below steps to get the Service Account's Credential JSON file to to complete the authorization process.
- Open IAM & Admin under Google Cloud Console.
- Select the Service Account tab.
- From the project dropdown button, select the project where you will run the BigQuery jobs.
- Click on Create a Service Account and follow the instructions in Create service accounts google cloud docs.
- Click on the email address provisioned during the creation and then click the KEYS tab.
- Click ADD KEY and choose Create new key.
- Select key type as JSON.
- Click Create. A JSON key file is downloaded to your computer.
Source configuration​
When you create an Gmail Trace Logs Source, you add it to a Hosted Collector. Before creating the Source, identify the Hosted Collector you want to use or create a new Hosted Collector. For instructions, see Configure a Hosted Collector.
To configure Gmail Trace Logs Source:
- Classic UI. In the main Sumo Logic menu, select Manage Data > Collection > Collection.
New UI. In the Sumo Logic top menu select Configuration, and then under Data Collection select Collection. You can also click the Go To... menu at the top of the screen and select Collection. - On the Collection page, click Add Source next to a Hosted Collector.
- Search for and select Gmail Trace Logs.
- Enter a Name for the Source. The description is optional.
- (Optional) For Source Category, enter any string to tag the output collected from the Source. Category metadata is stored in a searchable field called
_sourceCategory
. - (Optional) Fields. Click the +Add button to define the fields you want to associate. Each field needs a name (key) and value.
-  A green circle with a check mark is shown when the field exists in the Fields table schema.
-  An orange triangle with an exclamation point is shown when the field doesn't exist in the Fields table schema. In this case, an option to automatically add the nonexistent fields to the Fields table schema is provided. If a field is sent to Sumo Logic that does not exist in the Fields schema it is ignored, known as dropped.
- Project ID. Enter the unique identifier number. You can find this from the Google Cloud Console.
- Dataset ID. Enter the ID. The Dataset ID is the project-wise unique identifier for your dataset.
- Data Location. Enter the location of DataSet which is set while creating Dataset in BigQuery.
- Private Key. Enter the private key of Service Account JSON. This is a security key which is required for authentication. You can find this from the Google Cloud Console.
- Client Email. Enter the user email collected from the Google Cloud Console.
- Token URI. Enter the token URI used for generating the token. You can find this from the Google Cloud Console.
- The Collection should begin is set to 24 Hours ago by default. You can adjust it based on your needs.
note
If you set Collection should begin to a collection time that overlaps with data that was previously ingested on a source, it may result in duplicated data to be ingested into Sumo Logic.
- (Optional) Processing Rules for Logs. Configure any desired filters, such as allowlist, denylist, hash, or mask, as described in Create a Processing Rule.
- When you are finished configuring the Source, click Save.
Metadata fields​
If the integration is configured with the SIEM forward option, set the Metadata field _siemparser
to /Parsers/System/Google/GCP BigQuery Gmail
.
JSON schema​
Sources can be configured using UTF-8 encoded JSON files with the Collector Management API. See how to use JSON to configure Sources for details.Â
Parameter | Type | Value | Required | Description |
---|---|---|---|---|
schemaRef | JSON Object | {"type":"Gmail Trace Logs"} | Yes | Define the specific schema type. |
sourceType | String | "Universal" | Yes | Type of source. |
config | JSON Object | Configuration object | Yes | Source type specific values. |
Configuration Object​
Parameter | Type | Required | Default | Description | Example |
---|---|---|---|---|---|
name | String | Yes | null | Type a desired name of the source. The name must be unique per Collector. This value is assigned to the metadata field _source . | "mySource" |
description | String | No | null | Type a description of the source. | "Testing source" |
category | String | No | null | Type a category of the source. This value is assigned to the metadata field _sourceCategory . See best practices for details. | "mySource/test" |
fields | JSON Object | No | null | JSON map of key-value fields (metadata) to apply to the Collector or Source. Use the boolean field _siemForward to enable forwarding to SIEM. | {"_siemForward": false, "fieldA": "valueA"} |
projectId | String | Yes | null | The project ID is the globally unique identifier for your project. For example, pelagic-quanta-364805 . | |
datasetId | String | Yes | null | The Dataset ID is the project-wise unique identifier for your dataset. For example, gmaillogsbigquery . | |
privateKey | String | Yes | null | The Private Key is part of Service Account JSON, it is a security key which is required for authentication. | |
clientEmail | String | No | null | User email collected from the Google Cloud Console. | |
tokenUri | String | Yes | null | The Token URI is part of Service Account JSON, it is used for generating the token. | |
startTime | String | Yes | null | This sets how many hours the Source checks for new data. The default is 24 hours. | |
dataLocation | String | Yes | null | Dataset ID is the project-wise unique identifier for your dataset. |
JSON example​
{
"api.version":"v1",
"source":{
"config":{
"name":"Gmail Trace Log",
"category":"gmail",
"projectId":"Product123",
"datasetId":"Product123",
"privateKey":"*****************",
"tokenURI":"dshjfgbkjlafdhbdhfvhjksdg",
"clientEmail":"product123@gmail.com",
"dataLocation":"US",
"startTime":"24 Hours ago"
},
"schemaRef":{
"type":"Gmail Trace Logs"
},
"sourceType":"Universal"
}
}
Terraform example​
resource "sumologic_cloud_to_cloud_source" "gmail_trace _logs_source" {
collector_id = sumologic_collector.collector.id
schema_ref = {
type = "Gmail Trace Logs"
}
config = jsonencode({
"name":"Gmail Trace Log",
"category":"gmail",
"projectId":"Product123",
"datasetId":"Product123",
"privateKey":"*****************",
"tokenURI":"dshjfgbkjlafdhbdhfvhjksdg",
"clientEmail":"product123@gmail.com",
"dataLocation":"US",
"startTime":"24 Hours ago"
})
}
resource "sumologic_collector" "collector" {
name = "my-collector"
description = "Just testing this"
}
FAQ​
Click here for more information about Cloud-to-Cloud sources.