You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _data-prepper/pipelines/configuration/sources/http.md
+101-7Lines changed: 101 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,10 @@ max_connection_count | No | Integer | The maximum allowed number of open connect
24
24
max_pending_requests | No | Integer | The maximum allowed number of tasks in the `ScheduledThreadPool` work queue. Default value is `1024`.
25
25
max_request_length | No | ByteCount | The maximum number of bytes allowed in the payload of a single HTTP request. Default value is `10mb`.
26
26
authentication | No | Object | An authentication configuration. By default, this creates an unauthenticated server for the pipeline. This uses pluggable authentication for HTTPS. To use basic authentication define the `http_basic` plugin with a `username` and `password`. To provide customer authentication, use or create a plugin that implements [ArmeriaHttpAuthenticationProvider](https://github.com/opensearch-project/data-prepper/blob/1.2.0/data-prepper-plugins/armeria-common/src/main/java/com/amazon/dataprepper/armeria/authentication/ArmeriaHttpAuthenticationProvider.java).
27
-
ssl | No | Boolean | Enables TLS/SSL. Default value is false.
28
-
ssl_certificate_file | Conditionally | String | SSL certificate chain file path or Amazon Simple Storage Service (Amazon S3) path. Amazon S3 path example `s3://<bucketName>/<path>`. Required if `ssl` is set to true and `use_acm_certificate_for_ssl` is set to false.
29
-
ssl_key_file | Conditionally | String | SSL key file path or Amazon S3 path. Amazon S3 path example `s3://<bucketName>/<path>`. Required if `ssl` is set to true and `use_acm_certificate_for_ssl` is set to false.
30
-
use_acm_certificate_for_ssl | No | Boolean | Enables a TLS/SSL using certificate and private key from AWS Certificate Manager (ACM). Default value is false.
27
+
ssl | No | Boolean | Enables TLS/SSL. Default value is `false`.
28
+
ssl_certificate_file | Conditionally | String | The SSL certificate chain file path or Amazon Simple Storage Service (Amazon S3) path (for example,`s3://<bucketName>/<path>`). Required if `ssl` is set to `true` and `use_acm_certificate_for_ssl` is set to `false`.
29
+
ssl_key_file | Conditionally | String | The SSL key file path or Amazon S3 path (for example,`s3://<bucketName>/<path>`). Required if `ssl` is set to `true` and `use_acm_certificate_for_ssl` is set to `false`.
30
+
use_acm_certificate_for_ssl | No | Boolean | Enables TLS/SSL using the certificate and private key from AWS Certificate Manager (ACM). Default is `false`.
31
31
acm_certificate_arn | Conditionally | String | The ACM certificate Amazon Resource Name (ARN). The ACM certificate takes preference over Amazon S3 or a local file system certificate. Required if `use_acm_certificate_for_ssl` is set to true.
32
32
acm_private_key_password | No | String | ACM private key password that decrypts the private key. If not provided, Data Prepper generates a random password.
33
33
acm_certificate_timeout_millis | No | Integer | Timeout, in milliseconds, that ACM takes to get certificates. Default value is 120000.
@@ -43,12 +43,106 @@ Clients should send HTTP `POST` requests to the endpoint `/log/ingest`.
43
43
44
44
The `http` protocol only supports the JSON UTF-8 codec for incoming requests, for example, `[{"key1": "value1"}, {"key2": "value2"}]`.
45
45
46
-
####Example: Ingest data with cURL
46
+
## Example
47
47
48
-
The following cURL command can be used to ingest data:
48
+
The following examples demonstrate different configurations that can be used with the `http` source.
49
49
50
+
### Minimal HTTP source
51
+
52
+
The following is the minimal configuration using all default values:
53
+
54
+
```yaml
55
+
minimal-http-pipeline:
56
+
source:
57
+
http:
58
+
sink:
59
+
- stdout: {}
60
+
```
61
+
{% include copy.html %}
62
+
63
+
You can test this pipeline using the following command:
64
+
65
+
```bash
66
+
curl -s "http://localhost:2021/log/ingest" \
67
+
-H "Content-Type: application/json" \
68
+
--data '[{"msg":"one"},{"msg":"two"}]'
69
+
```
70
+
{% include copy.html %}
71
+
72
+
You should see the following output in the Data Prepper logs:
73
+
74
+
```
75
+
{"msg":"one"}
76
+
{"msg":"two"}
77
+
```
78
+
79
+
### Custom path using the pipeline name and health check
80
+
81
+
The following example uses a custom path, configures a custom port, and enables health checks:
0 commit comments