Salesforce module

edit

This is a module for Salesforce logs. It collects the logs using the following two different types of inputs:

  • httpjson input: collects historical data from Salesforce REST API.
  • cometd input: collects real-time data from Salesforce Streaming API.

It includes the following filesets for receiving logs:

  • login-rest fileset: supports Salesforce Login logs received from the REST API.
  • login-stream fileset: supports Salesforce Login logs received from the Streaming API.
  • logout-rest fileset: supports Salesforce Logout logs received from the REST API.
  • logout-stream fileset: supports Salesforce Logout logs received from the Streaming API.
  • apex-rest fileset: supports Salesforce Apex logs received from the REST API.
  • setupaudittrail-rest fileset: supports logs generated when admins make in your org’s Setup area.

Note: We can leverage the inputs provided above to collect the rest of the events from the Salesforce REST or Streaming API.

When you run the module, it performs a few tasks under the hood:

  • Sets the default paths to the log files (but don’t worry, you can override the defaults)
  • Makes sure each multiline log event gets sent as a single event
  • Uses an Elasticsearch ingest pipeline to parse and process the log lines, shaping the data into a structure suitable for visualizing in Kibana
  • Deploys dashboards for visualizing the log data

Read the quick start to learn how to configure and run modules.

login-rest fileset settings

edit

Example config:

- module: salesforce
  login-rest:
    enabled: true
    var.client_id: "my-client-id"
    var.client_secret: "my-client-secret"
    var.token_url: "https://login.salesforce.com/services/oauth2/token"
    var.user: "[email protected]"
    var.password: "password"
    var.url: "https://instance-url.salesforce.com"
var.paths
An array of glob-based paths that specify where to look for the log files. All patterns supported by Go Glob are also supported here. For example, you can use wildcards to fetch all files from a predefined level of subdirectories: /path/to/log/*/*.log. This fetches all .log files from the subfolders of /path/to/log. It does not fetch log files from the /path/to/log folder itself. If this setting is left empty, Filebeat will choose log paths based on your operating system.
var.client_id
Oauth client ID.
var.client_secret
Oauth client secret.
var.token_url
Oauth token URL.
var.user
The user used as part of the authentication flow. It is required for authentication - grant type password.
var.password
The password used as part of the authentication flow. It is required for authentication - grant type password.
var.url
The URL of the Saleforce instance.

login-stream fileset settings

edit

Example config:

- module: salesforce
  login-stream:
    enabled: true
    var.client_id: "my-client-id"
    var.client_secret: "my-client-secret"
    var.token_url: "https://login.salesforce.com/services/oauth2/token"
    var.user: "[email protected]"
    var.password: "password"
    var.url: "https://instance-url.salesforce.com"
var.paths
An array of glob-based paths that specify where to look for the log files. All patterns supported by Go Glob are also supported here. For example, you can use wildcards to fetch all files from a predefined level of subdirectories: /path/to/log/*/*.log. This fetches all .log files from the subfolders of /path/to/log. It does not fetch log files from the /path/to/log folder itself. If this setting is left empty, Filebeat will choose log paths based on your operating system.
var.client_id
Oauth client ID.
var.client_secret
Oauth client secret.
var.token_url
Oauth token URL.
var.user
The user used as part of the authentication flow. It is required for authentication - grant type password.
var.password
The password used as part of the authentication flow. It is required for authentication - grant type password.
var.url
The URL of the Saleforce instance.

logout-rest fileset settings

edit

Example config:

- module: salesforce
  logout-rest:
    enabled: true
    var.client_id: "my-client-id"
    var.client_secret: "my-client-secret"
    var.token_url: "https://login.salesforce.com/services/oauth2/token"
    var.user: "[email protected]"
    var.password: "password"
    var.url: "https://instance-url.salesforce.com"
var.paths
An array of glob-based paths that specify where to look for the log files. All patterns supported by Go Glob are also supported here. For example, you can use wildcards to fetch all files from a predefined level of subdirectories: /path/to/log/*/*.log. This fetches all .log files from the subfolders of /path/to/log. It does not fetch log files from the /path/to/log folder itself. If this setting is left empty, Filebeat will choose log paths based on your operating system.
var.client_id
Oauth client ID.
var.client_secret
Oauth client secret.
var.token_url
Oauth token URL.
var.user
The user used as part of the authentication flow. It is required for authentication - grant type password.
var.password
The password used as part of the authentication flow. It is required for authentication - grant type password.
var.url
The URL of the Saleforce instance.

logout-stream fileset settings

edit

Example config:

- module: salesforce
  logout-stream:
    enabled: true
    var.client_id: "my-client-id"
    var.client_secret: "my-client-secret"
    var.token_url: "https://login.salesforce.com/services/oauth2/token"
    var.user: "[email protected]"
    var.password: "password"
    var.url: "https://instance-url.salesforce.com"
var.paths
An array of glob-based paths that specify where to look for the log files. All patterns supported by Go Glob are also supported here. For example, you can use wildcards to fetch all files from a predefined level of subdirectories: /path/to/log/*/*.log. This fetches all .log files from the subfolders of /path/to/log. It does not fetch log files from the /path/to/log folder itself. If this setting is left empty, Filebeat will choose log paths based on your operating system.
var.client_id
Oauth client ID.
var.client_secret
Oauth client secret.
var.token_url
Oauth token URL.
var.user
The user used as part of the authentication flow. It is required for authentication - grant type password.
var.password
The password used as part of the authentication flow. It is required for authentication - grant type password.
var.url
The URL of the Saleforce instance.

setupaudittrail-rest fileset settings

edit

Example config:

- module: salesforce
  setupaudittrail-rest:
    enabled: true
    var.client_id: "my-client-id"
    var.client_secret: "my-client-secret"
    var.token_url: "https://login.salesforce.com/services/oauth2/token"
    var.user: "[email protected]"
    var.password: "password"
    var.url: "https://instance-url.salesforce.com"
var.paths
An array of glob-based paths that specify where to look for the log files. All patterns supported by Go Glob are also supported here. For example, you can use wildcards to fetch all files from a predefined level of subdirectories: /path/to/log/*/*.log. This fetches all .log files from the subfolders of /path/to/log. It does not fetch log files from the /path/to/log folder itself. If this setting is left empty, Filebeat will choose log paths based on your operating system.
var.client_id
Oauth client ID.
var.client_secret
Oauth client secret.
var.token_url
Oauth token URL.
var.user
The user used as part of the authentication flow. It is required for authentication - grant type password.
var.password
The password used as part of the authentication flow. It is required for authentication - grant type password.
var.url
The URL of the Saleforce instance.

apex-rest fileset settings

edit

Example config:

- module: salesforce
  apex-rest:
    enabled: true
    var.client_id: "my-client-id"
    var.client_secret: "my-client-secret"
    var.token_url: "https://login.salesforce.com/services/oauth2/token"
    var.user: "[email protected]"
    var.password: "password"
    var.url: "https://instance-url.salesforce.com"
var.paths
An array of glob-based paths that specify where to look for the log files. All patterns supported by Go Glob are also supported here. For example, you can use wildcards to fetch all files from a predefined level of subdirectories: /path/to/log/*/*.log. This fetches all .log files from the subfolders of /path/to/log. It does not fetch log files from the /path/to/log folder itself. If this setting is left empty, Filebeat will choose log paths based on your operating system.
var.client_id
Oauth client ID.
var.client_secret
Oauth client secret.
var.token_url
Oauth token URL.
var.user
The user used as part of the authentication flow. It is required for authentication - grant type password.
var.password
The password used as part of the authentication flow. It is required for authentication - grant type password.
var.url
The URL of the Saleforce instance.

Example dashboard

edit

This Salesforce module comes with several predefined dashboards, including Login, Logout, Apex, and Setup Audit Trails Dashboards. For example:

filebeat salesforce login dashboard
filebeat salesforce logout dashboard

Fields

edit

For a description of each field in the module, see the exported fields section.