-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is it possible to incorporate Salesforce setupaudittrail in the same integration? #13
Comments
@ISanthosh22 we are working on a PR that should resolve your issue. One of the key features will be the ability to run custom SOQL queries, like the one you noted. We expect to release it by last week of January or the first week of February. |
@asllop this would be great, thank you for the confirmation and looking forward. Does the new release for custom SOQL embed a logic to truncate the historic data and collect only the new occurrences every time it polls? I guess yes, as it has for the event log file. flex integrations have this limitation. |
@ISanthosh22 yes, we use Redis for that, as you said, just like we do with event logs. We cache the IDs of processed events to avoid processing them again. |
@asllop Thanks again for the confirmation |
Hi @asllop , just checking if you have ETA for the release? |
Hi @ISanthosh22 ! We are releasing it by end of next week. All the features are already implemented, now we are in the beta-testing stage. |
@ISanthosh22 we just released the new version. |
Hi @asllop , Thank you for the new release I tried including event log file + setup audit trail API in the same config. Setup audit trail integration is working without issues but event logs are not reporting. same thing even though I run manually or run as service. when I removed the setup audit trail from config file and run only the event logs alone then the events data is reporting to NewRelic. I don't see any error executing the event log file alone or running with setup audit trail. I'm still not clear where the event logs are going when we run as a combined integration. Output says it is posting event API response. Output running both APIs together: Config.yml:
Please let me know if you can find anything. Thank you! |
Hi @ISanthosh22, a couple of notes:
For more info about config options, please read the docs carefully. |
Hi @asllop, hope all is well. Thank you for the previous notes, adding EventLogfile requests in queries resolved the issue. However, the integration is unable to process all the available fields for the SetUp Audit trail queries like how the flex integration does. Here is the eventlogfile integration config (with custom SOQL for setup audit trail): Issue: Test 1: Test 2: Test 3: Can you please help troubleshoot the issue? Appreciate the help in advance. Thank you! |
Reopening this issue to develop a fix. The issue here is that nested fields are ignored. For example: {
"attributes": {
"type": "SetupAuditTrail",
"url": "/services/data/v55.0/sobjects/SetupAuditTrail/....."
},
"Action": ".....",
"CreatedByContext": null,
"CreatedById": ".....",
"CreatedBy": {
"attributes": {
"type": "User",
"url": "/services/data/v55.0/sobjects/User/....."
},
"Name": ".....",
"Profile": {
"attributes": {
"type": "Profile",
"url": "/services/data/v55.0/sobjects/Profile/....."
},
"Name": "....."
},
"UserType": "....."
},
"CreatedByIssuer": null,
"CreatedDate": ".....",
"DelegateUser": null,
"Display": ".....",
"Id": ".....",
"ResponsibleNamespacePrefix": null,
"Section": "Manage Users"
} The nested fields of the |
Hello @asllop We are not able to run the config,yaml file and it produces the below output as pasted at-optimize-csv-parsing\src_main_.py" --config_dir "C:\Users\santosh.indukuri.adm\Documents\newrelic-logs-salesforce-eventlogfile-feat-optimize-csv-parsing\newrelic-logs-salesforce-eventlogfile-feat-optimize-csv-parsing" |
@ArunprasadGugan123 The latest release should resolve all issues. Would you please try and confirm? |
@ArunprasadGugan123 please test with the latest release. It should resolve all your issues. I will go ahead and close this issue next week if I haven't heard from you. Feel free to reopen as needed. |
@sdewitt-newrelic We have tested with the latest release and the new release resolved all our issues. |
@ArunprasadGugan123 great to hear! I will go ahead and close this issue. |
@sdewitt-newrelic We are trying to implement the same setup for all other environments. But here we face new issue like 'invalid grant' . And for few env we are able to execute it and ending up stating status code 400 and logs were also not written to Newrelic and attaching the log file FYR. Regards, |
Hi @ArunprasadGugan123 from the above screenshot, it seems you aren't able to authenticate just using |
We are currently ingesting the Salesforce Setup audit trail into NewRelic through a flex integration but we wonder if we can incorporate this integration which reduce the efforts of having multiple integration and also multiple connected apps within Salesforce.
Background for the setup audit trail: https://blog.cloudanalogy.com/audit-trail-in-salesforce-how-to-setup-and-use-audit-trail/
Rest API:
https://instance/.my.salesforce.com/services/data/v56.0/query?q=SELECT+Action,+CreatedByContext,+CreatedById,createdby.name,createdby.profile.name,createdby.usertype,+CreatedByIssuer,+CreatedDate,+DelegateUser,++Display,+Id,+ResponsibleNamespacePrefix,+Section+FROM+SetupAuditTraiL
Here is our Flex config:
variable_store:
rest_host: https://instance. my.salesforce.com/
client_id: XXXX
client_secret: XXXXX
# Your query timestamp and offset, utc time is being used in the following example
startDatetime: ${timestamp:datetimeutc-5min}
username: $username
password: $password+securitytoken
rest_api: /services/data/v56.0/query?q=
oauth_token_endpoint: /services/oauth2/token
# Your Salesforce query string
queryString: SELECT+Action,+CreatedByContext,+CreatedById,createdby.name,createdby.profile.name,createdby.usertype,+CreatedByIssuer,+CreatedDate,+DelegateUser,++Display,+Id,+ResponsibleNamespacePrefix,+Section+FROM+SetupAuditTraiL
# Your Salesforce query where clause
queryWhere: " where+createddate=today "
# Timezone, 0000 for utc
Timezone: "%2B0000"
The text was updated successfully, but these errors were encountered: