Hi everyone,
I'm building a small CTI platform where threat intelligence feeds (containing file hashes, IPs, etc.) are indexed into a custom index called tip_index
. I want to correlate fields like threat.indicator.file.hash.md5
from this index with incoming logs from my Elastic Agent (which go into data streams like log-*
), using an enrich processor and ingest pipelines.
Goal
Automatically enrich incoming logs with threat intelligence data (e.g., match process.hash.md5
with known malicious md5
from tip_index
) and store the match in a field like threat_match
or similar — without using the preview ES|QL JOIN
.
Steps I've Taken So Far
- Created an Enrich Policy:
PUT /_enrich/policy/file_hash_policy
{
"match": {
"indices": "tip_index",
"match_field": "threat.indicator.file.hash.md5",
"enrich_fields": ["threat.indicator.file.*"]
}
}
- Executed the Policy:
POST /_enrich/policy/file_hash_policy/_execute
- Created the Ingest Pipeline:
PUT /_ingest/pipeline/enrich-file-hash
{
"processors": [
{
"enrich": {
"policy_name": "file_hash_policy",
"field": "process.hash.md5",
"target_field": "threat_match",
"ignore_missing": true
}
}
]
}
- Connected the Pipeline to Log Ingestion:
- Tried assigning the pipeline using an index template:
PUT /_index_template/logs_enrich_template
{
"index_patterns": ["logs-*"],
"template": {
"settings": {
"index.default_pipeline": "enrich-file-hash"
}
}
}
- Also tried setting pipeline in Fleet:
- Fleet > Settings > Edit Output > Advanced YAML:
pipeline: enrich-file-hash
- Verified new logs are still not enriched with the expected
threat_match
field.
Problem
- No
threat_match
field is showing up in mylogs-*
indices. - Pipeline doesn't appear to trigger.
- The enrich policy executes correctly, and the
.enrich-file_hash_policy
index exists. - I suspect it may have something to do with **Fleet-managed data streams or integration behavior not using the pipeline?
Questions
- How can I properly connect an enrich ingest pipeline to logs coming from Fleet-managed integrations (like System or Endpoint)?
- Is it possible to enrich documents in data streams like
logs-*
at ingest time, or do I need to restructure my pipeline? - Can I attach enrich pipelines to Fleet agent logs without custom
filebeat.yml
? - If I update the
tip_index
, will it automatically reflect in enrichment after re-executing the policy?
Any help or guidance would be greatly appreciated!
Thanks so much in advance,