Splunk Search

Can you help me use the eval command with a wildcard question?

linuxology
New Member

Is there a way to do a search for any version that begins with a 5* in an eval search?

eval sofver = if (softwareversion=="5*", "Compliant", "Non-Compliant") chart count over system by sofver

I can get it to work with a specific version, say 5.2.1.5, but I need to figure out how to do anything with a 5.x.x.x

0 Karma

linuxology
New Member

Would you be able to tell me how to do a NOT Match?

0 Karma

sdchakraborty
Contributor

Hi,

Can you try the below,

eval sofver = if (match(softwareversion,"5*"), "Compliant", "Non-Compliant") 

Sid

0 Karma

linuxology
New Member

Would you be able to tell me how to do a match NOT?

0 Karma

sdchakraborty
Contributor

Just add NOT before match function ☺️

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...