Connections
webhook
Commentary
added in 0.0.5
Sends events to a webhook, sending data with a POST
method and a JSON encoded body.
To increase the concurrency of outstanding HTTP requests, you may want to increase the maximum number of open files in the Docker container, otherwise known as the ulimit
, and increase the corresponding maxRequests
. 1
Examples
Configuring the connection
This connection takes no further configuration. All parameterization takes place in the generator.
{
"connections": {
"saas-webhook": {
"kind": "webhook"
}
}
}
Generating data
Use url
to specify the route to send data
to.
{
"generators": [
{
"url": "http://my-url.com/route",
"data": {
"latency": {
"_gen": "normalDistribution",
"mean": 100,
"sd": 10,
"decimals": 1
}
}
}
],
"connections": {
"saas-webhook": {
"kind": "webhook"
}
}
}
Increase the concurrency
Use maxRequests
to increase the number of concurrent, outstanding HTTP requests pending at any given time. The default is 20000
. Make sure this value is lower than the soft ulimit of your Docker container, otherwise you may encounter errors.
{
"generators": [
{
"url": "http://my-url.com/route",
"data": {
"latency": {
"_gen": "uniformDistribution",
"bounds": [
5,
10
]
}
}
}
],
"connections": {
"saas-webhook": {
"kind": "webhook",
"connectionConfigs": {
"maxRequests": 50000
}
}
}
}
Specification
Connection JSON schema
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "webhook"
},
"connectionConfigs": {
"type": "object",
"properties": {
"maxRequests": {
"type": "number",
"minimum": 1
}
}
}
}
}