:plugin: salesforce :type: input :default_codec: plain /////////////////////////////////////////// START - GENERATED VARIABLES, DO NOT EDIT! /////////////////////////////////////////// :version: %VERSION% :release_date: %RELEASE_DATE% :changelog_url: %CHANGELOG_URL% :include_path: ../../../../logstash/docs/include /////////////////////////////////////////// END - GENERATED VARIABLES, DO NOT EDIT! /////////////////////////////////////////// [id="plugins-{type}s-{plugin}"] === Salesforce input plugin include::{include_path}/plugin_header.asciidoc[] ==== Description This Logstash input plugin allows you to query Salesforce using SOQL and puts the results into Logstash, one row per event. You can configure it to pull entire sObjects or only specific fields. NOTE: This input plugin will stop after all the results of the query are processed and will need to be re-run to fetch new results. It does not utilize the streaming API. In order to use this plugin, you will need to create a new SFDC Application using oauth. More details can be found here: https://help.salesforce.com/apex/HTViewHelpDoc?id=connected_app_create.htm You will also need a username, password, and security token for your salesforce instance. More details for generating a token can be found here: https://help.salesforce.com/apex/HTViewHelpDoc?id=user_security_token.htm In addition to specifying an sObject, you can also supply a list of API fields that will be used in the SOQL query. ==== HTTP proxy If your infrastructure uses a HTTP proxy, you can set the `SALESFORCE_PROXY_URI` environment variable with the desired URI value (e.g `export SALESFORCE_PROXY_URI="http://proxy.example.com:123"`). ==== Example This example prints all the Salesforce Opportunities to standard out [source,ruby] ---------------------------------- input { salesforce { client_id => 'OAUTH CLIENT ID FROM YOUR SFDC APP' client_secret => 'OAUTH CLIENT SECRET FROM YOUR SFDC APP' username => 'email@example.com' password => 'super-secret' security_token => 'SECURITY TOKEN FOR THIS USER' sfdc_object_name => 'Opportunity' } } output { stdout { codec => rubydebug } } ---------------------------------- [id="plugins-{type}s-{plugin}-options"] ==== Salesforce Input Configuration Options This plugin supports the following configuration options plus the <> described later. [cols="<,<,<",options="header",] |======================================================================= |Setting |Input type|Required | <> |<>|No | <> |<>|Yes | <> |<>|Yes | <> |<>|Yes | <> |<>|Yes | <> |<>|No | <> |<>|No | <> |<>|No | <> |<>|Yes | <> |<>|No | <> |<>|No | <> |<>|No | <> |<>|Yes |======================================================================= Also see <> for a list of options supported by all input plugins.   [id="plugins-{type}s-{plugin}-api_version"] ===== `api_version` * Value type is <> * There is no default value for this setting. By default, this uses the default Restforce API version. To override this, set this to something like "32.0" for example [id="plugins-{type}s-{plugin}-client_id"] ===== `client_id` * This is a required setting. * Value type is <> * There is no default value for this setting. Consumer Key for authentication. You must set up a new SFDC connected app with oath to use this output. More information can be found here: https://help.salesforce.com/apex/HTViewHelpDoc?id=connected_app_create.htm [id="plugins-{type}s-{plugin}-client_secret"] ===== `client_secret` * This is a required setting. * Value type is <> * There is no default value for this setting. Consumer Secret from your oauth enabled connected app [id="plugins-{type}s-{plugin}-password"] ===== `password` * This is a required setting. * Value type is <> * There is no default value for this setting. The password used to login to sfdc [id="plugins-{type}s-{plugin}-security_token"] ===== `security_token` * This is a required setting. * Value type is <> * There is no default value for this setting. The security token for this account. For more information about generting a security token, see: https://help.salesforce.com/apex/HTViewHelpDoc?id=user_security_token.htm [id="plugins-{type}s-{plugin}-sfdc_fields"] ===== `sfdc_fields` * Value type is <> * Default value is `[]` These are the field names to return in the Salesforce query If this is empty, all fields are returned. [id="plugins-{type}s-{plugin}-sfdc_filters"] ===== `sfdc_filters` * Value type is <> * Default value is `""` These options will be added to the WHERE clause in the SOQL statement. Additional fields can be filtered on by adding field1 = value1 AND field2 = value2 AND... [id="plugins-{type}s-{plugin}-sfdc_instance_url"] ===== `sfdc_instance_url` * Value type is <> * There is no default value for this setting. The url of a Salesforce instance. Provide the url if you want to connect to your Salesforce instance instead of `login.salesforce.com` or `test.salesforce.com` at login. Use either this or the `use_test_sandbox` configuration option but not both to configure the url to which the plugin connects to. [id="plugins-{type}s-{plugin}-sfdc_object_name"] ===== `sfdc_object_name` * This is a required setting. * Value type is <> * There is no default value for this setting. The name of the salesforce object you are creating or updating [id="plugins-{type}s-{plugin}-to_underscores"] ===== `to_underscores` * Value type is <> * Default value is `false` Setting this to true will convert SFDC's NamedFields__c to named_fields__c [id="plugins-{type}s-{plugin}-use_test_sandbox"] ===== `use_test_sandbox` * Value type is <> * Default value is `false` Set this to true to connect to a sandbox sfdc instance logging in through test.salesforce.com Use either this or the `sfdc_instance_url` configuration option but not both to configure the url to which the plugin connects to. [id="plugins-{type}s-{plugin}-use_tooling_api"] ===== `use_tooling_api` * Value type is <> * Default value is `false` Set this to true to connect to the sfdc tooling api instead of the regular sfdc rest api. See https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling for details about the sfdc tooling api. Use cases for the sfdc tooling api include reading apex unit test results, flow coverage results (e.g. coverage of elements of sfdc flows) and security health check risks. [id="plugins-{type}s-{plugin}-username"] ===== `username` * This is a required setting. * Value type is <> * There is no default value for this setting. A valid salesforce user name, usually your email address. Used for authentication and will be the user all objects are created or modified by [id="plugins-{type}s-{plugin}-common-options"] include::{include_path}/{type}.asciidoc[] :default_codec!: