Splunk Search

How to timechart with join>

Goldenfit
Explorer

I have a problem using the timechart command with this query. if i use "table" it works, but with timechart it doesn't... anybody can help?

|host..., source..., etc
| table AREA, SUBID, CURRENT_TIMESTAMP
| join AREA, SUBID, CURRENT_TIMESTAMP

[|search source... EVENT_TYPE...
| table AREA, SUBID, TXT, CURRENT_TIMESTAMP ]


| eval message_id=AREA.SUBID." ".TXT
| timechart count(message_id) as "No. of message" by message_id

Labels (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Goldenfit,

timechart command works only if you have the _time fields.

But you haven't this field.

You could use the stats command using CURRENT_TIMESTAMP as grouping BY option.

In addition, join is a command to use only when you haven't any other solution and having few events, otherwise it's a very slow command; I hint to you to re-design your search using stats.

Ciao.

Giuseppe

 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Splunk App Dev Quarterly Roundup: AI, Agents, and Innovation!

Another quarter, another wave of innovation. From complex integrations to pushing the limits ...

Federated Search for Dynamic Data Self Storage Is Now Generally Available on Splunk ...

 Splunk is excited to announce the General Availability of Federated Search for Dynamic Data Self Storage ...

Index This | What has many keys but can’t unlock a door?

July 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...