Add syslog output plugin (#5802)

This commit is contained in:
javicrespo
2019-05-08 20:21:51 +02:00
committed by Daniel Nelson
parent dfb1387771
commit 761705c299
12 changed files with 963 additions and 8 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/influxdata/telegraf/internal"
framing "github.com/influxdata/telegraf/internal/syslog"
"github.com/influxdata/telegraf/testutil"
"github.com/stretchr/testify/require"
)
@@ -138,7 +139,7 @@ func testStrictNonTransparent(t *testing.T, protocol string, address string, wan
for _, tc := range getTestCasesForNonTransparent() {
t.Run(tc.name, func(t *testing.T) {
// Creation of a strict mode receiver
receiver := newTCPSyslogReceiver(protocol+"://"+address, keepAlive, 0, false, NonTransparent)
receiver := newTCPSyslogReceiver(protocol+"://"+address, keepAlive, 0, false, framing.NonTransparent)
require.NotNil(t, receiver)
if wantTLS {
receiver.ServerConfig = *pki.TLSServerConfig()
@@ -200,7 +201,7 @@ func testBestEffortNonTransparent(t *testing.T, protocol string, address string,
for _, tc := range getTestCasesForNonTransparent() {
t.Run(tc.name, func(t *testing.T) {
// Creation of a best effort mode receiver
receiver := newTCPSyslogReceiver(protocol+"://"+address, keepAlive, 0, true, NonTransparent)
receiver := newTCPSyslogReceiver(protocol+"://"+address, keepAlive, 0, true, framing.NonTransparent)
require.NotNil(t, receiver)
if wantTLS {
receiver.ServerConfig = *pki.TLSServerConfig()