Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
| <<plugins-{type}s-{plugin}-sfdc_filters>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-sfdc_instance_url>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-sfdc_object_name>> |<<string,string>>|Yes
| <<plugins-{type}s-{plugin}-timeout>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-to_underscores>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-use_test_sandbox>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-use_tooling_api>> |<<boolean,boolean>>|No
Expand Down Expand Up @@ -203,6 +204,17 @@ but not both to configure the url to which the plugin connects to.

The name of the salesforce object you are creating or updating

[id="plugins-{type}s-{plugin}-timeout"]
===== `timeout`

* Value type is <<number,number>>
* Default value is `60`

The timeout to apply to REST API calls to Salesforce, in seconds. If
a connection to Salesforce cannot be made in this time, an error occurs.
If it takes longer than the timeout for a block of data (e.g. query results) to be
read, an error occurs.

[id="plugins-{type}s-{plugin}-to_underscores"]
===== `to_underscores`

Expand Down
6 changes: 5 additions & 1 deletion lib/logstash/inputs/salesforce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ class LogStash::Inputs::Salesforce < LogStash::Inputs::Base
# adding field1 = value1 AND field2 = value2 AND...
config :sfdc_filters, :validate => :string, :default => ""

# RESTForce request timeout in seconds.
config :timeout, :validate => :number, :default => 60, :required => false

# Setting this to true will convert SFDC's NamedFields__c to named_fields__c
config :to_underscores, :validate => :boolean, :default => false

Expand Down Expand Up @@ -179,7 +182,8 @@ def client_options
:password => @password.value,
:security_token => @security_token.value,
:client_id => @client_id,
:client_secret => @client_secret.value
:client_secret => @client_secret.value,
:timeout => @timeout
}
# configure the endpoint to which restforce connects to for authentication
if @sfdc_instance_url && @use_test_sandbox
Expand Down