Splunk Search

How to use stats group by _time without null fields?

josefa123
Explorer

Here is a screenshot of what I do. alt text

How can I remove null fields and put the values side by side? I am using stats table group by _time to get all the metrics but it seems that metrics are not indexed at the same time and result in blank fields. How can I resolve this issue? Thanks

0 Karma
1 Solution

woodcock
Esteemed Legend

The easiest way is to "fudge" the time a bit like this:

Your Original Search up until the stats command here | bucket _time span=5m | stats first (*) AS * BY _time

If you still see some NULL values, keep bumping up 5m until you don't.

View solution in original post

0 Karma

woodcock
Esteemed Legend

The easiest way is to "fudge" the time a bit like this:

Your Original Search up until the stats command here | bucket _time span=5m | stats first (*) AS * BY _time

If you still see some NULL values, keep bumping up 5m until you don't.

0 Karma

pradeepkumarg
Influencer

how does _time look in the above table? you can bucket the events into a specific time range before you do stats . This way all events within that time period are grouped together. Example below which groups all the events in a 5 min window

.. | bucket _time span=5m | stats..

0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...