Splunk Search

Filtering data prior to timechart - finding values that are outside of filter

codekiln
Explorer

I'm seeking to make a spunk timechart of values that match a certain filter:

source="/var/log/bcore/ws_metric*" event="WsMetricConnectEventType.connect_end" duration_seconds < 60*60 | timechart p95(duration_seconds) span=5m 

Unfortunately, I'm clearly getting values that are longer than 60*60=3600 seconds. Many of the values for p95(duration_seconds) are actually somewhere in the range of 397k seconds. 

How can I actually filter the data going into timechart?

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

You can't do math in the search command.  Try where, instead or do the math yourself.

 

source="/var/log/bcore/ws_metric*" vent="WsMetricConnectEventType.connect_end" duration_seconds < 3600 
| timechart p95(duration_seconds) span=5m 


source="/var/log/bcore/ws_metric*" vent="WsMetricConnectEventType.connect_end" 
| where duration_seconds < 60*60 
| timechart p95(duration_seconds) span=5m 

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

You can't do math in the search command.  Try where, instead or do the math yourself.

 

source="/var/log/bcore/ws_metric*" vent="WsMetricConnectEventType.connect_end" duration_seconds < 3600 
| timechart p95(duration_seconds) span=5m 


source="/var/log/bcore/ws_metric*" vent="WsMetricConnectEventType.connect_end" 
| where duration_seconds < 60*60 
| timechart p95(duration_seconds) span=5m 

 

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Operationalizing TDIR: Building a More Resilient, Scalable SOC

Optimizing SOC workflows with a unified, risk-based approach to Threat Detection, Investigation, and Response ...

Almost Too Eventful Assurance: Part 1

Modern IT and Network teams still struggle with too many alerts and isolating issues before they are notified. ...

Demo Day: Strengthen Your SOC with Splunk Enterprise Security 8.1

Today’s threat landscape is more complex than ever. Security operation centers (SOCs) are overwhelmed with ...