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

otel: fix axosyslog-otlp() source/destination #307

Merged
merged 2 commits into from
Sep 25, 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
2 changes: 1 addition & 1 deletion charts/axosyslog/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: axosyslog
description: AxoSyslog for Kubernetes
type: application
version: 0.10.1
version: 0.11.0
appVersion: "4.8.1"
6 changes: 3 additions & 3 deletions charts/axosyslog/templates/collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ data:
{{- if .keyDelimiter }}
key-delimiter({{ .keyDelimiter | quote }})
{{- end }}
);
);
};
{{- end }}
{{- end }}
Expand Down Expand Up @@ -106,10 +106,10 @@ data:
};
{{- end }}
{{- end }}
{{- with .Values.collector.config.destinations.syslogNgOtlp }}
{{- with .Values.collector.config.destinations.axosyslogOtlp }}
{{- if .enabled }}
destination {
syslog-ng-otlp (
axosyslog-otlp (
url({{ tpl .url $ | quote }})
{{- if .extraOptionsRaw }}
{{ .extraOptionsRaw }}
Expand Down
4 changes: 2 additions & 2 deletions charts/axosyslog/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ spec:
port: 601
targetPort: rfc5424-tcp
{{- end }}
{{- if .syslogNgOtlp.enabled }}
{{- if .axosyslogOtlp.enabled }}
- name: otlp
protocol: TCP
nodePort: {{ .syslogNgOtlp.port | default 30317 }}
nodePort: {{ .axosyslogOtlp.port | default 30317 }}
port: 4317
targetPort: otlp
{{- end }}
Expand Down
10 changes: 5 additions & 5 deletions charts/axosyslog/templates/syslog-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ data:
{{- end }}
{{- end }}

{{- with .Values.syslog.config.sources.syslogNgOtlp }}
{{- with .Values.syslog.config.sources.axosyslogOtlp }}
{{- if .enabled }}
source s_syslogng_otlp {
syslog-ng-otlp();
axosyslog-otlp();
};
{{- end }}
{{- end }}
Expand All @@ -68,7 +68,7 @@ data:
{{- if .Values.syslog.config.sources.syslog.enabled }}
source (s_syslog);
{{- end }}
{{- if .Values.syslog.config.sources.syslogNgOtlp.enabled }}
{{- if .Values.syslog.config.sources.axosyslogOtlp.enabled }}
source (s_syslogng_otlp);
{{- end }}

Expand Down Expand Up @@ -133,10 +133,10 @@ data:
};
{{- end }}
{{- end }}
{{- with .Values.syslog.config.destinations.syslogNgOtlp }}
{{- with .Values.syslog.config.destinations.axosyslogOtlp }}
{{- if .enabled }}
destination {
syslog-ng-otlp (
axosyslog-otlp (
url({{ tpl .url $ | quote }})
{{- if .extraOptionsRaw }}
{{ .extraOptionsRaw }}
Expand Down
12 changes: 6 additions & 6 deletions charts/axosyslog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ collector:
peerVerify: false
template: "$(format-json .*)"
extraOptionsRaw: "time-reopen(10)"
syslogNgOtlp:
axosyslogOtlp:
enabled: false
url: "192.168.77.133:4317"
extraOptionsRaw: "time-reopen(1) batch-timeout(1000) batch-lines(1000)"
Expand Down Expand Up @@ -74,7 +74,7 @@ syslog:
enabled: false
storageClass: standard
size: 10Gi
config:
config:
raw: "" # Use this to manually set the contents of the syslog-ng.conf file.
stats:
level: 2
Expand All @@ -94,12 +94,12 @@ syslog:
# Cert: "/path/to/Cert.pem"
# Key: "/path/to/Key.pem"
# peerVerify: false
syslogNgOtlp:
axosyslogOtlp:
enabled: true
# nodePort
port: 30317
extraOptionsRaw: ""

rewrites:
set: {}
# foo: "${foovalue}"
Expand Down Expand Up @@ -134,11 +134,11 @@ syslog:
# peerVerify: false
#template: "$(format-json --scope rfc5424 --exclude DATE --key ISODATE @timestamp=${ISODATE})"
extraOptionsRaw: "time-reopen(10)"
syslogNgOtlp:
axosyslogOtlp:
enabled: false
url: "192.168.77.133:4317"
extraOptionsRaw: "time-reopen(1) batch-timeout(1000) batch-lines(1000)"

metricsExporter:
enabled: false # deploy the axosyslog Deamonset with the axosyslog-metrics-exporter sidecar
image:
Expand Down
10 changes: 10 additions & 0 deletions modules/grpc/otel/otel-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ static Plugin otel_plugins[] =
.name = "syslog_ng_otlp",
.parser = &otel_parser,
},
{
.type = LL_CONTEXT_DESTINATION,
.name = "axosyslog_otlp",
.parser = &otel_parser,
},
{
.type = LL_CONTEXT_SOURCE,
.name = "axosyslog_otlp",
.parser = &otel_parser,
},
{
.type = LL_CONTEXT_FILTERX_ENUM,
.name = "otel",
Expand Down
Loading