- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Scroogemcdougal
Engager
08-25-2021
05:05 PM
Hi,
I have a lookupfile that contains a list of hosts, (one column named hosts), this list maybe subject to change.
I want to complete a search that will compare this lookup file to hosts in any specific index and return a table showing ok or missing if there is no match.
All searches I have attempted so far are happy to return either or, is the only option here to rename the field in the hostfile or any suggestions on how to complete this?
host (from lookup file) | host (from index) | match |
host1 | host1 | ok |
host2 | missing | |
host3 | host3 | ok |
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ITWhisperer

SplunkTrust
08-25-2021
11:35 PM
search index
| table host
| dedup host
| append
[ | inputlookup lookupfile
| table host
| dedup host ]
| stats count by host
| eval match=if(count=1, "missing", "ok")
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ITWhisperer

SplunkTrust
08-25-2021
11:35 PM
search index
| table host
| dedup host
| append
[ | inputlookup lookupfile
| table host
| dedup host ]
| stats count by host
| eval match=if(count=1, "missing", "ok")
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Scroogemcdougal
Engager
08-26-2021
04:43 PM
Hey man,
Thanks so much for this worked an absolute charm
