Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Output/Elasticsearch] Add template field #1690

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ spec:
type: object
retries:
type: integer
template:
type: string
time_reopen:
type: integer
timeout:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ spec:
type: object
retries:
type: integer
template:
type: string
time_reopen:
type: integer
timeout:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ spec:
type: object
retries:
type: integer
template:
type: string
time_reopen:
type: integer
timeout:
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/logging.banzaicloud.io_syslogngoutputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ spec:
type: object
retries:
type: integer
template:
type: string
time_reopen:
type: integer
timeout:
Expand Down
5 changes: 5 additions & 0 deletions docs/configuration/plugins/syslogng-outputs/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ Set the prefix for logs in logstash format. If set, then the Index field will be
Set the separator between LogstashPrefix and LogStashDateformat. Default: "-"


### template (string, optional) {#elasticsearchoutput-template}

The template to format the record itself inside the payload body


### type (*string, optional) {#elasticsearchoutput-type}

The document type associated with the operation. Elasticsearch indices now support a single document type: `_doc`
Expand Down
2 changes: 2 additions & 0 deletions pkg/sdk/logging/model/syslogng/output/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ type ElasticsearchOutput struct {
Index string `json:"index,omitempty"`
// The document type associated with the operation. Elasticsearch indices now support a single document type: `_doc`
Type *string `json:"type,omitempty"`
// The template to format the record itself inside the payload body
Template string `json:"template,omitempty"`
// The document ID. If no ID is specified, a document ID is automatically generated.
CustomID string `json:"custom_id,omitempty"`
// Set the prefix for logs in logstash format. If set, then the Index field will be ignored.
Expand Down
Loading