Skip to main content
Solved

Cribl Stream: Salesforce IO pack cursor/checkpoint mechanism

  • Nov 4, 2026 11:51 AM UTC
  • 5 replies
  • 3 views

This message originated from Cribl Community Slack.
Click here to view the original link.

Hello, Where can I go and get more information on the Cribls Salesforce io pack? It seems as though there may be problem with the cursor/checkpoint mechanism. Has anyone managed to get this working? Thank you, Marc

Best answer by daniel.midgley700

This one is discovery: ``"discoverUrl": "https://${C.vars['salesforce_domain']}/services/data/${C.vars['salesforce_api_version']}/query?q=SELECT Id,CreatedDate,Interval,LogDate,LogFile FROM EventLogFile WHERE Interval = 'Hourly' AND CreatedDate > + new Date(earliest ? earliest*1000 : Date.now()-900*1000).toISOString() + AND CreatedDate < + new Date(latest ? latest*1000 : Date.now()).toISOString() + ORDER BY CreatedDate ASC NULLS FIRST",

This one is the collection:

"collectUrl": "https://${C.vars['salesforce_domain']} + (LogFile ? /services/data/${C.vars['salesforce_api_version']}/sobjects/EventLogFile/${Id}/LogFile : nextRecordsUrl)"``
View original

5 replies

``{ "type": "collection", "ttl": "4h", "ignoreGroupJobsLimit": false, "removeFields": [], "resumeOnBoot": false, "schedule": { "cronSchedule": "/15 *", "maxConcurrentRuns": 1, "skippable": true, "run": { "rescheduleDroppedTasks": true, "maxTaskReschedule": 1, "logLevel": "info", "jobTimeout": "60m", "mode": "run", "timeRangeType": "relative", "timeWarning": {}, "expression": "true", "minTaskSize": "1MB", "maxTaskSize": "10MB", "stateTracking": { "stateUpdateExpression": "__timestampExtracted !== false && {latestTime: (state.latestTime || 0) > _time ? state.latestTime : _time}", "stateMergeExpression": "(prevState.latestTime || 0) > newState.latestTime ? prevState : newState", "enabled": false }, "earliest": "-15m@m" }, "enabled": true }, "streamtags": [], "workerAffinity": false, "collector": { "conf": { "discovery": { "discoverType": "http", "discoverMethod": "get", "pagination": { "type": "response_body", "maxPages": 50, "attribute": [ "nextRecordsUrl" ] }, "enableStrictDiscoverParsing": false, "enableDiscoverCode": true, "discoverUrl": "https://${C.vars['salesforce_domain']}/services/data/${C.vars['salesforce_api_version']}/query?q=SELECT Id,CreatedDate,Interval,LogDate,LogFile FROM EventLogFile WHERE Interval = 'Hourly' AND CreatedDate > + new Date(earliest ? earliest*1000 : Date.now()-900*1000).toISOString() + AND CreatedDate < + new Date(latest ? latest*1000 : Date.now()).toISOString() + ORDER BY CreatedDate ASC NULLS FIRST", "discoverRequestParams": [], "formatResultCode": "", "discoverDataField": "records" }, "collectMethod": "get", "pagination": { "type": "none", "maxPages": 0, "nextRelationAttribute": "next", "attribute": [ "nextRecordsUrl" ] }, "authentication": "oauth", "timeout": 0, "useRoundRobinDns": false, "disableTimeFilter": true, "decodeUrl": true, "rejectUnauthorized": false, "captureHeaders": false, "stopOnEmptyResults": false, "safeHeaders": [], "retryRules": { "type": "backoff", "interval": 1000, "limit": 5, "multiplier": 2, "maxIntervalMs": 20000, "codes": [ 429, 503 ], "enableHeader": true, "retryConnectTimeout": false, "retryConnectReset": false, "retryHeaderName": "retry-after" }, "__scheduling": { "stateTracking": {} }, "loginUrl": "https://${C.vars['salesforce_domain']}/services/oauth2/token", "authHeaderKey": "Authorization", "authHeaderExpr": "Bearer ${token}", "clientSecretParamName": "client_secret", "loginBody": "{ \"username\": \"${username}\", \"password\": \"${password}\" }", "tokenRespAttribute": "access_token", "collectUrl": "https://${C.vars['salesforce_domain']} + (LogFile ? /services/data/${C.vars['salesforce_api_version']}/sobjects/EventLogFile/${Id}/LogFile : nextRecordsUrl)", "collectRequestParams": [], "authRequestParams": [ { "name": "grant_type", "value": "'client_credentials'" }, { "name": "client_id", "value": "${C.vars['salesforce_oauth_clientid']}" } ], "clientSecretParamValue": "REDACTED", "collectRequestHeaders": [], "username": "REDACTED", "password": "REDACTED" }, "destructive": false, "encoding": "utf8", "type": "rest" }, "input": { "type": "collection", "staleChannelFlushMs": 10000, "sendToRoutes": true, "preprocess": { "disabled": true }, "throttleRatePerSec": "0", "breakerRulesets": [ "Salesforce Ruleset" ], "metadata": [ { "name": "__packsource", "value": "'cribl-salesforce-rest-io.salesforce-api'" } ], "pipeline": "SalesforcePreProcessing", "output": "devnull" }, "savedState": { "restCollectorState": { "data": { "latestTime": 1774804550 } } }, "id": "SalesForceEventLogFile" }``

Hope that helps Marc

Thank you Daniel, I will give it a go !

Where do you specify the sales object query?

This one is discovery: ``"discoverUrl": "https://${C.vars['salesforce_domain']}/services/data/${C.vars['salesforce_api_version']}/query?q=SELECT Id,CreatedDate,Interval,LogDate,LogFile FROM EventLogFile WHERE Interval = 'Hourly' AND CreatedDate > + new Date(earliest ? earliest*1000 : Date.now()-900*1000).toISOString() + AND CreatedDate < + new Date(latest ? latest*1000 : Date.now()).toISOString() + ORDER BY CreatedDate ASC NULLS FIRST",

This one is the collection:

"collectUrl": "https://${C.vars['salesforce_domain']} + (LogFile ? /services/data/${C.vars['salesforce_api_version']}/sobjects/EventLogFile/${Id}/LogFile : nextRecordsUrl)"``