Hi.
I would like to know if there is a simple way, via Splunk XML, to create a "for cycle" like routine, to generate panels or rows from a simple SPL search.
A simple example,
I have a look...
See more...
Hi.
I would like to know if there is a simple way, via Splunk XML, to create a "for cycle" like routine, to generate panels or rows from a simple SPL search.
A simple example,
I have a lookup my_hosts.csv with a list of hosts (host1 host2 host3)
In a normal way, if I want to make one panel per each host, I need to enter XML code (or make via UI ok) and create every panel manually where, inside, I put my search (ex. search ... host=host1 "critical" | stats count) (x3)
I would like to automatically generate those panels, from a simple |inputlookup my_hosts.csv ,
with one single for cycle way, something like this:
for myhost in "| inputlookup my_hosts.csv"; do <---------------
panel
single
title $myhost$ /title
search
search ... host=$myhost$ "critical" | stats count
/search
/single
/panel
done <---------------
Is there a way?
Thanks.