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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...