Splunk Search

Basic commands with SPL

123michi19
Explorer

Hi @all,

I'm a little bit helpless at the beginning of SPLUNK.

I tried to do simple queries like:

  • Request statuscode and make a timechart with
    index="name" | timechart count(http_status=200)
  • Count pageviews of a specified url
    index="name" | timechart count (cs_uri_stem)

Both commands doesn't work. Can you please help me finding and execute the right commands?

Thank you 🙂 BR Michael

Tags (1)
0 Karma
1 Solution

isoutamo
SplunkTrust
SplunkTrust

In both cases:

index=name http_status=200 | timechart count

Just change cs_uri_stem before pipe.

R. Ismo

View solution in original post

123michi19
Explorer

Thanks for your help 🙂

0 Karma

skoelpin
SplunkTrust
SplunkTrust

You should only pass a field into your function, you're passing a field and its value. So for the first one, it would look like

index="name" http_status=200 | timechart count

Second one should work since you're passing a field. Verify the field is spelled right and in the timerange of your data

isoutamo
SplunkTrust
SplunkTrust

In both cases:

index=name http_status=200 | timechart count

Just change cs_uri_stem before pipe.

R. Ismo

Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...