https://github.com/logzio/sawmill
Sawmill is a JSON transformation Java library
https://github.com/logzio/sawmill
geoip grok json maxmind mustache opensource transformation user-agent
Last synced: 5 months ago
JSON representation
Sawmill is a JSON transformation Java library
- Host: GitHub
- URL: https://github.com/logzio/sawmill
- Owner: logzio
- License: apache-2.0
- Created: 2016-09-26T17:10:59.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-18T07:59:17.000Z (about 1 year ago)
- Last Synced: 2024-02-18T08:35:48.616Z (about 1 year ago)
- Topics: geoip, grok, json, maxmind, mustache, opensource, transformation, user-agent
- Language: Java
- Homepage:
- Size: 108 MB
- Stars: 109
- Watchers: 67
- Forks: 24
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-opensource-israel - Sawmill - A JSON transformation open source library for enriching, transforming, and filtering JSON documents.   (Projects by main language / java)
README

[](https://github.com/logzio/sawmill/actions/workflows/build.yml)
[](http://mvnrepository.com/artifact/io.logz.sawmill/sawmill)*Update: June 25, 2020*
The 2.0 release of Sawmill introduces a breaking change to the *GeoIpProcessor* to comply with the updated license of the MaxMind Lite database.
See https://github.com/logzio/sawmill/wiki/GeoIp-Processor for additional details.Sawmill is a JSON transformation open source library.
It enables you to enrich, transform, and filter your JSON documents.
Using Sawmill pipelines you can integrate your favorite groks, geoip, user-agent resolving, add or remove fields/tags and more in a descriptive manner, using configuration files or builders, in a simple DSL, allowing you to dynamically change transformations.
## Download
Get Sawmill Java via Maven:
```xml
io.logz.sawmill
sawmill-core
2.0.21```
or Gradle:
```gradle
compile 'io.logz.sawmill:sawmill-core:2.0.21'
```## Documentation
The full Sawmill documentation [can be found here](https://github.com/logzio/sawmill/wiki).
## Simple configuration example
```json
{
"steps": [
{
"grok": {
"config": {
"field": "message",
"overwrite": [
"message"
],
"patterns": [
"(%{IPORHOST:client_ip}|-) %{USER:ident} %{USER:auth} \\[%{HTTPDATE:timestamp}\\] \\\"(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion:float})?|%{DATA:rawrequest})\\\" %{NUMBER:response:int} (?:%{NUMBER:bytes:float}|-) B %{DATA:thread} %{NUMBER:response_time:float} ms %{DATA:servername} %{DATA:client_id:int}(\\;%{NOTSPACE})? %{DATA:device_id} %{DATA}"
]
}
}
},
{
"removeField": {
"config": {
"path": "message"
}
}
}
]
}
```