- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not Like function !Like
navdeep1568
New Member
02-13-2020
01:35 PM
I am trying to search for a server which is named differently than all the others in our network. Commonly servers are named with Location followed by 4 digits and then some string in the end (Eg: Flra2209php_ua).
If one of the machines is not following this naming convention, how do I search for it? I was hoping there would be a "not like" function which might help with this?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

vnravikumar
Champion
02-13-2020
07:20 PM
Hi @navdeep1568
Try this
| makeresults
| eval server="Flra2209php_ua,Flra2209"
| makemv delim="," server
| mvexpand server
| where NOT match(server,"\w+\d{4}\S+")
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

richgalloway

SplunkTrust
02-13-2020
05:05 PM
Try regex
. Use | regex Name!="\w{4]\d{4}.*"
to exclude events where the "Name" field doesn't contain four alphanumerics, then four digits, and then any text.
---
If this reply helps you, Karma would be appreciated.
If this reply helps you, Karma would be appreciated.
