Splunk Search

Splunk: Query not returning all columns

itsmevic
Communicator

Hello,

 For some reason, my search is not returning all of the columns that I'd like to include in my search.  It's returning all of the columns EXCEPT "title" and "department".  Is there a limit to how many fields one can use? AND why would the columns noted not populate once the query is done?

index=* sourcetype=* "my keyword" 
| fields _time, user, src_user, action, EventCodeDescription, title, department
0 Karma

to4kawa
Ultra Champion
| makeresults count=1000
| streamstats count
| transpose 0 header_field=count

1000 fields are all right.

index=* sourcetype=* "my keyword" 
 | fields _time, user, src_user, action, EventCodeDescription, title, department

I think these fields may not be present in the event containing the keyword.

0 Karma

adonio
Ultra Champion

maybe those fields arent in the data when you use your keyword filter?
try to remove it, run the search in verbose and look on the fields on the left hand side, are title and department there?

efavreau
Motivator

Related to adonio's requirement, make sure there's data in the fields, and ask for it before the first pipe. This will only get when all of them have a value. Example:
index=* sourcetype=* "my keyword" user=* src_user=* action=* EventCodeDescription=* title=* department=*

###

If this reply helps you, an upvote would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...