diff --git a/charts/logging-operator/crds/logging.banzaicloud.io_syslogngclusteroutputs.yaml b/charts/logging-operator/crds/logging.banzaicloud.io_syslogngclusteroutputs.yaml index 0bae70fce..cbac3b6ac 100644 --- a/charts/logging-operator/crds/logging.banzaicloud.io_syslogngclusteroutputs.yaml +++ b/charts/logging-operator/crds/logging.banzaicloud.io_syslogngclusteroutputs.yaml @@ -138,6 +138,8 @@ spec: type: object retries: type: integer + template: + type: string time_reopen: type: integer timeout: diff --git a/charts/logging-operator/crds/logging.banzaicloud.io_syslogngoutputs.yaml b/charts/logging-operator/crds/logging.banzaicloud.io_syslogngoutputs.yaml index 759c74775..413df3641 100644 --- a/charts/logging-operator/crds/logging.banzaicloud.io_syslogngoutputs.yaml +++ b/charts/logging-operator/crds/logging.banzaicloud.io_syslogngoutputs.yaml @@ -138,6 +138,8 @@ spec: type: object retries: type: integer + template: + type: string time_reopen: type: integer timeout: diff --git a/config/crd/bases/logging.banzaicloud.io_syslogngclusteroutputs.yaml b/config/crd/bases/logging.banzaicloud.io_syslogngclusteroutputs.yaml index 0bae70fce..cbac3b6ac 100644 --- a/config/crd/bases/logging.banzaicloud.io_syslogngclusteroutputs.yaml +++ b/config/crd/bases/logging.banzaicloud.io_syslogngclusteroutputs.yaml @@ -138,6 +138,8 @@ spec: type: object retries: type: integer + template: + type: string time_reopen: type: integer timeout: diff --git a/config/crd/bases/logging.banzaicloud.io_syslogngoutputs.yaml b/config/crd/bases/logging.banzaicloud.io_syslogngoutputs.yaml index 759c74775..413df3641 100644 --- a/config/crd/bases/logging.banzaicloud.io_syslogngoutputs.yaml +++ b/config/crd/bases/logging.banzaicloud.io_syslogngoutputs.yaml @@ -138,6 +138,8 @@ spec: type: object retries: type: integer + template: + type: string time_reopen: type: integer timeout: diff --git a/docs/configuration/plugins/syslogng-outputs/elasticsearch.md b/docs/configuration/plugins/syslogng-outputs/elasticsearch.md index 2738f739a..79483be52 100644 --- a/docs/configuration/plugins/syslogng-outputs/elasticsearch.md +++ b/docs/configuration/plugins/syslogng-outputs/elasticsearch.md @@ -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` diff --git a/pkg/sdk/logging/model/syslogng/output/elasticsearch.go b/pkg/sdk/logging/model/syslogng/output/elasticsearch.go index 0571c122f..315328ee2 100644 --- a/pkg/sdk/logging/model/syslogng/output/elasticsearch.go +++ b/pkg/sdk/logging/model/syslogng/output/elasticsearch.go @@ -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.