Hi Cuyose,
Yes, you can do such a thing in Splunk. Here is an example that will add all hosts found within the last last hour into a lookup file:
index=_internal earliest=-1h
| eval server_name=host
| table server_name
| append [ inputcsv server_down ]
| dedup server_name
| outputcsv server_down
The second example uses the same lookup file and removes all hosts found in the events within the last and the lookup file:
index=_internal earliest=-1h
| eval server_name=host
| table server_name
| append [ inputcsv server_down ]
| stats count by server_name
| eval server_name=case(count = 2,null() , count=1,server_name)
| table server_name
| outputcsv server_down
To test it and to verify use the first search and use the 2nd line as | eval server_name="foo" to add some dummy hosts.
Hope this helps ...
cheers, MuS
... View more