Wondering can this be done - I'm trying to use IPs (there's 50 of them) from a CSV file for a dashboard to Name ones commonly seen but I would also like to have IPs displayed not in the CSV file to be charted both the field in Splunk and the one in the CSV are called
So far I've been able to translate the IPs in the CSV, but unable to display the whole results without losing the name of the IPs from the CSV file.
What am I doing wrong here? I've tried a number of different ways but suspect its something very simple I've missed
index=fw service=22 dst=22.168.X.X | lookup ip_fw src AS src OUTPUT name_ip | stats count by name_ip
ipfw csv file
Basically whatever IPs are in the CSV file id like the corresponding compamny name on the chart instead or in addition to the IP in the firewall logs ...but also IPs that are not in the CSV to be displayed also so ive full visibility of all traffic
Hope that makes sense
You could try to use
fillnull or and
if statement to fill out all the values that didn't match, I think something like this should do the trick for you:
index=fw service=22 dst=22.168.X.X | lookup ip_fw src AS src OUTPUT name_ip | eval name_ip=if(isnull(name_ip), src, name_ip) | stats count by name_ip
Let me know if that helps.
Thanks mate that did it cheers
but had to change the eval to
eval nameip=if(isnull(nameip), src, name_ip)