http-post

Run POST HTTP queries

Example

action:

http-post:
  url: http://httpbin.org/post

Field NameDescriptionTypeDefault
urlConnect to this addressstring-
batchNumber of events to send at a timenumber0
timeoutEnsure that data is sent continuously, in the case wheere batch events is not reached timeouslyduration100ms
headersHeaders to send with the queryarray of maps-
body-fieldA field containing the body--
retryFor operations that could potentially fail--

url

Connect to this address

if batch is 0, then this may contain event field expansions

Type: string

batch

Number of events to send at a time

If timeout is exceeded, we send the events anyways, even if batch count is not reached.

Type: number

Example

action:

http-post:
  batch: 100
  url: http://httpbin.org/post

timeout

Ensure that data is sent continuously, in the case wheere batch events is not reached timeously

Type: duration

Example

action:

http-post:
  timeout: 1s
  url: http://httpbin.org/post

headers

Headers to send with the query

Type: array of maps

Example

action:

http-post:
  url: http://httpbin.org/post
  headers:
    - custom-header: some data

body-field

A field containing the body

Example

action:

http-post:
  url: http://httpbin.org/post
  body-field: some-field

retry

For operations that could potentially fail

Field NameDescriptionTypeDefault
countHow many attempts to make before declaring failureinteger-
pauseHow long to pause before re-tryingduration-
foreverkeep trying until success is declaredboolfalse

count

How many attempts to make before declaring failure

Type: integer

Example

action:

exec:
  command: echo 'one two'
  retry:
    count: 1

output:

{"_raw":"one two"}

pause

How long to pause before re-trying

Accepts human-friendly formats, like 1m (for 1 minute) and 4h (for 4 hours)

Type: duration

Example

action:

exec:
  command: echo 'one two'
  retry:
    count: 6
    pause: 10s

output:

{"_raw":"one two"}

forever

keep trying until success is declared

Accepts human-friendly formats, like 1m (for 1 minute) and 4h (for 4 hours)

Type: bool

Example

action:

exec:
  command: echo 'one two'
  retry:
    forever: true

output:

{"_raw":"one two"}