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!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...