---
updatedAt: 2026-11-19T21:45:53.000Z
agentTools:
  projectIndex: https://docs.socket.dev/llms.txt
---

# Data

Get every firewall decision out of the container and into your SIEM.

Every package download the firewall checks produces a decision event: allowed, warned, monitored, or blocked. You can ship those events three ways.

| Output             | Configure          | Use when                                               | Page                              |
| :----------------- | :----------------- | :----------------------------------------------------- | :-------------------------------- |
| **Splunk HEC**     | Container env vars | You use Splunk                                         | [Splunk config](https://docs.socket.dev/docs/sfw-splunk)   |
| **Webhook**        | Container env vars | Anything else: Sentinel, Elastic, a ticketing workflow | [Webhook config](https://docs.socket.dev/docs/sfw-webhook) |
| **Container logs** | One `.env` line    | You already ship container stdout                      | Below                             |

> 🚧 Two different webhooks
>
> These pages cover the firewall's webhook, set by environment variables on the container. The webhook under **Dashboard → Settings → Webhooks** is separate and does not carry install decisions.

## What an event contains

Each event is JSON and carries the fields in the table below.

| Field                                             | Meaning                                                                                                                                                                                                                                        |
| :------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `timestamp`                                       | Epoch seconds, with a fraction (for example `1793310476.523`)                                                                                                                                                                                  |
| `client_ip`                                       | Who requested the package                                                                                                                                                                                                                      |
| `registryFqdn`                                    | The firewall hostname the request arrived on, not the upstream registry                                                                                                                                                                        |
| `repo`                                            | Which route served it                                                                                                                                                                                                                          |
| `purl` / `artifact_purl`                          | `purl` names the package and `artifact_purl` names the exact file that was checked. For npm both include the version. For PyPI, `purl` is the package name plus `?artifact_filename=...` with no version, and `artifact_purl` adds the version |
| `action`, `decision`                              | What the firewall did                                                                                                                                                                                                                          |
| `block_reason` / `warn_reason` / `monitor_reason` | Why, for blocks, warnings and monitored downloads                                                                                                                                                                                              |
| `blocked_alerts`                                  | The alerts that caused a block                                                                                                                                                                                                                 |
| `request_id`                                      | Matches the ID a developer sees in a blocked install                                                                                                                                                                                           |
| `cached`                                          | Whether the verdict came from the firewall's cache                                                                                                                                                                                             |

## Container logs (one setting)

Decisions are written to stdout as `[SOCKET_DECISION]` lines followed by JSON, but each kind is logged at its own level, and clean allows are hidden by default:

| Decision                     | Default log level | Shown by default |
| :--------------------------- | :---------------- | :--------------- |
| Block                        | `error`           | Yes              |
| Allowed with a warn alert    | `warn`            | Yes              |
| Allowed with a monitor alert | `notice`          | Yes              |
| Clean allow (ignore)         | `debug`           | No               |

To log every decision, add this to `.env` and recreate the container. [Stand up Socket Firewall for the first time](https://docs.socket.dev/docs/sfw-block-installs) already includes it.

```bash
SOCKET_IGNORE_LOG_LEVEL=warn
```

```bash
docker compose up -d --force-recreate
docker compose logs socket-firewall | grep SOCKET_DECISION
```

> 📘 Reassemble split events
>
> An event longer than `socket.log_max_body_size` is split across several lines tagged `[SOCKET_DECISION 1/2]`, `[SOCKET_DECISION 2/2]`. Reassemble the lines before parsing; `jq` fails on the fragments. Filter on the prefix `[SOCKET_DECISION`, not on log level.

## Things that apply to every output

* Events fire on downloads only, unless metadata filtering is on. Without [metadata filtering](https://docs.socket.dev/docs/sfw-metadata-filtering), requests for package metadata produce no events. With metadata filtering, each listing logs one event per version checked, up to `max_versions`. These events carry `block_source: "metadata"`. Leave them out when counting blocked installs. For PyPI, pip downloads the `.whl.metadata` file and then the wheel, so one package logs two events with the same `purl` and different `source_path`. To count PyPI installs once, dedupe on `purl` plus `client_ip`.
* Count on `decision`, not `action`. `decision` is what the client actually got.
* Client-side caches skip the firewall. A package already in a developer's npm cache or a warm `.m2` directory never reaches the firewall, so there's no event.
* Behind a load balancer, `client_ip` is the balancer's address until you set `client_ip.header` and `client_ip.trusted_proxies` in `socket.yml`. See [Client IP Detection](https://docs.socket.dev/docs/socket-firewall-enterprise-registry-mode-configuration-reference#client-ip-detection-client_ip).