Hello,
I’ve pointed Netscaler Syslog to graylog and I’m retrieving logs. Now I’m trying to add GeoIP to the logging.
I want to do this on Client_ip value in the following message that’s being logged in the ‘message’ field.
09/01/2024:14:34:43 GMT VMPDCNADC01 0-PPE-0 : default SSLVPN TCPCONNSTAT 3486158 0 : Context x@x.com@84.198.xx.xx - SessionId: 62198 - User x@x.com - Client_ip 84.198.xx.xx - Nat_ip 84.198.xx.xx - Vserver 10.250.64.14:443 - Source 84.198.xx.xx:59994 - Destination 10.250.64.13:443 - Start_time "09/01/2024:14:34:43 GMT" - End_time "09/01/2024:14:34:43 GMT" - Duration 00:00:00 - Total_bytes_send 0 - Total_bytes_recv 2738 - Total_compressedbytes_send 0 - Total_compressedbytes_recv 0 - Compression_ratio_send 0.00% - Compression_ratio_recv 0.00% - Access Allowed - Group(s) "N/A"
I followed all the steps here, creating the pipeline:
I can confirm GeoIP lookup is working by testing this in the lookup table. It finds my country/city.
I’ve created the pipeline connected it to stage 0 and to the stream.
rule "src_ip"
when
has_field("Client_ip")
then
let geo = lookup("src_ip", to_string($message.Client_ip));
set_field("src_ip_geo_location", geo["coordinates"]);
set_field("src_ip_geo_country", geo["country"].iso_code);
set_field("src_ip_geo_city", geo["city"].names.en);
end
But on new log messages no values are being displayed for GeoIP, the values are just missing.
Any idea what I’m doing wrong? I’m kinda new to Graylog so this is all a bit confusing to me. Thanks