Skip to content

Commit

Permalink
Merge pull request #1963 from bosch-io/feature/make-logstash-buffer-s…
Browse files Browse the repository at this point in the history
…izes-configurable

make logstash buffer sizes configurable
  • Loading branch information
thjaeckle authored Jun 12, 2024
2 parents 44bd11b + 256b87f commit 6a1bbc5
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 1 deletion.
2 changes: 2 additions & 0 deletions connectivity/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
<appender name="stash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${DITTO_LOGGING_LOGSTASH_SERVER}</destination>
<reconnectionDelay>1 second</reconnectionDelay>
<writeBufferSize>${LOGSTASH_WRITE_BUFFER_SIZE:-8192}</writeBufferSize>
<ringBufferSize>${LOGSTASH_RING_BUFFER_SIZE:-8192}</ringBufferSize>

<!-- Encoder is required -->
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
Expand Down
2 changes: 1 addition & 1 deletion deployment/helm/ditto/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description: |
A digital twin is a virtual, cloud based, representation of his real world counterpart
(real world “Things”, e.g. devices like sensors, smart heating, connected cars, smart grids, EV charging stations etc).
type: application
version: 3.5.8 # chart version is effectively set by release-job
version: 3.5.9 # chart version is effectively set by release-job
appVersion: 3.5.8
keywords:
- iot-chart
Expand Down
4 changes: 4 additions & 0 deletions deployment/helm/ditto/templates/connectivity-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ spec:
{{- if .Values.global.logging.logstash.enabled }}
- name: DITTO_LOGGING_LOGSTASH_SERVER
value: "{{ .Values.global.logging.logstash.endpoint }}"
- name: LOGSTASH_WRITE_BUFFER_SIZE
value: "{{ .Values.global.logging.logstash.writeBufferSize }}"
- name: LOGSTASH_RING_BUFFER_SIZE
value: "{{ .Values.global.logging.logstash.ringBufferSize }}"
{{- end }}
- name: POD_LABEL_SELECTOR
value: "app.kubernetes.io/name=%s"
Expand Down
4 changes: 4 additions & 0 deletions deployment/helm/ditto/templates/gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ spec:
{{- if .Values.global.logging.logstash.enabled }}
- name: DITTO_LOGGING_LOGSTASH_SERVER
value: "{{ .Values.global.logging.logstash.endpoint }}"
- name: LOGSTASH_WRITE_BUFFER_SIZE
value: "{{ .Values.global.logging.logstash.writeBufferSize }}"
- name: LOGSTASH_RING_BUFFER_SIZE
value: "{{ .Values.global.logging.logstash.ringBufferSize }}"
{{- end }}
- name: POD_LABEL_SELECTOR
value: "app.kubernetes.io/name=%s"
Expand Down
4 changes: 4 additions & 0 deletions deployment/helm/ditto/templates/policies-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ spec:
{{- if .Values.global.logging.logstash.enabled }}
- name: DITTO_LOGGING_LOGSTASH_SERVER
value: "{{ .Values.global.logging.logstash.endpoint }}"
- name: LOGSTASH_WRITE_BUFFER_SIZE
value: "{{ .Values.global.logging.logstash.writeBufferSize }}"
- name: LOGSTASH_RING_BUFFER_SIZE
value: "{{ .Values.global.logging.logstash.ringBufferSize }}"
{{- end }}
- name: POD_LABEL_SELECTOR
value: "app.kubernetes.io/name=%s"
Expand Down
4 changes: 4 additions & 0 deletions deployment/helm/ditto/templates/things-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ spec:
{{- if .Values.global.logging.logstash.enabled }}
- name: DITTO_LOGGING_LOGSTASH_SERVER
value: "{{ .Values.global.logging.logstash.endpoint }}"
- name: LOGSTASH_WRITE_BUFFER_SIZE
value: "{{ .Values.global.logging.logstash.writeBufferSize }}"
- name: LOGSTASH_RING_BUFFER_SIZE
value: "{{ .Values.global.logging.logstash.ringBufferSize }}"
{{- end }}
- name: POD_LABEL_SELECTOR
value: "app.kubernetes.io/name=%s"
Expand Down
4 changes: 4 additions & 0 deletions deployment/helm/ditto/templates/thingssearch-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ spec:
{{- if .Values.global.logging.logstash.enabled }}
- name: DITTO_LOGGING_LOGSTASH_SERVER
value: "{{ .Values.global.logging.logstash.endpoint }}"
- name: LOGSTASH_WRITE_BUFFER_SIZE
value: "{{ .Values.global.logging.logstash.writeBufferSize }}"
- name: LOGSTASH_RING_BUFFER_SIZE
value: "{{ .Values.global.logging.logstash.ringBufferSize }}"
{{- end }}
- name: POD_LABEL_SELECTOR
value: "app.kubernetes.io/name=%s"
Expand Down
4 changes: 4 additions & 0 deletions deployment/helm/ditto/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ global:
enabled: false
# endpoint configures the logstash endpoint to send logs to
endpoint: ""
# logstash write buffer size
writeBufferSize: 8192
# logstash ring buffer size
ringBufferSize: 8192
# logFiles defines logging to log files config
logFiles:
# enabled whether to write logs to log files
Expand Down
2 changes: 2 additions & 0 deletions gateway/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
<appender name="stash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${DITTO_LOGGING_LOGSTASH_SERVER}</destination>
<reconnectionDelay>1 second</reconnectionDelay>
<writeBufferSize>${LOGSTASH_WRITE_BUFFER_SIZE:-8192}</writeBufferSize>
<ringBufferSize>${LOGSTASH_RING_BUFFER_SIZE:-8192}</ringBufferSize>

<!-- Encoder is required -->
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
Expand Down
2 changes: 2 additions & 0 deletions policies/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
<appender name="stash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${DITTO_LOGGING_LOGSTASH_SERVER}</destination>
<reconnectionDelay>1 second</reconnectionDelay>
<writeBufferSize>${LOGSTASH_WRITE_BUFFER_SIZE:-8192}</writeBufferSize>
<ringBufferSize>${LOGSTASH_RING_BUFFER_SIZE:-8192}</ringBufferSize>

<!-- Encoder is required -->
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
Expand Down
2 changes: 2 additions & 0 deletions things/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
<appender name="stash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${DITTO_LOGGING_LOGSTASH_SERVER}</destination>
<reconnectionDelay>1 second</reconnectionDelay>
<writeBufferSize>${LOGSTASH_WRITE_BUFFER_SIZE:-8192}</writeBufferSize>
<ringBufferSize>${LOGSTASH_RING_BUFFER_SIZE:-8192}</ringBufferSize>

<!-- Encoder is required -->
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
Expand Down
2 changes: 2 additions & 0 deletions thingsearch/service/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
<appender name="stash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${DITTO_LOGGING_LOGSTASH_SERVER}</destination>
<reconnectionDelay>1 second</reconnectionDelay>
<writeBufferSize>${LOGSTASH_WRITE_BUFFER_SIZE:-8192}</writeBufferSize>
<ringBufferSize>${LOGSTASH_RING_BUFFER_SIZE:-8192}</ringBufferSize>

<!-- Encoder is required -->
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
Expand Down

0 comments on commit 6a1bbc5

Please sign in to comment.