Search code examples
splunksplunk-query

Splunk index usage search adding column titled NULL to results


I'm running a fairly simple search to identify index usage on my Splunk install by source, as we're running through the Enterprise 30-day trial with the intention of using Splunk Free after it expires:

index=_internal source=*license_usage.log | eval MB=b/1024/1024 | timechart span=1d sum(MB) by s where count in top50

The results for all of my data sources are returned as expected but there's an additional column titled "NULL" at the end of the results:

Splunk index search NULL column

All of my data has an input source and when I click on the column and choose to view the data, it brings back no results.

Can anyone help me understand what this NULL column is please? If it's correct it suggests I'm using over the 500MB/day limit for Splunk Free, which I need to address before the trial period ends.


Solution

  • The NULL column appears because some events do not have an 's' field. You only want to sum those events with an s field so modify your query to

    index=_internal source=*license_usage.log type=Usage
    | eval MB=b/1024/1024 
    | timechart span=1d sum(MB) by s where count in top50