Splunk Dev

Skip message starting with Integer in Splunk.

gauravepi
Path Finder

I am creating a query to get message type count but i want to skip some the message that are not valid . Some of the messages are starting like "-100" or "Data ...". I want to skip them while i counting the messages count.

TO get the count i am using below query :

eventtype=logs |  stats count as Total by message | rename message AS "Type"

Message field has below data :

Data nprops 5 1
Data props 0
-102
1432
sql error

I want to skip all message which are starting from positive ,negative number and those as well which start from Data.

Tags (1)
0 Karma

sudosplunk
Motivator

Give this a try,

eventtype=logs | where match(message, "\D") | stats count as Total by message | rename message AS "Type"

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...