Splunk Search

How to find a host from a list of hosts in a file?

gokulakrishnans
Explorer

I need to refer to a table file which contains a list of servers. Need to check with all the servers like a loop which shows the status as 200-Means success/OtherErrorCode-Unsuccessful.

If any of the servers in the list is having other than 200, then an alert should be triggered.

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Use a subsearch.

index=foo status!=200 [ | inputlookup serverList.csv ] | ...
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...