Hello,
First, I would like to apologize if I do not add enough data but can add more if needed.
I have created logstash filters to check if the source has the source IP in it. (ex. /var/log/XX.XX.XX.XX/*.log) but I am running into an issue where it matches multiple IP addresses.
if [source] =~ /XX.XX.XX.4/ {
mutate {
add_tag => ["HOSTNAME"]
}
}
This will end up matching with others which have similar Ip address such as /XX.XX.XX.46/. So anything in the 40s would match the .4 and be tagged. I have tried == instead of =~ but that did not work.
Is there a way to have the filter specifically equal the IP and not get tagged to others?
Let me know if any other information is needed.