Splunk Search

How do you chart a single data field?

albyva
Communicator

I'm trying to just chart the NTP offsets from the Loopstats file.
Here is a sample of the data source:

Day   Seconds    Offset        Drift    Est.Error    Stability  Polling.Int

56639 6177.359   0.004032319   -25.301  0.001841655  0.117440   6
56639 6348.131   0.004225549   -25.258  0.001724064  0.110906   6
56639 6698.364   0.002325595   -25.210  0.001747019  0.105151   6
56639 6877.378   -0.001154758  -25.222  0.002045648  0.098456   6
56639 7024.343   0.001006711   -25.213  0.002060481  0.092150   7
56639 7994.357   0.003429927   -25.164  0.002109237  0.087962   7      
56639 7998.387   0.003124573   -25.164  0.001975962  0.082281   7

So I've extracted each of the fields accordingly and all I want to do is chart the Offsets, which is the 3rd data field in the sample above. I tried: | chart sum(offset) by seconds, but that doesn't yield a nice line graph, which is my goal. Any suggestions?

Tags (4)
0 Karma
1 Solution

jtrucks
Splunk Employee
Splunk Employee

If your goal is to chart the values in the offset field against the corresponding values in the seconds field, you don't want to sum(offset).

<source> | chart values(offset) by seconds

An issue to realize is that it is possible to have multiple values of offset for a single value of seconds since this is a comparison of the two data sets not based on a timeline.

--
Jesse Trucks
Minister of Magic

View solution in original post

jtrucks
Splunk Employee
Splunk Employee

If your goal is to chart the values in the offset field against the corresponding values in the seconds field, you don't want to sum(offset).

<source> | chart values(offset) by seconds

An issue to realize is that it is possible to have multiple values of offset for a single value of seconds since this is a comparison of the two data sets not based on a timeline.

--
Jesse Trucks
Minister of Magic

albyva
Communicator

Thanks. The "values" under charts is exactly what I was looking for, Thanks. I got to focused on sum, avg, list, etc and somehow overlooked 'values'.

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 ...