Skip to content

Commit dab7d3f

Browse files
haimrubinsteinandrzej-stenceldjaglowski
authored
Add allow skip pri otion to syslog. (#30869)
**Description:** Currently syslog parser (and receiver) are enforcing a pri header at the beginning of each syslog message. This behavior is incorrect since syslog RFC doesn't require a pri header. to fix this I added a new 'allow_skip_pri_header' (default false) to syslog config to allow users to choose if they want to allow the parser to skip the pri existence validation. the main issue was that the syslog parser is using influxdata/go-syslog library which unfortunately is not maintained anymore (according to the repo PR history). we had a couple of options to fix it and after a long discussion [here](#30397) we have decided to move to a new forked repo. so I forked the repo, made the necessary changes and updated the syslog parser to start using the new repo. after that, I ran: make goproto, make crosslink, make -j8 gotidy. and as a result many files (mostly go.mod and go.sum) files changed. **Link to tracking Issue:** #30397 **Testing:** Manual testing for both RFC 3164 and 5424 with and without pri header. --------- Co-authored-by: Andrzej Stencel <[email protected]> Co-authored-by: Daniel Jaglowski <[email protected]>
1 parent 05ecf08 commit dab7d3f

File tree

46 files changed

+251
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+251
-62
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: bug_fix
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: pkg/stanza
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "Add 'allow_skip_pri_header' flag to syslog setting."
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [30397]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: |
19+
Allow parsing syslog records without PRI header. Currently pri header is beng enforced although it's not mandatory by the RFC standard. Since influxdata/go-syslog is not maintained we had to switch to haimrubinstein/go-syslog.
20+
21+
# If your change doesn't affect end users or the exported elements of any package,
22+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
23+
# Optional: The change log or logs in which this entry should be included.
24+
# e.g. '[user]' or '[user, api]'
25+
# Include 'user' if the change is relevant to end users.
26+
# Include 'api' if there is a change to a library API.
27+
# Default: '[user]'
28+
change_logs: []

cmd/configschema/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ require (
381381
github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445 // indirect
382382
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect
383383
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
384+
github.com/haimrubinstein/go-syslog/v3 v3.0.0 // indirect
384385
github.com/hashicorp/consul/api v1.27.0 // indirect
385386
github.com/hashicorp/cronexpr v1.1.2 // indirect
386387
github.com/hashicorp/errwrap v1.1.0 // indirect
@@ -401,7 +402,6 @@ require (
401402
github.com/iancoleman/strcase v0.3.0 // indirect
402403
github.com/imdario/mergo v0.3.16 // indirect
403404
github.com/inconshreveable/mousetrap v1.1.0 // indirect
404-
github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // indirect
405405
github.com/influxdata/influxdb-observability/common v0.5.8 // indirect
406406
github.com/influxdata/influxdb-observability/influx2otel v0.5.8 // indirect
407407
github.com/influxdata/influxdb-observability/otel2influx v0.5.8 // indirect

cmd/configschema/go.sum

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/otelcontribcol/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ require (
433433
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect
434434
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
435435
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
436+
github.com/haimrubinstein/go-syslog/v3 v3.0.0 // indirect
436437
github.com/hashicorp/consul/api v1.27.0 // indirect
437438
github.com/hashicorp/cronexpr v1.1.2 // indirect
438439
github.com/hashicorp/errwrap v1.1.0 // indirect
@@ -453,7 +454,6 @@ require (
453454
github.com/iancoleman/strcase v0.3.0 // indirect
454455
github.com/imdario/mergo v0.3.16 // indirect
455456
github.com/inconshreveable/mousetrap v1.1.0 // indirect
456-
github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // indirect
457457
github.com/influxdata/influxdb-observability/common v0.5.8 // indirect
458458
github.com/influxdata/influxdb-observability/influx2otel v0.5.8 // indirect
459459
github.com/influxdata/influxdb-observability/otel2influx v0.5.8 // indirect

cmd/otelcontribcol/go.sum

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/oteltestbedcol/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ require (
117117
github.com/gorilla/websocket v1.5.0 // indirect
118118
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect
119119
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect
120+
github.com/haimrubinstein/go-syslog/v3 v3.0.0 // indirect
120121
github.com/hashicorp/consul/api v1.25.1 // indirect
121122
github.com/hashicorp/cronexpr v1.1.2 // indirect
122123
github.com/hashicorp/errwrap v1.1.0 // indirect
@@ -135,7 +136,6 @@ require (
135136
github.com/iancoleman/strcase v0.3.0 // indirect
136137
github.com/imdario/mergo v0.3.16 // indirect
137138
github.com/inconshreveable/mousetrap v1.1.0 // indirect
138-
github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // indirect
139139
github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect
140140
github.com/jaegertracing/jaeger v1.53.0 // indirect
141141
github.com/jmespath/go-jmespath v0.4.0 // indirect

cmd/oteltestbedcol/go.sum

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

connector/datadogconnector/go.sum

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exporter/datadogexporter/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ require (
138138
github.com/gorilla/websocket v1.5.0 // indirect
139139
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect
140140
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
141+
github.com/haimrubinstein/go-syslog/v3 v3.0.0 // indirect
141142
github.com/hashicorp/consul/api v1.27.0 // indirect
142143
github.com/hashicorp/cronexpr v1.1.2 // indirect
143144
github.com/hashicorp/errwrap v1.1.0 // indirect
@@ -155,7 +156,6 @@ require (
155156
github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect
156157
github.com/imdario/mergo v0.3.16 // indirect
157158
github.com/inconshreveable/mousetrap v1.1.0 // indirect
158-
github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // indirect
159159
github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect
160160
github.com/jmespath/go-jmespath v0.4.0 // indirect
161161
github.com/josharian/intern v1.0.0 // indirect

exporter/datadogexporter/go.sum

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)