Splunk Search

Search for field range of numbers inside of case statement

rberkheimer
Engager

Greetings!

Hoping there is an easier way to write this sequential host list such as (host = "vlt(01 through 16)-she1") ?

| eval cde_model = case (
host = "vlt01-she1" OR host = "vlt02-she1" OR host = "vlt03-she1" OR host = "vlt04-she1" OR host = "vlt05-she1" OR host = "vlt06-she1" OR host = "vlt07-she1" OR host = "vlt08-she1" OR host = "vlt09-she1" OR host = "vlt10-she1" OR host = "vlt11-she1" OR host = "vlt12-she1" OR host = "vlt13-she1" OR host = "vlt14-she1" OR host = "vlt15-she1" OR host = "vlt16-she1", "cde-460-she1",

host = "vlt181-she1" OR host = "vlt182-she1" OR host = "vlt183-she1" OR host = "vlt184-she1" OR host = "vlt185-she1" OR host = "vlt186-she1" OR host = "vlt187-she1" OR host = "vlt188-she1" OR host = "vlt189-she1" OR host = "vlt190-she1" OR host = "vlt191-she1" OR host = "vlt192-she1" OR host = "vlt193-she1" OR host = "vlt194-she1" OR host = "vlt195-she1" OR host = "vlt196-she1" OR host = "vlt197-she1" OR host = "vlt198-she1", "cde-475-she1",

1=1, "oops"
)
0 Karma
1 Solution

masonmorales
Influencer
0 Karma

rberkheimer
Engager

Hmmm didn't think of rexing, thx for the input.

errors with:
Unknown search command '1'.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...