Hello.
I am trying to set up GeoIP, but am a little confused about Pipelines.
I have a firewall and collect logs using Graylog. The logs are very different. I wanted to display on the world map the blocked IP addresses (users, remote users) that were blocked when trying to get illegal access to the firewall.
Steps taken:
- Downloaded the GeoLite2-City.mmdb database;
- Copied to the /etc/graylog/server/;
- Configured Data Adapters
System → Lookup Tables → Data Adapters button → Create data adapter:
Data adapter type → Geo IP - MaxMindTM Databases
Title: GeoIP
Description: GeoIP Lookup Table
Name: geoip
File Path: /etc/graylog/server/GeoLite2-City.mmdb
Database type: City database
- Configured Caches
System → Lookup Tables → Caches button → Create cache button
Cache Type: Node-local, in-memory cache
Title: GeoIP
Description: GeoIP Cache
Name: geoip
- Configured Lookup Tables
System → Lookup Tables → Lookup Tables (active by default) → Create Lookup Table
Title: GeoIP
Description: GeoIP Lookup
Name: geoip
Data Adapter: GeoIP (geoip)
Cache: GeoIP (geoip)
- Setting up the Pipeline
System → Pipelines → Manage rules button → Create Rule button
Description: Incoming connections
Rule source:
rule “GeoIP lookup: remote_addr”
when
has_field (“remote_addr”)
then
let geo = lookup (“geoip”, to_string ($ message.remote_addr));
set_field (“remote_addr_geo_location”, geo [“coordinates”]);
set_field (“remote_addr_geo_country”, geo [“country”]. iso_code);
set_field (“remote_addr_geo_city”, geo [“city”]. names.en);
end
Now the pipeline:
System → Pipelines → button Manage pipelines → button Add new pipeline
Title: GeoIP
Description: Incoming connections
Click the Edit connections button, connect:
All messages
And also in Stage 0, click Edit and add a rule to it:
GeoIP lookup: remote_addr
I cannot find further in the field: ip, geo_ip.
The Message Processors Configuration settings were corrected:
1 AWS Instance Name Lookup
2 GeoIP Resolver
3 Message Filter Chain
4 Pipeline Processor
It seems to me that something needs to be added to the stream. Stuck on the sixth point and in the stream settings.
Thank You for attention.
Regards, Tomcat7.