Skip to content

Commit 4a310fb

Browse files
authored
docs: pipeline: outputs: elasticsearch: opensearch: document YAML quoting for strftime values (#2625)
- Add note that strftime format values beginning with % (logstash_dateformat, time_key_format) must be quoted in YAML, since % is a reserved character and an unquoted value like `logstash_dateformat: %Y.%m.%d` fails to parse - Fix MD060 table alignment in the write_operation tables - Fix MD060 header spacing in the OpenSearch parameters table Fixes #2624 Signed-off-by: Eric D. Schabell <eric@schabell.org>
1 parent e34b756 commit 4a310fb

2 files changed

Lines changed: 24 additions & 12 deletions

File tree

pipeline/outputs/elasticsearch.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ The _Elasticsearch_ (`es`) output plugin lets you ingest your records into an [E
5252

5353
If you have used a common relational database, the parameters `index` and `type` can be compared to the `database` and `table` concepts.
5454

55+
{% hint style="info" %}
56+
57+
In YAML configuration, quote any [strftime](https://man7.org/linux/man-pages/man3/strftime.3.html) format value that begins with `%`, such as `logstash_dateformat` and `time_key_format`. YAML treats `%` as a reserved character, so an unquoted value like `logstash_dateformat: %Y.%m.%d` fails to parse. Use `logstash_dateformat: "%Y.%m.%d"` instead.
58+
59+
{% endhint %}
60+
5561
### TLS / SSL
5662

5763
The Elasticsearch output plugin supports TLS/SSL. For more details about the properties available and general configuration, see [TLS/SSL](../../administration/transport-security.md).
@@ -60,12 +66,12 @@ The Elasticsearch output plugin supports TLS/SSL. For more details about the pro
6066

6167
The `write_operation` can be any of:
6268

63-
| Operation | Description |
64-
| ----------- | ----------- |
65-
| `create` | Adds new data. If the data already exists (based on its id), the op is skipped.|
66-
| `index` | New data is added while existing data (based on its id) is replaced (reindexed).|
67-
| `update` | Updates existing data (based on its id). If no data is found, the op is skipped. |
68-
| `upsert` | Merge or insert if the data doesn't exist, updates if the data exists (based on its id).|
69+
| Operation | Description |
70+
| --------- | ---------------------------------------------------------------------------------------- |
71+
| `create` | Adds new data. If the data already exists (based on its id), the op is skipped. |
72+
| `index` | New data is added while existing data (based on its id) is replaced (reindexed). |
73+
| `update` | Updates existing data (based on its id). If no data is found, the op is skipped. |
74+
| `upsert` | Merge or insert if the data doesn't exist, updates if the data exists (based on its id). |
6975

7076
{% hint style="info" %}
7177

pipeline/outputs/opensearch.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The _OpenSearch_ output plugin lets you ingest your records into an [OpenSearch]
1515
This plugin supports the following parameters:
1616

1717
| Key | Description | Default |
18-
|:--- |:----------- |:------- |
18+
| :--- | :----------- | :------- |
1919
| `aws_auth` | Enable AWS Sigv4 Authentication for Amazon OpenSearch Service. | `Off` |
2020
| `aws_external_id` | External ID for the AWS IAM Role specified with `aws_role_arn`. | _none_ |
2121
| `aws_profile` | AWS profile name. | `default` |
@@ -55,6 +55,12 @@ This plugin supports the following parameters:
5555

5656
The parameters `index` and `type` can be confusing if you are new to OpenSearch. If you have used a common relational database before, they can be compared to the `database` and `table` concepts. Also see [the FAQ](opensearch.md#faq).
5757

58+
{% hint style="info" %}
59+
60+
In YAML configuration, quote any [strftime](https://man7.org/linux/man-pages/man3/strftime.3.html) format value that begins with `%`, such as `logstash_dateformat` and `time_key_format`. YAML treats `%` as a reserved character, so an unquoted value like `logstash_dateformat: %Y.%m.%d` fails to parse. Use `logstash_dateformat: "%Y.%m.%d"` instead.
61+
62+
{% endhint %}
63+
5864
### TLS / SSL
5965

6066
The OpenSearch output plugin supports TLS/SSL. For more details about the properties available and general configuration, see [TLS/SSL](../../administration/transport-security.md).
@@ -63,11 +69,11 @@ The OpenSearch output plugin supports TLS/SSL. For more details about the proper
6369

6470
The `write_operation` can be any of:
6571

66-
| Operation | Description |
67-
|------------------|----------------------------------------------------------------------------------------------------|
68-
| `create` (default) | Adds new data - if the data already exists (based on its id), the op is skipped. |
69-
| `index` | New data is added while existing data (based on its id) is replaced (reindexed). |
70-
| `update` | Updates existing data (based on its id). If no data is found, the op is skipped. |
72+
| Operation | Description |
73+
| ------------------ | ----------------------------------------------------------------------------------------------------- |
74+
| `create` (default) | Adds new data - if the data already exists (based on its id), the op is skipped. |
75+
| `index` | New data is added while existing data (based on its id) is replaced (reindexed). |
76+
| `update` | Updates existing data (based on its id). If no data is found, the op is skipped. |
7177
| `upsert` | Known as `merge` or `insert` if the data doesn't exist. Updates if the data exists (based on its id). |
7278

7379
{% hint style="info" %}

0 commit comments

Comments
 (0)