-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add experimental OT event collection
- Loading branch information
Mikołaj Świątek
committed
Jun 21, 2022
1 parent
849b458
commit 06de4ee
Showing
25 changed files
with
1,024 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
receivers: | ||
raw_k8s_events: {} | ||
extensions: | ||
health_check: {} | ||
{{- if .Values.otelevents.persistence.enabled }} | ||
file_storage: | ||
directory: /var/lib/storage/otc | ||
timeout: 10s | ||
{{- end }} | ||
pprof: {} | ||
exporters: | ||
sumologic: | ||
log_format: json | ||
json_logs: | ||
add_timestamp: true | ||
timestamp_key: timestamp | ||
endpoint: ${SUMO_ENDPOINT_DEFAULT_EVENTS_SOURCE} | ||
source_name: "%{_sourceName}" | ||
source_category: "%{_sourceCategory}" | ||
sending_queue: | ||
enabled: true | ||
persistent_storage_enabled: {{ .Values.otelevents.persistence.enabled }} | ||
processors: | ||
memory_limiter: | ||
check_interval: 1s | ||
limit_percentage: 70 | ||
spike_limit_percentage: 20 | ||
batch: | ||
send_batch_size: 1024 | ||
send_batch_max_size: 2_048 | ||
timeout: 1s | ||
resource/add_cluster: | ||
attributes: | ||
- key: cluster | ||
value: {{ .Values.sumologic.clusterName | quote }} | ||
action: upsert | ||
source: | ||
collector: {{ .Values.sumologic.collectorName | default .Values.sumologic.clusterName | quote }} | ||
source_name: {{ .Values.fluentd.events.sourceName | quote}} | ||
source_category: {{ .Values.fluentd.events.sourceCategory | default (printf "%s/%s" (include "sumologic.clusterNameReplaceSpaceWithDash" .) (.Values.fluentd.events.sourceName )) | quote}} | ||
source_category_prefix: "" | ||
|
||
service: | ||
telemetry: | ||
logs: | ||
level: {{ .Values.otelevents.logLevel }} | ||
extensions: | ||
- health_check | ||
{{- if .Values.otelevents.persistence.enabled }} | ||
- file_storage | ||
{{- end }} | ||
- pprof | ||
pipelines: | ||
logs/events: | ||
receivers: | ||
- raw_k8s_events | ||
processors: | ||
- memory_limiter | ||
- resource/add_cluster | ||
- source | ||
- batch | ||
exporters: | ||
- sumologic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
deploy/helm/sumologic/templates/events/otelcol/configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{{- if eq (include "events.otelcol.enabled" .) "true" }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "sumologic.metadata.name.events.configmap" . }} | ||
labels: | ||
app: {{ template "sumologic.labels.app.events.configmap" . }} | ||
{{- include "sumologic.labels.common" . | nindent 4 }} | ||
data: | ||
{{- $baseConfig := (tpl (.Files.Get "conf/events/otelcol/config.yaml") .) | fromYaml -}} | ||
{{- $overrideConfig := .Values.otelevents.config.override -}} | ||
{{- $finalConfig := mergeOverwrite $baseConfig $overrideConfig }} | ||
config.yaml: | | ||
{{- $finalConfig | toYaml | nindent 4 }} | ||
{{- end }} |
Oops, something went wrong.