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 Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...