[8.x](backport #41015) x-pack/filebeat/input/salesforce: Bug fixes and improvements #41067
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Add more debug logs and for requesting log files do check for 200 status code and then only allow. More details here.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Connect with SF instance and collect documents. Samples docs here:
apex
{ "@timestamp": "2024-10-01T11:40:55.686Z", "@metadata": { "beat": "filebeat", "type": "_doc", "version": "9.0.0", "pipeline": "filebeat-9.0.0-salesforce-apex-pipeline" }, "ecs": { "version": "8.0.0" }, "event": { "timezone": "+05:30", "provider": "EventLogFile", "dataset": "salesforce.apex", "module": "salesforce" }, "service": { "type": "salesforce" }, "input": { "type": "salesforce" }, "salesforce": { "instance_url": "" }, "message": "{\"CALLOUT_TIME\":\"0\",\"CLIENT_IP\":\"\",\"CPU_TIME\":\"58\",\"DB_TOTAL_TIME\":\"26\",\"ENTRY_POINT\":\"DNBConnect.DNB_LinkageOpportunity_Batch\",\"EVENT_TYPE\":\"ApexExecution\",\"EXEC_TIME\":\"90\",\"IS_LONG_RUNNING_REQUEST\":\"0\",\"LOGIN_KEY\":\"\",\"NUMBER_SOQL_QUERIES\":\"1\",\"ORGANIZATION_ID\":\"\",\"QUIDDITY\":\"BA\",\"REQUEST_ID\":\"-\",\"RUN_TIME\":\"127\",\"SESSION_KEY\":\"\",\"TIMESTAMP\":\"20240924140008.050\",\"TIMESTAMP_DERIVED\":\"2024-09-24T14:00:08.050Z\",\"URI\":\"\",\"URI_ID_DERIVED\":\"\",\"USER_ID\":\"\",\"USER_ID_DERIVED\":\"IAK\"}", "tags": [ "salesforce-apex", "forwarded" ], "fileset": { "name": "apex" }, "agent": { "version": "9.0.0", "ephemeral_id": "", "id": "", "name": "", "type": "filebeat" } }login
{ "@timestamp": "2024-10-01T11:41:01.222Z", "@metadata": { "beat": "filebeat", "type": "_doc", "version": "9.0.0", "pipeline": "filebeat-9.0.0-salesforce-login-default" }, "event": { "dataset": "salesforce.login", "module": "salesforce", "timezone": "+05:30", "provider": "EventLogFile" }, "tags": [ "salesforce-login", "forwarded" ], "fileset": { "name": "login" }, "service": { "type": "salesforce" }, "salesforce": { "instance_url": "" }, "agent": { "ephemeral_id": "", "id": "", "name": "", "type": "filebeat", "version": "9.0.0" }, "message": "{\"API_TYPE\":\"\",\"API_VERSION\":\"9998.0\",\"AUTHENTICATION_METHOD_REFERENCE\":\"\",\"AUTHENTICATION_SERVICE_ID\":\"\",\"BROWSER_TYPE\":\"\",\"CIPHER_SUITE\":\"TLS_AES_256_GCM_SHA384\",\"CLIENT_IP\":\"\",\"CPU_TIME\":\"62\",\"DB_TOTAL_TIME\":\"85692869\",\"EVENT_TYPE\":\"Login\",\"FORWARDED_FOR_IP\":\"\",\"LOGIN_KEY\":\"Am2nijOL2d98wLS3\",\"LOGIN_STATUS\":\"LOGIN_NO_ERROR\",\"LOGIN_SUB_TYPE\":\"oauthpassword\",\"LOGIN_TYPE\":\"A\",\"ORGANIZATION_ID\":\"\",\"REQUEST_ID\":\"SLB:\",\"REQUEST_STATUS\":\"S\",\"RUN_TIME\":\"182\",\"SESSION_KEY\":\"\",\"SOURCE_IP\":\"\",\"TIMESTAMP\":\"20240930031304.166\",\"TIMESTAMP_DERIVED\":\"2024-09-30T03:13:04.166Z\",\"TLS_PROTOCOL\":\"TLSv1.3\",\"URI\":\"/services/oauth2/token\",\"URI_ID_DERIVED\":\"\",\"USER_ID\":\"\",\"USER_ID_DERIVED\":\"IAK\",\"USER_NAME\":\"\",\"USER_TYPE\":\"Standard\"}", "input": { "type": "salesforce" }, "ecs": { "version": "8.0.0" } }This is an automatic backport of pull request #41015 done by [Mergify](https://mergify.com).