Splunk Search

How can I prepare a chart based on different values for a field in logs?

naga1105
New Member

We have a message in logs which prints based on values sent in request.

Ex in logs :

"service-1 requested with type - 1"
"service-1 requested with type - 2"
"service-1 requested with type - 3"

Here numeric value after "- (hyphen)" changes based on request. I wanted to find out a requests count based on different numeric values.

Please help me with my Slunk query to get the chart based on time (timechart).

0 Karma

Sukisen1981
Champion

try this - |rex field=_raw "-(?<value>.*)\s+" | chart count by value

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...