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

Get Updates on the Splunk Community!

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...