Splunk Search

how to add calculation result of timechart

Richard_400
Engager

Hello,

I'm trying to new chart as calculate through packet count.

I search with query for interface for several device.

I could show as follow.

_timeinterface-AInterface-Binterface-C 
9:00100200100
9:10150250100
9:20200300100

I would like add Interface A+B-C for column as follow

_timeinterface-AInterface-Binterface-C Interface A+B-C
9:00100200100200
9:10150250100300
9:20200300100400

How can I make it?

 

Labels (1)
Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @Richard_400 ,

run something like the following

<your_search>
| bin span=10m _time
| chart count OVER interface BY _time
| eval 'Interface A+B-C'='interface-A'+'Interface-B'-'interface-C'

in general, don't use the minus in the fied names because Splunk knows it as minus, so you need to use quotes for the field names, use underscore (_).

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @Richard_400 ,

run something like the following

<your_search>
| bin span=10m _time
| chart count OVER interface BY _time
| eval 'Interface A+B-C'='interface-A'+'Interface-B'-'interface-C'

in general, don't use the minus in the fied names because Splunk knows it as minus, so you need to use quotes for the field names, use underscore (_).

Ciao.

Giuseppe

Richard_400
Engager

Hi @gcusello ,

Thank you for your feedback.

I got expecting work.

BR

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...