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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...