Splunk Search

How to draw a line chart using the data from events

sunfan1981
New Member

Hi,

May I know how to use the data from events and draw a line chart in splunk or splunk can not do it?
My input data is simple like this:
type1, field1: 80, field2:100
type2, field1: 90, field2:100

I want to draw a line chart that will show two output : 80/100 as rate1 from type1, 90/100 as rate2 from type2

Thanks!

Tags (2)
0 Karma

woodcock
Esteemed Legend

Try this:

sourcetype=type1 OR sroucetype=type2 | rex "field1\s*:\s*(?<field1>\d+),\s+field2\s*:\s*(?<field2>\d+)" | eval rate=(field1/field2) | timechart rate by sourcetype
0 Karma
Get Updates on the Splunk Community!

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...

Splunk AppDynamics Agents Webinar Series

Mark your calendars! On June 24th at 12PM PST, we’re going live with the second session of our Splunk ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2025 SplunkTrust is officially open! If you ...