diff --git a/deploy/helm/sumologic/README.md b/deploy/helm/sumologic/README.md index f6c4509875..99051fb212 100644 --- a/deploy/helm/sumologic/README.md +++ b/deploy/helm/sumologic/README.md @@ -38,7 +38,13 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `sumologic.events.persistence.persistentVolume.pvcLabels` | Additional PersistentVolumeClaim labels for persistent storage volumes | `{}` | | `sumologic.logs.enabled` | Set the enabled flag to false for disabling logs ingestion altogether. | `true` | | `sumologic.logs.collector.allowSideBySide` | Allow running otel and Fluent Bit side by side. This will result in duplicated logs being ingested. Only enable this if you're **certain** it's what you want. | `false` | -| `sumologic.logs.collector.otelcol.enabled` | Enable OpenTelemtry logs collector. | `true` | +| `sumologic.logs.collector.otelcol.enabled` | Enable OpenTelemetry logs collector. | `true` | +| `sumologic.logs.collector.otelcloudwatch.enabled` | Flag to enable CloudWatch Collection | `false` | +| `sumologic.logs.collector.otelcloudwatch.logGroups` | Log Groups configuration for AWS CloudWatch receiver | `{}` | +| `sumologic.logs.collector.otelcloudwatch.persistence.enabled` | Flag to control persistence for the CloudWatch collector | `true` | +| `sumologic.logs.collector.otelcloudwatch.pollInterval` | CloudWatch poll interval | `1m` | +| `sumologic.logs.collector.otelcloudwatch.region` | EKS Fargate cluster region | `""` | +| `sumologic.logs.collector.otelcloudwatch.roleArn` | AWS role ARN, to authenticate with CloudWatch | `""` | | `sumologic.logs.container.enabled` | Enable collecting logs from Kubernetes containers. | `true` | | `sumologic.logs.container.format` | Format for container logs. | `fields` | | `sumologic.logs.multiline.enabled` | Enable multiline detection for Kubernetes container logs. | `true` | @@ -489,6 +495,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `otellogs.config.merge` | Configuration for log collector otelcol, merged with defaults. See also https://github.com/SumoLogic/sumologic-otel-collector/blob/main/docs/configuration.md. | {} | | `otellogs.config.override` | Configuration for log collector otelcol, replaces defaults. See also https://github.com/SumoLogic/sumologic-otel-collector/blob/main/docs/configuration.md. | {} | | `otellogs.daemonset` | OpenTelemetry Collector Daemonset customization options. See [values.yaml] for more details. | See [values.yaml] | +| `otelcloudwatch.statefulset` | OpenTelemetry Cloudwatch Collector statefulset customization options. See [values.yaml] for more details. | See [values.yaml] | | `otellogs.additionalDaemonSets` | OpenTelemetry Collector Daemonset per node customization options. See [Best Practices](/docs/best-practices.md#setting-different-resources-on-different-nodes-for-logs-collector). | `{}` | | `otellogs.metrics.enabled` | Enable OpenTelemetry Collector metrics | `true` | | `otellogs.serviceLabels` | Add custom labels to OpenTelemetry Collector Service | `{}` | diff --git a/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml b/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml index 15e5e09091..8107e190b0 100644 --- a/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml +++ b/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml @@ -233,15 +233,6 @@ receivers: storage: file_storage {{- end }} -{{- if .Values.sumologic.logs.collector.otelcloudwatch.enabled }} - awscloudwatch: - region: {{ .Values.sumologic.logs.collector.otelcloudwatch.region }} - logs: - poll_interval: {{ .Values.sumologic.logs.collector.otelcloudwatch.pollInterval }} - groups: - named: -{{ toYaml .Values.sumologic.logs.collector.otelcloudwatch.logGroups | indent 10 }} -{{- end }} {{- if .Values.sumologic.logs.systemd.enabled }} ## ref: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.73.0/receiver/journaldreceiver journald: @@ -309,15 +300,6 @@ service: - file_storage - pprof pipelines: -{{- if .Values.sumologic.logs.collector.otelcloudwatch.enabled }} - logs/collector/otelcloudwatch: - receivers: - - awscloudwatch - processors: - - batch - exporters: - - otlphttp -{{- end }} {{- if .Values.sumologic.logs.container.enabled }} logs/containers: exporters: diff --git a/deploy/helm/sumologic/templates/logs/collector/otelcol-cloudwatch/statefulset.yaml b/deploy/helm/sumologic/templates/logs/collector/otelcol-cloudwatch/statefulset.yaml index c07fc660c7..37336d06f2 100644 --- a/deploy/helm/sumologic/templates/logs/collector/otelcol-cloudwatch/statefulset.yaml +++ b/deploy/helm/sumologic/templates/logs/collector/otelcol-cloudwatch/statefulset.yaml @@ -18,8 +18,8 @@ spec: {{- if .Values.sumologic.podAnnotations }} {{ toYaml .Values.sumologic.podAnnotations | indent 8 }} {{- end }} -{{- if .Values.otellogs.statefulset.podAnnotations }} -{{ toYaml .Values.otellogs.statefulset.podAnnotations | indent 8 }} +{{- if .Values.otelcloudwatch.statefulset.podAnnotations }} +{{ toYaml .Values.otelcloudwatch.statefulset.podAnnotations | indent 8 }} {{- end }} labels: app: {{ template "sumologic.labels.app.logs.collector.statefulset" . }} @@ -27,28 +27,28 @@ spec: {{- if .Values.sumologic.podLabels }} {{ toYaml .Values.sumologic.podLabels | indent 8 }} {{- end }} -{{- if .Values.otellogs.statefulset.podLabels }} -{{ toYaml .Values.otellogs.statefulset.podLabels | indent 8 }} +{{- if .Values.otelcloudwatch.statefulset.podLabels }} +{{ toYaml .Values.otelcloudwatch.statefulset.podLabels | indent 8 }} {{- end }} spec: serviceAccountName: {{ template "sumologic.metadata.name.logs.collector.serviceaccount" . }} -{{- if .Values.otellogs.statefulset.nodeSelector }} +{{- if .Values.otelcloudwatch.statefulset.nodeSelector }} nodeSelector: -{{ toYaml .Values.otellogs.statefulset.nodeSelector | indent 8 }} +{{ toYaml .Values.otelcloudwatch.statefulset.nodeSelector | indent 8 }} {{- end }} -{{- if .Values.otellogs.statefulset.tolerations }} +{{- if .Values.otelcloudwatch.statefulset.tolerations }} tolerations: -{{ toYaml .Values.otellogs.statefulset.tolerations | indent 8 }} +{{ toYaml .Values.otelcloudwatch.statefulset.tolerations | indent 8 }} {{- end }} -{{- if .Values.otellogs.statefulset.affinity }} +{{- if .Values.otelcloudwatch.statefulset.affinity }} affinity: -{{- if .Values.otellogs.statefulset.affinity }} -{{ toYaml .Values.otellogs.statefulset.affinity | indent 8 }} +{{- if .Values.otelcloudwatch.statefulset.affinity }} +{{ toYaml .Values.otelcloudwatch.statefulset.affinity | indent 8 }} {{- end }} {{- end }} -{{- if .Values.otellogs.statefulset.topologySpreadConstraints }} +{{- if .Values.otelcloudwatch.statefulset.topologySpreadConstraints }} topologySpreadConstraints: -{{ toYaml .Values.otellogs.statefulset.topologySpreadConstraints | indent 6 }} +{{ toYaml .Values.otelcloudwatch.statefulset.topologySpreadConstraints | indent 6 }} {{- end }} volumes: - configMap: @@ -65,8 +65,8 @@ spec: {{- end }} securityContext: {{- toYaml .Values.metadata.securityContext | nindent 8 }} - {{- if .Values.otellogs.statefulset.priorityClassName }} - priorityClassName: {{ .Values.otellogs.statefulset.priorityClassName | quote }} + {{- if .Values.otelcloudwatch.statefulset.priorityClassName }} + priorityClassName: {{ .Values.otelcloudwatch.statefulset.priorityClassName | quote }} {{- end }} containers: - name: otelcol @@ -75,10 +75,10 @@ spec: args: - --config=/etc/otelcol/config.yaml resources: - {{- toYaml .Values.otellogs.statefulset.resources | nindent 10 }} - {{- if .Values.otellogs.statefulset.containers.otelcol.securityContext }} + {{- toYaml .Values.otelcloudwatch.statefulset.resources | nindent 10 }} + {{- if .Values.otelcloudwatch.statefulset.containers.otelcol.securityContext }} securityContext: - {{- toYaml .Values.otellogs.statefulset.containers.otelcol.securityContext | nindent 10 }} + {{- toYaml .Values.otelcloudwatch.statefulset.containers.otelcol.securityContext | nindent 10 }} {{- end }} ports: - name: metrics @@ -88,17 +88,17 @@ spec: httpGet: path: / port: 13133 # Health Check extension default port. - {{- toYaml .Values.otellogs.statefulset.containers.otelcol.livenessProbe | nindent 10 }} + {{- toYaml .Values.otelcloudwatch.statefulset.containers.otelcol.livenessProbe | nindent 10 }} readinessProbe: httpGet: path: / port: 13133 # Health Check extension default port. - {{- toYaml .Values.otellogs.statefulset.containers.otelcol.readinessProbe | nindent 10 }} + {{- toYaml .Values.otelcloudwatch.statefulset.containers.otelcol.readinessProbe | nindent 10 }} startupProbe: httpGet: path: / port: 13133 # Health Check extension default port. - {{- toYaml .Values.otellogs.statefulset.containers.otelcol.startupProbe | nindent 10 }} + {{- toYaml .Values.otelcloudwatch.statefulset.containers.otelcol.startupProbe | nindent 10 }} volumeMounts: - mountPath: /etc/otelcol name: otelcol-config diff --git a/deploy/helm/sumologic/values.yaml b/deploy/helm/sumologic/values.yaml index e7f2c48f3a..0cddd2ea97 100644 --- a/deploy/helm/sumologic/values.yaml +++ b/deploy/helm/sumologic/values.yaml @@ -4250,6 +4250,52 @@ otelevents: # mountPath: /certs # readOnly: true +## Configure cloudwatch collection with Otelcol +otelcloudwatch: + statefulset: + nodeSelector: {} + tolerations: [] + topologySpreadConstraints: [] + affinity: {} + ## Acceptable values for podAntiAffinity: + ## soft: specifies preferences that the scheduler will try to enforce but will not guarantee (Default) + ## hard: specifies rules that must be met for a pod to be scheduled onto a node + podAntiAffinity: "soft" + replicaCount: 1 + resources: + limits: + memory: 1Gi + cpu: 1000m + requests: + memory: 768Mi + ## Warning! Increasing the CPU requests for Fluentd above 1000m might result in broken autoscaling + ## ref: https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/main/docs/best-practices.md#cpu-resources-warning + cpu: 500m + ## Option to define priorityClassName to assign a priority class to pods. + priorityClassName: + + ## Add custom labels only to logs otel sts pods + podLabels: {} + ## Add custom annotations only to logs otel sts pods + podAnnotations: {} + ## Set securityContext for containers running in pods in otelcol-instrumentation statefulset. + containers: + otelcol: + securityContext: {} + livenessProbe: + initialDelaySeconds: 15 + periodSeconds: 15 + timeoutSeconds: 10 + failureThreshold: 3 + readinessProbe: + initialDelaySeconds: 5 + periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 3 + startupProbe: + periodSeconds: 3 + failureThreshold: 60 + ## Configure log collection with Otelcol otellogs: ## Metrics from Collector @@ -4389,49 +4435,6 @@ otellogs: ## values: ## - linux additionalDaemonSets: {} - statefulset: - nodeSelector: {} - tolerations: [] - topologySpreadConstraints: [] - affinity: {} - ## Acceptable values for podAntiAffinity: - ## soft: specifies preferences that the scheduler will try to enforce but will not guarantee (Default) - ## hard: specifies rules that must be met for a pod to be scheduled onto a node - podAntiAffinity: "soft" - replicaCount: 1 - resources: - limits: - memory: 1Gi - cpu: 1000m - requests: - memory: 768Mi - ## Warning! Increasing the CPU requests for Fluentd above 1000m might result in broken autoscaling - ## ref: https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/main/docs/best-practices.md#cpu-resources-warning - cpu: 500m - ## Option to define priorityClassName to assign a priority class to pods. - priorityClassName: - - ## Add custom labels only to logs otel sts pods - podLabels: {} - ## Add custom annotations only to logs otel sts pods - podAnnotations: {} - ## Set securityContext for containers running in pods in otelcol-instrumentation statefulset. - containers: - otelcol: - securityContext: {} - livenessProbe: - initialDelaySeconds: 15 - periodSeconds: 15 - timeoutSeconds: 10 - failureThreshold: 3 - readinessProbe: - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 3 - failureThreshold: 3 - startupProbe: - periodSeconds: 3 - failureThreshold: 60 ## Configure telegraf-operator ## ref: https://github.com/influxdata/helm-charts/blob/master/charts/telegraf-operator/values.yaml