| Crates.io | bind9LogToJson |
| lib.rs | bind9LogToJson |
| version | 0.1.4 |
| created_at | 2025-08-13 15:46:28.115694+00 |
| updated_at | 2025-08-21 21:49:25.875133+00 |
| description | Lightweight translator that tails BIND9 query logs and writes newline-delimited JSON (JSONL) for easy shipping to Elasticsearch via Filebeat. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1793769 |
| size | 25,886 |
bind9LogToJson
App Description
This application acts as a lightweight log translator for BIND9 DNS server logs. Its purpose is to continuously tail the raw BIND9 query logs, parse each line into structured fields, and re-write the output into a newline-delimited JSON (JSONL) file.
The JSONL file can then be picked up by Filebeat (or any other log shipper) and shipped to Elasticsearch as structured events, making DNS query data easy to filter, search, and visualize in Kibana.
Key Features
Example Input (BIND9 log line)
21-Aug-2025 21:28:07.817 queries: info: client @0x7f63aed88168 172.69.69.114#60775 (spicylatte3.redeemedbytheblood.org): query: spicylatte3.redeemedbytheblood.org IN A +E(0)D (45.32.213.144)
Example Output (JSONL)
{"timestamp":"2025-08-21T21:28:07.817Z","client_ip":"172.69.69.114","client_port":60775,"qname":"spicylatte3.redeemedbytheblood.org","qtype":"A","rcode":"NOERROR","server_ip":"45.32.213.144"}
Integration with Filebeat
Defaults
Build
Run examples
Quick local test
Notes
filebeat.inputs:
- type: log
enabled: true
paths:
- /var/log/bind9.jsonl
fields:
log_type: bind9
fields_under_root: true
processors:
- decode_json_fields:
fields: ["message"] # take the "message" field (the raw line)
target: "" # put parsed JSON fields at the top level
overwrite_keys: true # allow overwriting existing keys if same name