Splunk Search

query help with chart

surekhasplunk
Communicator

Hi,

I have a csv file with inputs like this :

Time,Device,Interface,Duration,Bits In/sec,Bits Out/sec,BW
3/22/2019 12:26,A-01,Ethernet1/1,322,0.00000255,0.00000247,10000000000
3/22/2019 12:31,A-01,Ethernet1/1,317,0.00000247,0.00000247,10000000000
3/22/2019 12:37,A-01,Ethernet1/1,319,0.00000242,0.0000025,10000000000
3/22/2019 12:42,A-01,Ethernet1/1,320,0.00000248,0.0000024,10000000000

Now i need to show it in a graph like the attached picture where i can show in
x-axis the bandwidth usage and
y-axis i need Device:Interface name
and the usage details should come in the graph as shown in the screenshot. Please help asap.

alt text

Tags (2)
0 Karma
1 Solution

renjith_nair
Legend

@surekhasplunk,

Try

"your current search"
|eval Interfaces=Device.":".Interface
|stats sum("Bits In/sec") as BitsIn,sum("Bits Out/sec") as BitsOut by Interfaces
Happy Splunking!

View solution in original post

0 Karma

woodcock
Esteemed Legend

Like this:

... | eval bandwidthIn = Duration * 'Bits In/sec'
| eval bandwidthOut = Duration * 'Bits Out/sec'
| eval Device:Interface = Device . ":" . Interface
| stats sum(bandwidthIn) AS bandwidthIn sum(bandwidthOut) AS bandwidthOut BY Device:Interface
0 Karma

surekhasplunk
Communicator

Hi @woodcock,

Whats the logic behind multiplying Duration with 'Bits In/Sec' and if we are multiplying with duration then should we not divide it by BW value ? Please suggest.

0 Karma

woodcock
Esteemed Legend

You said you desired Bandwidth usage; that is how to calculate usage.

0 Karma

surekhasplunk
Communicator

Ok.. thanks much @woodcock

0 Karma

niketn
Legend

@surekhasplunk I am confused. You have the data with fields and you have the expected chart in Splunk. Don't you already have the query? Is it assistance required with some assignment? or do you want something on top of the chart that has been attached?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

renjith_nair
Legend

@surekhasplunk,

Try

"your current search"
|eval Interfaces=Device.":".Interface
|stats sum("Bits In/sec") as BitsIn,sum("Bits Out/sec") as BitsOut by Interfaces
Happy Splunking!
0 Karma

surekhasplunk
Communicator

Thank you so much.

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...