You have the right idea. Here's how to do that in SPL. index=some_index "some search criteria"
| eval PODNAME=case(in(SERVERNAME, {list of servernames}), "ONTARIO",
in(SERVERNAME, {list of servernames}), "GEORGIA",
1==1, "unknown" )
| timechart span=30min count by PODNAME Now, when servers are added or removed you just need to edit the lookup file rather than change SPL. I recommend the Splunk App for Lookup File Editing to modify CSV files. There's a better way, though, since the above doesn't scale well with many locations and may become hard to maintain if the code is used in many places. Use a lookup table. Create a CSV file with SERVERNAME and PODNAME columns then use the lookup to map server name to location. index=some_index "some search criteria"
| lookup serverlocation.csv SERVERNAME OUTPUT PODNAME
| timechart span=30min count by PODNAME
... View more