To maintain a high-performance and reliable security monitoring environment, follow these guidelines when developing rules and filters.
Rule Development
Start Simple: Build rules for specific, high-fidelity patterns first. Avoid overly broad rules that cause "alert noise."
Limit Scope: Always specify
dataTypes. This ensures the engine doesn't waste CPU cycles evaluating firewall rules against Windows event logs.Use Deduplication: Always define
deduplicateBy. This prevents the system from generating hundreds of identical alerts for a single ongoing attack.Document Intention: Use the
descriptionandreferencesfields. This helps SOC analysts understand why an alert triggered and how to respond.Optimize CEL: CEL expressions are fast, but complex nested logic can add latency. Keep the
whereclause as concise as possible.
Filter & Pipeline Design
Standardize Naming: Always map raw fields to the UTMStack Common Schema (e.g.,
origin.ip,target.user,action).Clean as you Go: Use the
deletestep to remove temporary metadata and unnecessarylog.*fields once normalization is complete. Focus on fields that are no longer needed by rules or dashboards.Note: The
rawfield is protected for auditing purposes and cannot be removed by parsing steps.Handle Edge Cases: Use
whereclauses to ensure steps only run when fields exist (e.g.,where: exists("origin.ip")).Use Built-in Patterns: In
grok, favor built-in patterns like{{.ipv4}}over custom regex. They are pre-optimized and more readable.Stage Logical Changes: Groups renames together, then casts, then enrichment. This makes the YAML easier for other developers to read.
Performance Checklist
Are data types limited?
Are correlation windows (
within) in rules kept to the minimum necessary time?are
correlationcounts reasonable? (Max recommended is 50).