Skip to main content

HTTP

Network Webhook

Synopsis

Creates a target that sends log data to HTTP/HTTPS endpoints using configurable methods, formats, and authentication. Supports batching, compression, retry logic, and connection pooling for reliable delivery to web services, APIs, and webhooks.

Schema

- name: <string>
description: <string>
type: http
pipelines: <pipeline[]>
status: <boolean>
properties:
url: <string>
method: <string>
format: <string>
content_type: <string>
headers:
<key>: <value>
batch_size: <numeric>
timeout: <numeric>
connect_timeout: <numeric>
socket_timeout: <numeric>
max_retries: <numeric>
retry_delay: <numeric>
compression: <boolean>
keep_alive: <boolean>
follow_redirects: <boolean>
pool_max: <numeric>
pool_max_per_route: <numeric>
authentication:
type: <string>
username: <string>
password: <string>
token: <string>
header:
key: <string>
value: <string>
tls:
status: <boolean>
verify: <boolean>
cert_name: <string>
key_name: <string>
min_tls_version: <string>
max_tls_version: <string>
field_format: <string>
interval: <string|numeric>
cron: <string>
debug:
status: <boolean>
dont_send_logs: <boolean>

Configuration

The following fields are used to define the target:

FieldRequiredDefaultDescription
nameY-Target name
descriptionN-Optional description
typeY-Must be http or https
pipelinesN-Optional post-processor pipelines
statusNtrueEnable/disable the target

HTTP Connection

FieldRequiredDefaultDescription
urlY-Destination URL (must use http:// or https:// scheme)
methodNPOSTHTTP method: GET, POST, PUT, PATCH, DELETE, HEAD
formatNjsonOutput format: json, json_batch, form, message
content_typeNautoContent-Type header (auto-detected from format)
headersN-Custom HTTP headers as key-value pairs

Request Settings

FieldRequiredDefaultDescription
batch_sizeN1000Maximum number of events per batch
timeoutN60Request timeout in seconds
connect_timeoutN10Connection establishment timeout in seconds
socket_timeoutN10Socket read/write timeout in seconds
compressionNfalseEnable gzip compression
keep_aliveNtrueEnable HTTP keep-alive connections
follow_redirectsNtrueFollow HTTP redirects

Retry Configuration

FieldRequiredDefaultDescription
max_retriesN1Maximum retry attempts on failure
retry_delayN1Delay between retries in seconds

Connection Pool

FieldRequiredDefaultDescription
pool_maxN50Maximum idle connections in pool
pool_max_per_routeN25Maximum connections per route

Authentication

FieldRequiredDefaultDescription
authentication.typeNnoneAuthentication type: none, basic, bearer, header
authentication.usernameN*-Username for basic authentication
authentication.passwordN*-Password for basic authentication
authentication.tokenN*-Token for bearer authentication
authentication.header.keyN*-Header name for header authentication
authentication.header.valueN*-Header value for header authentication

* = Required when using the corresponding authentication type.

TLS Configuration

FieldRequiredDefaultDescription
tls.statusNfalseEnable TLS client certificate authentication
tls.verifyNtrueVerify server certificate
tls.cert_nameN-Client certificate file name (PEM format)
tls.key_nameN-Client private key file name (PEM format)
tls.min_tls_versionNtls1.2Minimum TLS version: tls1.0, tls1.1, tls1.2, tls1.3
tls.max_tls_versionNtls1.3Maximum TLS version: tls1.0, tls1.1, tls1.2, tls1.3

Normalization

FieldRequiredDefaultDescription
field_formatN-Data normalization format. See applicable Normalization section

Scheduler

FieldRequiredDefaultDescription
intervalNrealtimeExecution frequency. See Interval for details
cronN-Cron expression for scheduled execution. See Cron for details

Debug Options

FieldRequiredDefaultDescription
debug.statusNfalseEnable debug logging
debug.dont_send_logsNfalseProcess logs but don't send to target (testing)

Details

Output Formats

The format field determines how events are sent to the HTTP endpoint:

FormatContent-TypeDescription
jsonapplication/jsonEach event sent as separate JSON object request
json_batchapplication/jsonAll events sent as JSON array in single request
formapplication/x-www-form-urlencodedEvents encoded as form data
messagetext/plainRaw message content, newline-separated

Authentication Types

Basic Authentication: Uses HTTP Basic Auth with username and password encoded in the Authorization header.

Bearer Authentication: Sends a token in the Authorization header as Bearer <token>.

Header Authentication: Adds a custom header with configurable key and value, useful for API keys.

Compression

When compression: true is enabled, the request body is gzip-compressed and the Content-Encoding: gzip header is set. This reduces bandwidth usage for high-volume data transmission.

Connection Pooling

The HTTP client maintains a connection pool for efficient connection reuse. Tune pool_max and pool_max_per_route based on expected concurrency and target endpoint capacity.

warning

Setting tls.verify: false disables certificate verification and is not recommended for production environments.

Examples

Basic Webhook

Sending events to a webhook endpoint using default JSON format...

targets:
- name: webhook
type: http
properties:
url: "https://webhook.example.com/events"

With API Key Authentication

Using header-based authentication for API key...

targets:
- name: api_endpoint
type: http
properties:
url: "https://api.example.com/logs"
authentication:
type: header
header:
key: "X-API-Key"
value: "${API_KEY}"

With Bearer Token

Using OAuth bearer token authentication...

targets:
- name: oauth_api
type: http
properties:
url: "https://api.example.com/ingest"
authentication:
type: bearer
token: "${BEARER_TOKEN}"

With Basic Authentication

Using HTTP Basic authentication with username and password...

targets:
- name: basic_auth_endpoint
type: http
properties:
url: "https://api.example.com/logs"
authentication:
type: basic
username: "${HTTP_USERNAME}"
password: "${HTTP_PASSWORD}"

Batch JSON

Sending events as JSON array for efficient batch processing...

targets:
- name: batch_api
type: http
properties:
url: "https://api.example.com/batch"
format: json_batch
batch_size: 500
compression: true

High Volume with Retries

Optimized for high-volume delivery with retry logic and connection pooling...

targets:
- name: high_volume_http
type: http
properties:
url: "https://collector.example.com/events"
format: json_batch
batch_size: 1000
compression: true
max_retries: 3
retry_delay: 2
timeout: 30
pool_max: 100
pool_max_per_route: 50
authentication:
type: bearer
token: "${COLLECTOR_TOKEN}"

With Custom Headers

Adding custom headers for routing or metadata...

targets:
- name: custom_headers
type: http
properties:
url: "https://api.example.com/logs"
headers:
X-Source: "datastream"
X-Environment: "production"
X-Tenant-ID: "tenant-123"

With Client Certificate (mTLS)

Using mutual TLS with client certificate authentication...

targets:
- name: mtls_endpoint
type: http
properties:
url: "https://secure-api.example.com/events"
tls:
status: true
verify: true
cert_name: "client-cert.pem"
key_name: "client-key.pem"
min_tls_version: "tls1.2"

PUT Method

Using PUT method for REST API updates...

targets:
- name: rest_update
type: http
properties:
url: "https://api.example.com/resources/logs"
method: PUT
format: json

Form Data

Sending data as URL-encoded form...

targets:
- name: form_endpoint
type: http
properties:
url: "https://legacy.example.com/submit"
format: form
method: POST

With Field Normalization

Applying ECS normalization before sending to HTTP endpoint...

targets:
- name: normalized_http
type: http
properties:
url: "https://siem.example.com/events"
format: json_batch
field_format: ecs
compression: true