diff --git a/docs/LICENSE_OF_DEPENDENCIES.md b/docs/LICENSE_OF_DEPENDENCIES.md index 1e1b917323191..c50434b37019d 100644 --- a/docs/LICENSE_OF_DEPENDENCIES.md +++ b/docs/LICENSE_OF_DEPENDENCIES.md @@ -201,7 +201,6 @@ following works: - github.com/hashicorp/serf [Mozilla Public License 2.0](https://github.com/hashicorp/serf/blob/master/LICENSE) - github.com/huandu/xstrings [MIT License](https://github.com/huandu/xstrings/blob/master/LICENSE) - github.com/imdario/mergo [BSD 3-Clause "New" or "Revised" License](https://github.com/imdario/mergo/blob/master/LICENSE) -- github.com/influxdata/go-syslog [MIT License](https://github.com/influxdata/go-syslog/blob/develop/LICENSE) - github.com/influxdata/influxdb-observability/common [MIT License](https://github.com/influxdata/influxdb-observability/blob/main/LICENSE) - github.com/influxdata/influxdb-observability/influx2otel [MIT License](https://github.com/influxdata/influxdb-observability/blob/main/LICENSE) - github.com/influxdata/influxdb-observability/otel2influx [MIT License](https://github.com/influxdata/influxdb-observability/blob/main/LICENSE) @@ -243,6 +242,7 @@ following works: - github.com/klauspost/pgzip [MIT License](https://github.com/klauspost/pgzip/blob/master/LICENSE) - github.com/kolo/xmlrpc [MIT License](https://github.com/kolo/xmlrpc/blob/master/LICENSE) - github.com/kylelemons/godebug [Apache License 2.0](https://github.com/kylelemons/godebug/blob/master/LICENSE) +- github.com/leodido/go-syslog [MIT License](https://github.com/influxdata/go-syslog/blob/develop/LICENSE) - github.com/leodido/ragel-machinery [MIT License](https://github.com/leodido/ragel-machinery/blob/develop/LICENSE) - github.com/linkedin/goavro [Apache License 2.0](https://github.com/linkedin/goavro/blob/master/LICENSE) - github.com/logzio/azure-monitor-metrics-receiver [MIT License](https://github.com/logzio/azure-monitor-metrics-receiver/blob/master/LICENSE) diff --git a/go.mod b/go.mod index 36ecf375cc224..04394442aba3a 100644 --- a/go.mod +++ b/go.mod @@ -107,7 +107,6 @@ require ( github.com/hashicorp/consul/api v1.26.1 github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/golang-lru/v2 v2.0.7 - github.com/influxdata/go-syslog/v3 v3.0.0 github.com/influxdata/influxdb-observability/common v0.5.12 github.com/influxdata/influxdb-observability/influx2otel v0.5.12 github.com/influxdata/influxdb-observability/otel2influx v0.5.12 @@ -130,6 +129,7 @@ require ( github.com/klauspost/compress v1.17.7 github.com/klauspost/pgzip v1.2.6 github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b + github.com/leodido/go-syslog/v4 v4.1.0 github.com/linkedin/goavro/v2 v2.12.0 github.com/logzio/azure-monitor-metrics-receiver v1.0.1 github.com/lxc/incus v0.4.0 @@ -383,7 +383,7 @@ require ( github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/kr/fs v0.1.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 // indirect + github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b // indirect github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect diff --git a/go.sum b/go.sum index 721d39d84312e..43f48e54510eb 100644 --- a/go.sum +++ b/go.sum @@ -1531,8 +1531,6 @@ github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/go-syslog/v3 v3.0.0 h1:jichmjSZlYK0VMmlz+k4WeOQd7z745YLsvGMqwtYt4I= -github.com/influxdata/go-syslog/v3 v3.0.0/go.mod h1:tulsOp+CecTAYC27u9miMgq21GqXRW6VdKbOG+QSP4Q= github.com/influxdata/influxdb-observability/common v0.5.12 h1:4YwZ+vsodz6VfoiX+ZqVotmnyCa9vCCPksSBK/WLjBs= github.com/influxdata/influxdb-observability/common v0.5.12/go.mod h1:u+CABnGO/F1IK51pDlZQroh4+igJNo695XrbLGDBhVc= github.com/influxdata/influxdb-observability/influx2otel v0.5.12 h1:u0lNE3+63rILk4mtmCYsNyczH/1wEXnM+1aBzBe5akk= @@ -1719,8 +1717,10 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leesper/go_rng v0.0.0-20190531154944-a612b043e353 h1:X/79QL0b4YJVO5+OsPH9rF2u428CIrGL/jLmPsoOQQ4= github.com/leesper/go_rng v0.0.0-20190531154944-a612b043e353/go.mod h1:N0SVk0uhy+E1PZ3C9ctsPRlvOPAFPkCNlcPBDkt0N3U= -github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 h1:bCiVCRCs1Heq84lurVinUPy19keqGEe4jh5vtK37jcg= -github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= +github.com/leodido/go-syslog/v4 v4.1.0 h1:Wsl194qyWXr7V6DrGWC3xmxA9Ra6XgWO+toNt2fmCaI= +github.com/leodido/go-syslog/v4 v4.1.0/go.mod h1:eJ8rUfDN5OS6dOkCOBYlg2a+hbAg6pJa99QXXgMrd98= +github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b h1:11UHH39z1RhZ5dc4y4r/4koJo6IYFgTRMe/LlwRTEw0= +github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= diff --git a/plugins/inputs/syslog/syslog.go b/plugins/inputs/syslog/syslog.go index 5b8d63cced470..6f5517abc8fe0 100644 --- a/plugins/inputs/syslog/syslog.go +++ b/plugins/inputs/syslog/syslog.go @@ -12,11 +12,11 @@ import ( "sync" "unicode" - "github.com/influxdata/go-syslog/v3" - "github.com/influxdata/go-syslog/v3/nontransparent" - "github.com/influxdata/go-syslog/v3/octetcounting" - "github.com/influxdata/go-syslog/v3/rfc3164" - "github.com/influxdata/go-syslog/v3/rfc5424" + "github.com/leodido/go-syslog/v4" + "github.com/leodido/go-syslog/v4/nontransparent" + "github.com/leodido/go-syslog/v4/octetcounting" + "github.com/leodido/go-syslog/v4/rfc3164" + "github.com/leodido/go-syslog/v4/rfc5424" "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/plugins/common/socket" diff --git a/plugins/inputs/syslog/syslog_test.go b/plugins/inputs/syslog/syslog_test.go index e8822369151eb..a4e96cbb06c90 100644 --- a/plugins/inputs/syslog/syslog_test.go +++ b/plugins/inputs/syslog/syslog_test.go @@ -13,7 +13,6 @@ import ( "github.com/stretchr/testify/require" - "github.com/influxdata/go-syslog/v3/nontransparent" "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/config" "github.com/influxdata/telegraf/metric" @@ -21,6 +20,7 @@ import ( "github.com/influxdata/telegraf/plugins/inputs" influx "github.com/influxdata/telegraf/plugins/parsers/influx/influx_upstream" "github.com/influxdata/telegraf/testutil" + "github.com/leodido/go-syslog/v4/nontransparent" ) var pki = testutil.NewPKI("../../../testutil/pki") diff --git a/plugins/inputs/syslog/testcases/non_transparent_best_effort_tcp_1st_avg_ok/expected.err b/plugins/inputs/syslog/testcases/non_transparent_best_effort_tcp_1st_avg_ok/expected.err deleted file mode 100644 index 4893e07d1c96b..0000000000000 --- a/plugins/inputs/syslog/testcases/non_transparent_best_effort_tcp_1st_avg_ok/expected.err +++ /dev/null @@ -1 +0,0 @@ -unexpected EOF \ No newline at end of file diff --git a/plugins/inputs/syslog/testcases/non_transparent_best_effort_tcptls_1st_avg_ok/expected.err b/plugins/inputs/syslog/testcases/non_transparent_best_effort_tcptls_1st_avg_ok/expected.err deleted file mode 100644 index 4893e07d1c96b..0000000000000 --- a/plugins/inputs/syslog/testcases/non_transparent_best_effort_tcptls_1st_avg_ok/expected.err +++ /dev/null @@ -1 +0,0 @@ -unexpected EOF \ No newline at end of file diff --git a/plugins/inputs/syslog/testcases/non_transparent_best_effort_unix/expected.err b/plugins/inputs/syslog/testcases/non_transparent_best_effort_unix/expected.err deleted file mode 100644 index 4893e07d1c96b..0000000000000 --- a/plugins/inputs/syslog/testcases/non_transparent_best_effort_unix/expected.err +++ /dev/null @@ -1 +0,0 @@ -unexpected EOF \ No newline at end of file diff --git a/plugins/inputs/syslog/testcases/non_transparent_best_effort_unixtls/expected.err b/plugins/inputs/syslog/testcases/non_transparent_best_effort_unixtls/expected.err deleted file mode 100644 index 4893e07d1c96b..0000000000000 --- a/plugins/inputs/syslog/testcases/non_transparent_best_effort_unixtls/expected.err +++ /dev/null @@ -1 +0,0 @@ -unexpected EOF \ No newline at end of file diff --git a/plugins/inputs/syslog/testcases/non_transparent_strict_tcp_1st_avg_ok/expected.err b/plugins/inputs/syslog/testcases/non_transparent_strict_tcp_1st_avg_ok/expected.err deleted file mode 100644 index 4893e07d1c96b..0000000000000 --- a/plugins/inputs/syslog/testcases/non_transparent_strict_tcp_1st_avg_ok/expected.err +++ /dev/null @@ -1 +0,0 @@ -unexpected EOF \ No newline at end of file diff --git a/plugins/inputs/syslog/testcases/non_transparent_strict_tcp_1st_avg_ok/input.txt b/plugins/inputs/syslog/testcases/non_transparent_strict_tcp_1st_avg_ok/input.txt index ad3cfd6362703..38a7445e2e85c 100644 --- a/plugins/inputs/syslog/testcases/non_transparent_strict_tcp_1st_avg_ok/input.txt +++ b/plugins/inputs/syslog/testcases/non_transparent_strict_tcp_1st_avg_ok/input.txt @@ -1 +1 @@ -<29>1 2016-02-21T04:32:57+00:00 web1 someservice 2341 2 [origin][meta sequence="14125553" service="someservice"] "GET /v1/ok HTTP/1.1" 200 145 "-" "hacheck 0.9.0" 24306 127.0.0.1:40124 575 \ No newline at end of file +<29>1 2016-02-21T04:32:57+00:00 web1 someservice 2341 2 [origin][meta sequence="14125553" service="someservice"] "GET /v1/ok HTTP/1.1" 200 145 "-" "hacheck 0.9.0" 24306 127.0.0.1:40124 575 diff --git a/plugins/inputs/syslog/testcases/non_transparent_strict_tcptls_1st_avg_ok/expected.err b/plugins/inputs/syslog/testcases/non_transparent_strict_tcptls_1st_avg_ok/expected.err deleted file mode 100644 index 4893e07d1c96b..0000000000000 --- a/plugins/inputs/syslog/testcases/non_transparent_strict_tcptls_1st_avg_ok/expected.err +++ /dev/null @@ -1 +0,0 @@ -unexpected EOF \ No newline at end of file diff --git a/plugins/inputs/syslog/testcases/non_transparent_strict_tcptls_1st_avg_ok/input.txt b/plugins/inputs/syslog/testcases/non_transparent_strict_tcptls_1st_avg_ok/input.txt index ad3cfd6362703..38a7445e2e85c 100644 --- a/plugins/inputs/syslog/testcases/non_transparent_strict_tcptls_1st_avg_ok/input.txt +++ b/plugins/inputs/syslog/testcases/non_transparent_strict_tcptls_1st_avg_ok/input.txt @@ -1 +1 @@ -<29>1 2016-02-21T04:32:57+00:00 web1 someservice 2341 2 [origin][meta sequence="14125553" service="someservice"] "GET /v1/ok HTTP/1.1" 200 145 "-" "hacheck 0.9.0" 24306 127.0.0.1:40124 575 \ No newline at end of file +<29>1 2016-02-21T04:32:57+00:00 web1 someservice 2341 2 [origin][meta sequence="14125553" service="someservice"] "GET /v1/ok HTTP/1.1" 200 145 "-" "hacheck 0.9.0" 24306 127.0.0.1:40124 575 diff --git a/plugins/inputs/syslog/testcases/non_transparent_strict_unix/expected.err b/plugins/inputs/syslog/testcases/non_transparent_strict_unix/expected.err deleted file mode 100644 index 4893e07d1c96b..0000000000000 --- a/plugins/inputs/syslog/testcases/non_transparent_strict_unix/expected.err +++ /dev/null @@ -1 +0,0 @@ -unexpected EOF \ No newline at end of file diff --git a/plugins/inputs/syslog/testcases/non_transparent_strict_unix/input.txt b/plugins/inputs/syslog/testcases/non_transparent_strict_unix/input.txt index ad3cfd6362703..38a7445e2e85c 100644 --- a/plugins/inputs/syslog/testcases/non_transparent_strict_unix/input.txt +++ b/plugins/inputs/syslog/testcases/non_transparent_strict_unix/input.txt @@ -1 +1 @@ -<29>1 2016-02-21T04:32:57+00:00 web1 someservice 2341 2 [origin][meta sequence="14125553" service="someservice"] "GET /v1/ok HTTP/1.1" 200 145 "-" "hacheck 0.9.0" 24306 127.0.0.1:40124 575 \ No newline at end of file +<29>1 2016-02-21T04:32:57+00:00 web1 someservice 2341 2 [origin][meta sequence="14125553" service="someservice"] "GET /v1/ok HTTP/1.1" 200 145 "-" "hacheck 0.9.0" 24306 127.0.0.1:40124 575 diff --git a/plugins/inputs/syslog/testcases/non_transparent_strict_unixtls/expected.err b/plugins/inputs/syslog/testcases/non_transparent_strict_unixtls/expected.err deleted file mode 100644 index 4893e07d1c96b..0000000000000 --- a/plugins/inputs/syslog/testcases/non_transparent_strict_unixtls/expected.err +++ /dev/null @@ -1 +0,0 @@ -unexpected EOF \ No newline at end of file diff --git a/plugins/inputs/syslog/testcases/non_transparent_strict_unixtls/input.txt b/plugins/inputs/syslog/testcases/non_transparent_strict_unixtls/input.txt index ad3cfd6362703..38a7445e2e85c 100644 --- a/plugins/inputs/syslog/testcases/non_transparent_strict_unixtls/input.txt +++ b/plugins/inputs/syslog/testcases/non_transparent_strict_unixtls/input.txt @@ -1 +1 @@ -<29>1 2016-02-21T04:32:57+00:00 web1 someservice 2341 2 [origin][meta sequence="14125553" service="someservice"] "GET /v1/ok HTTP/1.1" 200 145 "-" "hacheck 0.9.0" 24306 127.0.0.1:40124 575 \ No newline at end of file +<29>1 2016-02-21T04:32:57+00:00 web1 someservice 2341 2 [origin][meta sequence="14125553" service="someservice"] "GET /v1/ok HTTP/1.1" 200 145 "-" "hacheck 0.9.0" 24306 127.0.0.1:40124 575 diff --git a/plugins/outputs/syslog/syslog.go b/plugins/outputs/syslog/syslog.go index cb2538d931873..688d7f1f74a1e 100644 --- a/plugins/outputs/syslog/syslog.go +++ b/plugins/outputs/syslog/syslog.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/influxdata/go-syslog/v3/nontransparent" - "github.com/influxdata/go-syslog/v3/rfc5424" + "github.com/leodido/go-syslog/v4/nontransparent" + "github.com/leodido/go-syslog/v4/rfc5424" "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/config" diff --git a/plugins/outputs/syslog/syslog_mapper.go b/plugins/outputs/syslog/syslog_mapper.go index 56bcf85e4bafc..05665160ee645 100644 --- a/plugins/outputs/syslog/syslog_mapper.go +++ b/plugins/outputs/syslog/syslog_mapper.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/influxdata/go-syslog/v3/rfc5424" + "github.com/leodido/go-syslog/v4/rfc5424" "github.com/influxdata/telegraf" ) diff --git a/plugins/outputs/syslog/syslog_test.go b/plugins/outputs/syslog/syslog_test.go index 8e5e76967c11d..9bbb4199dc7e1 100644 --- a/plugins/outputs/syslog/syslog_test.go +++ b/plugins/outputs/syslog/syslog_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/influxdata/go-syslog/v3/nontransparent" "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/metric" "github.com/influxdata/telegraf/testutil" + "github.com/leodido/go-syslog/v4/nontransparent" ) func TestGetSyslogMessageWithFramingOctectCounting(t *testing.T) {