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!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...