Splunk Search

timechart no results found

graziaedu
Explorer

I have the follow query

index=index |spath output=traceSteps path=traceSteps{}
|table traceSteps
|mvexpand traceSteps
|rex field=traceSteps "(message\"\:\"(?<mensagem>(?<=\")(.*?)(?=\")))"
|where mensagem LIKE "CPF%"
|stats count

when i change "|stats count" by "|timechart span=1d count" to show by date i have "no results found"

Why? What do i make wrong?

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The timechart command requires the _time field, but it was stripped out of the results by the table command.  Either remove the table command or add the _time field to it.

index=index |spath output=traceSteps path=traceSteps{}
|table _time traceSteps
|mvexpand traceSteps
|rex field=traceSteps "(message\"\:\"(?<mensagem>(?<=\")(.*?)(?=\")))"
|where mensagem LIKE "CPF%"
|timechart span=1d count
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The timechart command requires the _time field, but it was stripped out of the results by the table command.  Either remove the table command or add the _time field to it.

index=index |spath output=traceSteps path=traceSteps{}
|table _time traceSteps
|mvexpand traceSteps
|rex field=traceSteps "(message\"\:\"(?<mensagem>(?<=\")(.*?)(?=\")))"
|where mensagem LIKE "CPF%"
|timechart span=1d count
---
If this reply helps you, Karma would be appreciated.
0 Karma

graziaedu
Explorer

@richgalloway thanks. it was work.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...