Free plan available. Set up in minutes with the collectors you already use. Start free
Logthread

Integration

Coraza and ModSecurity WAF

Every request your Coraza or ModSecurity web application firewall blocks or flags, with the OWASP CRS rules, attack type, client address and path, in the threat report and detections.

  • Category: Security
  • How data is sent: Logthread Agent
  • Runs on: Linux
  • Status: Beta

How it works#

  1. Answer a few questions. They only fill in the setup steps. Nothing on this page connects to your servers: Logthread never reaches into your network.
  2. Run one command on the WAF server. The next page shows the command with this connector's ingest key filled in. It downloads the Logthread Agent from downloads.logthread.com and installs it as a service (Linux, as root with sudo). No other download.
  3. Data arrives. Everything is collected inside your environment. It is sent over outbound HTTPS (port 443) to ingest.logthread.com. Nothing is opened to the internet: no inbound ports, VPN or public access to your servers. The connection page shows what has arrived and turns Active with the first record.

What you answer#

QuestionAnswerNotes
Where the audit log goesfile (A file on the server), docker (Container output (Docker))Default: file.
Audit log path (optional)TextDefault: /var/log/modsec_audit.log.
Labels (optional)TextTo find and group servers on the Agents page, for example env=prod.
Manage this agent from LogthreadYes or noChange what it sends later from the Agents page, without signing in to the server. Default: Yes.

Setup#

These are the steps for the default answers. In the app, they follow your answers, and the connector's ingest key replaces YOUR_INGEST_KEY.

Step 1. Switch on the WAF parser first. Before anything is sent, choose Use parser below and activate it for service waf. It keeps the rules that matched, the attack type, blocked or only detected, the client address and the path, and drops matched values, headers, bodies and the query string. A WAF record it cannot read is stored without its values. You see it on the parser's own sample records before you switch it on.

Step 2. Turn on the JSON audit log. In the WAF's directives (Coraza: the directives block of your Caddy, Envoy or Traefik configuration; ModSecurity: modsecurity.conf), then reload the server. Requests keep flowing while it reloads; nothing else in the WAF changes.

WAF directives:

# Coraza (Caddy, Envoy, Traefik, Go) or ModSecurity v3 (nginx, Apache): one JSON record per
# request the rules flag. AHKZ leaves request headers and bodies out of the record.
SecAuditEngine RelevantOnly
SecAuditLogFormat JSON
SecAuditLogType Serial
SecAuditLogParts AHKZ
SecAuditLog /var/log/coraza/audit.log
# After the OWASP CRS includes: log the field name, not the matched value. Coraza then keeps
# values out of the file; ModSecurity still writes them in each record's "match" detail.
# Logthread's parser never stores either.
SecRuleUpdateActionById 900000-999999 "logdata:%{MATCHED_VAR_NAME}"

Step 3. Install the Logthread Agent on the WAF server. It tails /var/log/coraza/audit.log as service waf, plus the host's own metrics and journal. The file must be readable by the agent: add it to the group that owns the file, or make the file group-readable.

curl -sSL https://downloads.logthread.com/agent/install.sh | sudo sh -s -- \
  --key YOUR_INGEST_KEY --profiles linux-host,waf-audit --fleet
sudo tee -a /etc/logthread-agent/agent.env >/dev/null <<'EOF'
LOGTHREAD_WAF_AUDIT=/var/log/coraza/audit.log
EOF
sudo systemctl restart logthread-agent

Check that it works#

The connection page under Integrations counts what has arrived and turns Active with the first record. In Explore, search service:waf.

Then add#

Each is one click on the connection page and opens with your data, so you can check it before saving.

  • Dashboard: WAF: Requests your Coraza or ModSecurity WAF blocked or flagged: when, which rules and attack types, from which addresses, against which paths and servers.
  • Parser: waf-audit (Pipelines → Library)
  • Alert: WAF blocks: event.dataset:waf waf.action:block, at least 50 in 10 minutes
  • Alert: Injection blocked: event.dataset:waf waf.action:block waf.attack:(sqli OR rce), at least 1 in 10 minutes

Security detections#

Turn them on under Security → SIEM (Turn on recommended offers the ones whose data arrives). Each opens one incident per user, address or resource it groups by, and Use opens its query in the rule editor.

DetectionSeverityFires on
Traffic with a known botnet command servercriticalA record involves an address on the botnet command-and-control blocklist (abuse.ch Feodo Tracker): a host may be infected and calling home, or the server is scanning you. Needs threat intel turned on under Enrichment.
One address trips many WAF ruleswarningOne client address matches many different WAF rules in a short time: someone probing the application for a way in, one attack type after another.
Web vulnerability scannerwarningRequests from one address carry the user agent of a known security scanner (sqlmap, Nikto, Nuclei, …): an automated search for weaknesses, often before a targeted attack.
Injection attack blocked by the WAFwarningThe WAF blocked a request carrying SQL, command, file path, PHP, Java or Node.js injection. The block worked; the address is worth blocking further up, and the targeted path worth checking for the same weakness.
Surge in WAF blockscriticalMore than 100 requests blocked on one server in 10 minutes: an attack in progress, or a rule that started blocking real users. This is a fixed limit, not a learned baseline; set it above your normal level when you turn it on.
Web scanner probing for weak spotswarningOne address asks for five or more different known probe paths (/.env, /.git/, /wp-login.php, /phpmyadmin and others) within 15 minutes: an automated scanner looking for leaked secrets and admin pages. Open the address for its verdict and Block.

Price#

The integration itself has no charge. What it sends is billed as data ingested, ₹85 ($0.90) per GB on every plan, like any other data; parsing, detections and the dashboard add nothing. See Prices.

Set it up under Integrations in the app, or from an AI agent with MCP (add_integration). All integrations: Integrations guide. Next: find what it sends in Explore and live tail.