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

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...