OpenRelik worker that exports line-based worker results (JSONL or raw lines) to an Elasticsearch index.
- Accepts files from upstream workflow workers.
- Reads each line from each file.
- Indexes JSON documents (or raw lines as text) into Elasticsearch.
- Adds OpenRelik context fields (
openrelik_workflow_id, source file/path, line number).
REDIS_URL(required for Celery)ELASTICSEARCH_URL(default:http://elasticsearch:9200)ELASTICSEARCH_API_KEY(optional)ELASTICSEARCH_USERNAMEandELASTICSEARCH_PASSWORD(optional basic auth)ELASTICSEARCH_VERIFY_CERTS(optional, default:true)
index_name(required): target Elasticsearch index.id_field(optional): JSON field to use as_id.parse_json_lines(optional, defaulttrue): parse each line as JSON. If disabled, line is indexed as{ "message": "..." }.elasticsearch_url(optional): Elasticsearch URL override per task.auth_mode(optional):none,api_key, orbasic. If omitted, worker auto-detects auth from provided credentials.api_key(optional): API key override per task (used whenauth_mode=api_key).usernameandpassword(optional): basic auth overrides per task (used whenauth_mode=basic).verify_certs(optional, defaulttrue): enable/disable TLS cert verification per task.
python -m pip install -e . pytest
pytest