Splunk Search

How would you search for an alphanumeric string where the first part is fixed and the end number varies in length?

Akita881
New Member

I would appreciate help in a search for the following:
The first part of the string is always /device/status/ while the end number varies in length.

Examples (the end numbers are random and can be 6-12 digits in length):

  /device/status/5483367
  /device/status/847532148
  /device/status/687459632587
0 Karma

Akita881
New Member

I appreciate your time to reply. My apologies. I did not fully explain my question. The examples should have included what I want to exclude.
The numbers are all random and there is not a pool of them i can reference. I want to search for just the entries that are followed by numbers and not by letters.
Examples:
/device/status/5483367
/device/status/randomletters
/device/status/847532148
/device/status/687459632587
/device/status/morerandomletters

0 Karma

jensonthottian
Contributor

do you want to search for events which have a number at the end?

0 Karma

jensonthottian
Contributor

"your base search query" "/device/status/*"

Use wildcard "*".

somesoni2
Revered Legend

If this string is part of a field, like source, then try this

your base search ...source="/device/status/5483367*" |..rest of the search

If it's a search string in raw data but not extracted yet, simply do this

your base search "/device/status/5483367*" |..rest of the search
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to February Tech Talks, Office Hours, and Webinars!

💌 Keep the new year’s momentum going with our February lineup of Community Office Hours, Tech Talks, ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Incident Response: Reduce Incident Recurrence with Automated Ticket Creation

Culture extends beyond work experience and coffee roast preferences on software engineering teams. Team ...