Elastic
Route 1: Filebeat or Elastic Agent, filestream with ndjson (recommended)
Section titled “Route 1: Filebeat or Elastic Agent, filestream with ndjson (recommended)”Filebeat writes each stream to its own data stream under logs-*-*, which picks up the built-in ecs@mappings template. The ndjson parser puts keys at the event root and expand_keys turns dotted keys into objects. The optional rename processor moves the OTel names that differ from ECS (see Field mappings), so Elastic Security content that expects destination.* works.
filebeat.inputs: - type: filestream id: artex-target paths: - /artex/audit/target.jsonl index: "logs-artex.target-default" parsers: - ndjson: target: "" expand_keys: true add_error_key: true overwrite_keys: true processors: - timestamp: field: time layouts: - "2006-01-02T15:04:05.999999999Z07:00" test: - "2026-11-28T15:04:05.123456789Z" # Optional: ECS names for Elastic Security content. See the field mapping page. - rename: fields: - from: "server.address" to: "destination.domain" - from: "server.port" to: "destination.port" - from: "http.request.body.size" to: "http.request.body.bytes" - from: "http.response.body.size" to: "http.response.body.bytes" ignore_missing: true fail_on_error: false - type: filestream id: artex-agent paths: - /artex/audit/agent.jsonl index: "logs-artex.agent-default" parsers: - ndjson: target: "" expand_keys: true add_error_key: true overwrite_keys: true processors: - timestamp: field: time layouts: - "2006-01-02T15:04:05.999999999Z07:00" test: - "2026-11-28T15:04:05.123456789Z"
# Global, so it applies to every input. ARTEX's alerts are on the agent stream today.# Lets Elastic Security's prebuilt External Alerts rule promote them.processors: - add_fields: when: equals: event_name: "artex.alert" target: "" fields: event.kind: alert event.module: artex event.category: [intrusion_detection]
output.elasticsearch: hosts: ["${ES_HOSTS}"] api_key: "${ES_API_KEY}"The Fleet equivalent is the “Custom Logs (Filestream)” integration with the same parser settings.
Give the shipper a narrow API key: cluster monitor, and auto_configure plus create_doc on logs-artex.*-*. Without delete or index, the shipper can only append, so the Elastic copy cannot be rewritten from the ARTEX host.
Retention: set data_retention on the data stream lifecycle, for example 7d for logs-artex.target-* and less for an anthropic stream. ARTEX’s own ARTEX_AUDIT_RETENTION (default 7d) covers its local files only.
Name only the active files in paths: rotated generations (target.jsonl.<UTC time>, older ones .gz) must not match. The artex-agent input is the one that carries ARTEX’s alerts today.
Detections
Section titled “Detections”ARTEX’s alerts can be promoted without writing rules: the prebuilt “External Alerts” rule picks up event.kind: alert records outside a few excluded modules. The global add_fields processor in the Filebeat config above sets event.kind, event.module and event.category on ARTEX’s alert records for this.
Rules of your own (KQL unless noted):
| Signal | Elastic rule |
|---|---|
audit.tamper |
event_name:artex.alert and security_rule.name:audit.tamper |
egress.scope_dns_moved |
event_name:artex.alert and security_rule.name:egress.scope_dns_moved |
| A registered domain not seen before | New terms on artex.registered_domain in logs-artex.target-*, history window now-14d |
| A stream went quiet | Observability custom threshold rule: Count with the KQL filter event_name:artex.heartbeat is below 1 over 5 minutes, grouped by data_stream.dataset, with “Alert me about the missing data” on, so a dataset that stops sending heartbeats raises a no-data alert. A grouped log threshold rule cannot catch this, since a group with no documents in the window never alerts |
Planned
Section titled “Planned”- OTLP (#395). Elastic Cloud Hosted and Serverless offer a managed OTLP endpoint, and self-managed Elasticsearch has an
/_otlpendpoint that takes OTLP/HTTP protobuf only (logs support is in technical preview in 9.5). OTel-native storage keeps attributes underattributes.*and bypasses ingest pipelines; whether prebuilt Security rules behave the same onlogs-*.otel-*streams is not documented, so Route 1 stays the safer choice for Security. An OpenTelemetry Collector or EDOT in front can setdata_stream.datasetfromartex.stream. - Egress detectors (#372, #373, #374, #375, #377).
scope.out,domain.new,dest.exfil,body.largeandsecret.leakalerts, andartex.in_scopeon target records, would let independent rules such asartex.in_scope:falseback up ARTEX’s own.secret.leakwould stay in ARTEX, since only ARTEX holds the stored credentials. - Metrics and structured logs (#396, #398). The Elastic Agent Prometheus integration or EDOT’s Prometheus receiver could scrape
/metrics. Until then, ARTEX’s server log is plain text on stderr, which the container input can collect.
Validation
Section titled “Validation”filebeat test configwith Filebeat 9.5.6, placeholder host and key: “Config OK”, including therenameprocessor and the globaladd_fieldsprocessor.- A Filebeat run with a console output against
agent.jsonlalert records: both gotevent.kind: alert,event.module: artexand the record time as@timestamp. - API key privileges, data stream lifecycle and the rule table were written from Elastic documentation only.
- Not run against a real cluster.