Splunk Search

Extracting / Plotting Splunk data

netwrkr
Communicator

Assume we have a log file with at least the following fields

  timestamp   field A   field B   field C .....

  ex:

  1316018215   u1       105        a
  1316018215   u2       30         a
  1316018215   u3       550        c
  1316018215   u2        21        a
  1316018215   u1       65         b
  1316018215   u3       105        a
  1316018215   u2        34        b
  1316018215   u1       105        c

The question: I would like to ask the following questions of this data

1. Plot for me a graph of Unique C vs. (sum of B for each unique C )
2. Plot for me a graph of Unique C vs. (sum of B for each unique C div count of occurrences).
0 Karma

Ayn
Legend

#1:

<yourbasesearch> | stats sum(B) by C

#2:

<yourbasesearch> | stats avg(B) by C
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 ...