Splunk Search

display result with specific condition matched

cykuan
New Member

Hi All,

If I want to display the result with contain the below number(+61011 or +61012) the first 5 digits numbers.

25/04/2014 00:00:00,CALL_SUCCESSFUL,VOICE,+6101156789,tel:+6101256789,25/04/2014 1:04:08,25/04/2014 2:00:00,0,GS-client/SMH3.0 gsh/dd A/1.1.1 COM/4.5.6,GS-client/SMH3.0 gsh/dd A/1.1.1 COM/4.5.6

I have tried to use this command but no display show out.
(CALL_STOPPED OR CALL_SUCCESSFUL,VOICE) AND (+61011 OR +61012 OR +61013) earliest=04/22/2014:00:00:00

Tags (1)
0 Karma
1 Solution

MichaelPriest
Communicator

I think you need to include some speech marks around some or you conditions, so something like:

("CALL_STOPPED" OR "CALL_SUCCESSFUL,VOICE") AND ("+61011" OR "+61012" OR "+61013") earliest=04/22/2014:00:00:00

See this similar question:
http://answers.splunk.com/answers/120097/query-on-using-and-or.html

View solution in original post

0 Karma

MichaelPriest
Communicator

I think you need to include some speech marks around some or you conditions, so something like:

("CALL_STOPPED" OR "CALL_SUCCESSFUL,VOICE") AND ("+61011" OR "+61012" OR "+61013") earliest=04/22/2014:00:00:00

See this similar question:
http://answers.splunk.com/answers/120097/query-on-using-and-or.html

0 Karma

cykuan
New Member

Hi Michael,

I have tried your method, but it didn't work for me. If I input the search with the full digits(e.g.+6101156789), then the result will display. However, I only want to display the result with only match the first 5 digits.

0 Karma

MichaelPriest
Communicator

Ok, then use then wildcard(*), so for example:

("*+61011*") will return all results that contain +61011

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Free Professional Services for .conf26 Attendees

This year at .conf26, we are doing something a little different. We are bringing the best minds from ...

Defend at Machine Speed: Your Guide to Security Sessions at .conf26

Splunk .conf26   With threats moving at machine speed and attack surfaces expanding across hybrid ...

Where Innovation Takes Flight: The Splunk4Aviation Flight Sim Lands at .conf26

If you hear someone at .conf26 shouting "gear down, GEAR DOWN" across the show floor, you have found us.  The ...