<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/reducing-zeek-json-log-size-field-name-mapping-and-log-filtering-hooks-zeek-network-security-moni-hn1t9rpiy" -->

---
title: Reducing Zeek JSON Log Size: Field Name Mapping and Log...
description: Zeek's JSON logs can balloon in size, which matters when ingesting into a SIEM that charges by volume. Two lightweight techniques help: renaming log fields to...
canonical: https://daily.dev/posts/reducing-zeek-json-log-size-field-name-mapping-and-log-filtering-hooks-zeek-network-security-moni-hn1t9rpiy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Reducing Zeek JSON Log Size: Field Name Mapping and Log Filtering Hooks – Zeek Network Security Monitor | daily.dev
og:description: Zeek's JSON logs can balloon in size, which matters when ingesting into a SIEM that charges by volume. Two lightweight techniques help: renaming log fields to...
og:url: https://daily.dev/posts/reducing-zeek-json-log-size-field-name-mapping-and-log-filtering-hooks-zeek-network-security-moni-hn1t9rpiy
og:image: https://api.daily.dev/og/posts/hn1T9RPIY.png
og:image:alt: Reducing Zeek JSON Log Size: Field Name Mapping and Log Filtering Hooks – Zeek Network Security Monitor
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Reducing Zeek JSON Log Size: Field Name Mapping and Log Filtering Hooks – Zeek Network Security Monitor

**[Zeek: The Open Source Network Security Monitoring Tool](https://daily.dev/sources/zeek)** · 3 min read · 0 upvotes · 0 comments

## Summary

Zeek's JSON logs can balloon in size, which matters when ingesting into a SIEM that charges by volume. Two lightweight techniques help: renaming log fields to shorter names via the Field Name Mapping feature (e.g. shrinking 'id.orig_h' to 'o_h' saves multiple gigabytes daily), and using log filtering hooks to veto uninteresting log lines, such as skipping connection logs from known scanners. Both require only a few lines of Zeek script code, and the logging framework offers further flexibility for customizing log output.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://zeek.org/2026/09/reducing-zeek-json-log-size-field-name-mapping-and-log-filtering-hooks>

## Questions this post answers

### How can I reduce the size of Zeek JSON logs before sending them to a SIEM?

Two techniques cut Zeek JSON log volume with minimal code: field name mapping and log filtering hooks. Field Name Mapping lets you redefine Log::default_field_name_map to shorten field names, for example mapping 'id.orig_h' to 'o_h', which one community member reported saved multiple gigabytes per day. Log filtering hooks let you veto uninteresting log lines entirely, such as skipping connection logs from known scanners using a hook like Conn::log_policy.

_Teams tuning SIEM ingestion costs can track practical Zeek logging tricks like these on daily.dev._

### How do I use Zeek's log filtering hooks to skip certain connection log lines?

Every default Zeek log exposes a hook that lets you veto individual log lines before they're written. For connection logs, defining hook Conn::log_policy(rec: Conn::Info, id: Log::ID, filter: Log::Filter) and calling break when a condition matches (for example, rec$id$orig_h being in a known-scanners set) causes that log line to be skipped, reducing overall log volume.

_Developers filtering noisy telemetry can follow Zeek logging techniques like this via daily.dev._

## Similar posts on daily.dev

- [How to Reduce Log Data Costs Without Losing Important Signals](https://daily.dev/posts/how-to-reduce-log-data-costs-without-losing-important-signals-cgdw8bnaj) · Last9 · 0 upvotes · 0 comments
- [Introducing Zeek 9 – Zeek Network Security Monitor](https://daily.dev/posts/introducing-zeek-9-zeek-network-security-monitor-un6ekyog6) · Zeek: The Open Source Network Security Monitoring Tool · 0 upvotes · 0 comments
- [Investigating multi-vector attacks in Log Explorer](https://daily.dev/posts/investigating-multi-vector-attacks-in-log-explorer-wcudv49fr) · Cloudflare · 0 upvotes · 0 comments
- [A Field Guide to Understanding Your Kilo Data Export](https://daily.dev/posts/a-field-guide-to-understanding-your-kilo-data-export-xdsowq35a) · Kilo Blog · 0 upvotes · 0 comments
- [Filtering and reducing AI agent telemetry with the OpenTelemetry Collector](https://daily.dev/posts/filtering-and-reducing-ai-agent-telemetry-with-the-opentelemetry-collector-cnhecn7ui) · CNCF · 2 upvotes · 1 comments

---

Tags: [#security](https://daily.dev/tags/security), [#logging](https://daily.dev/tags/logging)

[View this post on daily.dev](https://daily.dev/posts/reducing-zeek-json-log-size-field-name-mapping-and-log-filtering-hooks-zeek-network-security-moni-hn1t9rpiy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Reducing Zeek JSON Log Size: Field Name Mapping and Log Filtering Hooks – Zeek Network Security Monitor","url":"https://daily.dev/posts/reducing-zeek-json-log-size-field-name-mapping-and-log-filtering-hooks-zeek-network-security-moni-hn1t9rpiy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/reducing-zeek-json-log-size-field-name-mapping-and-log-filtering-hooks-zeek-network-security-moni-hn1t9rpiy"},"datePublished":"2026-09-28T17:30:54.961Z","dateModified":"2026-09-28T17:31:16.943Z","description":"Zeek's JSON logs can balloon in size, which matters when ingesting into a SIEM that charges by volume. Two lightweight techniques help: renaming log fields to...","image":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","thumbnailUrl":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","isAccessibleForFree":true,"articleSection":"Zeek: The Open Source Network Security Monitoring Tool","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Zeek: The Open Source Network Security Monitoring Tool","logo":"https://media.daily.dev/image/upload/s--FT5PuPzv--/f_auto,q_auto/v1787487427/logos/zeek?_a=BAMAMicg0","url":"https://daily.dev/sources/zeek"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/reducing-zeek-json-log-size-field-name-mapping-and-log-filtering-hooks-zeek-network-security-moni-hn1t9rpiy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,logging","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Zeek: The Open Source Network Security Monitoring Tool","item":"https://daily.dev/sources/zeek"},{"@type":"ListItem","position":3,"name":"Reducing Zeek JSON Log Size: Field Name Mapping and Log Filtering Hooks – Zeek Network Security Monitor"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/reducing-zeek-json-log-size-field-name-mapping-and-log-filtering-hooks-zeek-network-security-moni-hn1t9rpiy#faq","mainEntity":[{"@type":"Question","name":"How can I reduce the size of Zeek JSON logs before sending them to a SIEM?","acceptedAnswer":{"@type":"Answer","text":"Two techniques cut Zeek JSON log volume with minimal code: field name mapping and log filtering hooks. Field Name Mapping lets you redefine Log::default_field_name_map to shorten field names, for example mapping 'id.orig_h' to 'o_h', which one community member reported saved multiple gigabytes per day. Log filtering hooks let you veto uninteresting log lines entirely, such as skipping connection logs from known scanners using a hook like Conn::log_policy. Teams tuning SIEM ingestion costs can track practical Zeek logging tricks like these on daily.dev."}},{"@type":"Question","name":"How do I use Zeek's log filtering hooks to skip certain connection log lines?","acceptedAnswer":{"@type":"Answer","text":"Every default Zeek log exposes a hook that lets you veto individual log lines before they're written. For connection logs, defining hook Conn::log_policy(rec: Conn::Info, id: Log::ID, filter: Log::Filter) and calling break when a condition matches (for example, rec$id$orig_h being in a known-scanners set) causes that log line to be skipped, reducing overall log volume. Developers filtering noisy telemetry can follow Zeek logging techniques like this via daily.dev."}}]}
```

