Skip to content

Commit cfb9abb

Browse files
authored
Merge pull request #1680 from fluent/lynettemiles/sc-136147/update-fluent-bit-docs-pipeline-filters-geoip2
2 parents eccd6bc + 7927bb8 commit cfb9abb

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

pipeline/filters/geoip2-filter.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
---
2-
description: Look up Geo data from IP
2+
description: Look up Geo data from IP.
33
---
44

5-
# GeoIP2 Filter
5+
# GeoIP2 filter
66

7-
GeoIP2 Filter allows you to enrich the incoming data stream using location data from GeoIP2 database.
7+
The GeoIP2 filter lets you enrich the incoming data stream with location data from the GeoIP2 database.
88

9-
## Configuration Parameters <a id="config"></a>
9+
The `GeoLite2-City.mmdb` database is available from [MaxMind's official site](https://dev.maxmind.com/geoip/geoip2/geolite2/).
10+
11+
## Configuration parameters
1012

1113
This plugin supports the following configuration parameters:
1214

1315
| Key | Description |
1416
| :--- | :--- |
15-
| database | Path to the GeoIP2 database. |
16-
| lookup\_key | Field name to process |
17-
| record | Defines the `KEY LOOKUP_KEY VALUE` triplet. See below for how to set up this option. |
17+
| `database` | Path to the GeoIP2 database. |
18+
| `lookup_key` | Field name to process. |
19+
| `record` | Defines the `KEY LOOKUP_KEY VALUE` triplet. |
1820

19-
## Getting Started <a id="getting_started"></a>
21+
## Get started
2022

21-
The following configuration will process incoming `remote_addr`, and append country information retrieved from GeoLite2 database.
23+
The following configuration processes the incoming `remote_addr` and appends country information retrieved from the GeoLite2 database.
2224

23-
```text
25+
```python
2426
[INPUT]
2527
Name dummy
2628
Dummy {"remote_addr": "8.8.8.8"}
@@ -38,17 +40,14 @@ The following configuration will process incoming `remote_addr`, and append coun
3840
Match *
3941
```
4042

41-
Each `Record` parameter above specifies the following triplet:
43+
Each `Record` parameter specifies the following triplet:
4244

43-
1. The field name to be added to records \(`country`\)
44-
2. The lookup key to process \(`remote_addr`\)
45-
3. The query for GeoIP2 database \(`%{country.names.en}`\)
45+
- `country`: The field name to be added to records.
46+
- `remote_addr`: The lookup key to process.
47+
- `%{country.names.en}`: The GeoIP2 database query.
4648

47-
By running Fluent Bit with the configuration above, you will see the following output:
49+
By running Fluent Bit with this configuration, you will see the following output:
4850

4951
```javascript
5052
{"remote_addr": "8.8.8.8", "country": "United States", "isocode": "US"}
5153
```
52-
53-
Note that the `GeoLite2-City.mmdb` database is available from [MaxMind's official site](https://dev.maxmind.com/geoip/geoip2/geolite2/).
54-

0 commit comments

Comments
 (0)