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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...