· 8 years ago · Jan 07, 2017, 02:10 PM
1translate {
2field => "id.orig_h"
3destination => "src_comp_name"
4dictionary => [
5 "192.168.1.1", "Home_Router",
6 "192.168.1.150", "My_Laptop",
7 "192.168.1.210", "My_Desktop"
8 ]
9}
10
11translate {
12field => "id.orig_h"
13destination => "src_comp_name"
14dictionary_path => '/etc/logstash/config/compNames.yaml'
15}
16
17'^192.168.1.[1-2]$': "Home_Routers"
18'^192.168.1.1[0-9]{2}$': "Home_Laptops"
19'^192.168.1.2[0-9]{2}$': "Home_Desktops"