Hi,
I'm new to Logstash, and attempting to update our company's configuration which currently sends syslog data to Splunk.
I've searched on how to standardise the system naming, which may have the shortname or the longname or the IP.
I've successfully "replace"d the name using
filter {
if [host] == "10.10.200.33" {
mutate {
replace => [ "host", "firewall" ]
}
}
}
That works. However.....
filter {
split => ["host", "."]
}
mutate {
replace => ["host", "%{[host][0]}"]
}
}
gives a result in Splunk that simply shows:
hostname: %{[hostname][0]}
The split => ["host", "."]
section is really a straight copy from other posts on this forum where there's been a "thanks, that works" response. I can't figure out why my filter's giving the string rather than giving the variable.
Any help appreciated.
Thanks,
Stuart.