Splunk Search

Why is aggregating by custom Salesforce fields not working?

arist0telis
Explorer

I'm not sure if I'm missing something simple or not, but I've got event logs from my Salesforce instance fed in, as well as the User object, and for some reason I can aggregate on some fields of User but not others ... even though the fields exist in Splunk.

 

index=sfdc sourcetype=LightningPageViewCSV
|join USER_ID [ search sourcetype=sfdc:user | eval USER_ID=substr(Id,1,len(Id)-3) ]
|stats avg(EFFECTIVE_PAGE_TIME) by Name

 

// this works to aggregate by the user's name. Not really useful but it was a test to make sure something came through. The substring is b/c one object uses the 18-char Salesforce Id, the other uses the shortened 15-char Id. 

 

index=sfdc sourcetype=LightningPageViewCSV
|join USER_ID [ search sourcetype=sfdc:user | eval USER_ID=substr(Id,1,len(Id)-3) ]
|stats avg(EFFECTIVE_PAGE_TIME) by State__c,Loc__c

 

//no results from this for some reason ... State__c and Loc__c are custom fields on User.

 

index=sfdc sourcetype=sfdc:user
index=sfdc sourcetype=sfdc:user Name="[one of the names from the first query]"

 

//I run these just to see what I've got in my user object and I can see several people with non-null State__c and Loc__c

This is a new dev org I just spun up so I'm not sure if I missed a step in adding these sources or not. The LightningPageViewCSV is an imported static CSV file of the EventLogFile for testing. The sfdc:user was a one time read in of the User object. Both of these are tied to the sfdc index.

Labels (2)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...