chore: Wrap long lines in plugins/inputs/[a-d]* (#12185)

This commit is contained in:
Paweł Żak 2022-11-08 18:41:17 +01:00 committed by GitHub
parent 8203b503b7
commit b9bba638b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 29238 additions and 115 deletions

View File

@ -338,7 +338,14 @@ func (a *Aerospike) getTTLHistogram(acc telegraf.Accumulator, hostPort string, n
return nil
}
func (a *Aerospike) getObjectSizeLinearHistogram(acc telegraf.Accumulator, hostPort string, namespace string, set string, n *as.Node, infoPolicy *as.InfoPolicy) error {
func (a *Aerospike) getObjectSizeLinearHistogram(
acc telegraf.Accumulator,
hostPort string,
namespace string,
set string,
n *as.Node,
infoPolicy *as.InfoPolicy,
) error {
stats, err := a.getHistogram(namespace, set, "object-size-linear", n, infoPolicy)
if err != nil {
return err

View File

@ -16,9 +16,10 @@ import (
"github.com/aliyun/alibaba-cloud-sdk-go/services/rds"
"github.com/aliyun/alibaba-cloud-sdk-go/services/slb"
"github.com/aliyun/alibaba-cloud-sdk-go/services/vpc"
"github.com/pkg/errors"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/internal/limiter"
"github.com/pkg/errors"
)
type discoveryRequest interface {
@ -86,7 +87,14 @@ func getRPCReqFromDiscoveryRequest(req discoveryRequest) (*requests.RpcRequest,
// Discovery is supported for a limited set of object types (defined by project) and can be extended in future.
// Discovery can be limited by region if not set, then all regions is queried.
// Request against API can inquire additional costs, consult with aliyun API documentation.
func newDiscoveryTool(regions []string, project string, lg telegraf.Logger, credential auth.Credential, rateLimit int, discoveryInterval time.Duration) (*discoveryTool, error) {
func newDiscoveryTool(
regions []string,
project string,
lg telegraf.Logger,
credential auth.Credential,
rateLimit int,
discoveryInterval time.Duration,
) (*discoveryTool, error) {
var (
dscReq = map[string]discoveryRequest{}
cli = map[string]aliyunSdkClient{}

View File

@ -6,11 +6,12 @@ import (
"net/http/httptest"
"testing"
"github.com/influxdata/telegraf/testutil"
"github.com/stretchr/testify/require"
"github.com/influxdata/telegraf/testutil"
)
//nolint:lll,revive // conditionally long lines allowed
var apacheStatus = `
Total Accesses: 129811861
Total kBytes: 5213701865

View File

@ -62,7 +62,12 @@ func (a *AzureStorageQueue) GetServiceURL() (azqueue.ServiceURL, error) {
return *a.serviceURL, nil
}
func (a *AzureStorageQueue) GatherQueueMetrics(acc telegraf.Accumulator, queueItem azqueue.QueueItem, properties *azqueue.QueueGetPropertiesResponse, peekedMessage *azqueue.PeekedMessage) {
func (a *AzureStorageQueue) GatherQueueMetrics(
acc telegraf.Accumulator,
queueItem azqueue.QueueItem,
properties *azqueue.QueueGetPropertiesResponse,
peekedMessage *azqueue.PeekedMessage,
) {
fields := make(map[string]interface{})
tags := make(map[string]string)
tags["queue"] = strings.TrimSpace(queueItem.Name)

View File

@ -3,8 +3,9 @@ package bond
import (
"testing"
"github.com/influxdata/telegraf/testutil"
"github.com/stretchr/testify/require"
"github.com/influxdata/telegraf/testutil"
)
const sampleTestAB = `
@ -86,16 +87,41 @@ func TestGatherBondInterface(t *testing.T) {
require.NoError(t, bond.gatherBondInterface("bondAB", sampleTestAB, &acc))
acc.AssertContainsTaggedFields(t, "bond", map[string]interface{}{"active_slave": "eth2", "status": 1}, map[string]string{"bond": "bondAB"})
acc.AssertContainsTaggedFields(t, "bond_slave", map[string]interface{}{"failures": 2, "status": 0}, map[string]string{"bond": "bondAB", "interface": "eth3"})
acc.AssertContainsTaggedFields(t, "bond_slave", map[string]interface{}{"failures": 0, "status": 1}, map[string]string{"bond": "bondAB", "interface": "eth2"})
acc.AssertContainsTaggedFields(
t,
"bond_slave",
map[string]interface{}{"failures": 2, "status": 0},
map[string]string{"bond": "bondAB", "interface": "eth3"},
)
acc.AssertContainsTaggedFields(
t,
"bond_slave",
map[string]interface{}{"failures": 0, "status": 1},
map[string]string{"bond": "bondAB", "interface": "eth2"},
)
acc.AssertContainsTaggedFields(t, "bond_slave", map[string]interface{}{"count": 2}, map[string]string{"bond": "bondAB"})
acc = testutil.Accumulator{}
require.NoError(t, bond.gatherBondInterface("bondLACP", sampleTestLACP, &acc))
bond.gatherSysDetails("bondLACP", sysFiles{ModeFile: sampleSysMode, SlaveFile: sampleSysSlaves, ADPortsFile: sampleSysAdPorts}, &acc)
acc.AssertContainsTaggedFields(t, "bond", map[string]interface{}{"status": 1}, map[string]string{"bond": "bondLACP"})
acc.AssertContainsTaggedFields(t, "bond_slave", map[string]interface{}{"failures": 2, "status": 1, "actor_churned": 2, "partner_churned": 0, "total_churned": 2}, map[string]string{"bond": "bondLACP", "interface": "eth0"})
acc.AssertContainsTaggedFields(t, "bond_slave", map[string]interface{}{"failures": 1, "status": 1, "actor_churned": 0, "partner_churned": 0, "total_churned": 0}, map[string]string{"bond": "bondLACP", "interface": "eth1"})
acc.AssertContainsTaggedFields(
t,
"bond_slave",
map[string]interface{}{"failures": 2, "status": 1, "actor_churned": 2, "partner_churned": 0, "total_churned": 2},
map[string]string{"bond": "bondLACP", "interface": "eth0"},
)
acc.AssertContainsTaggedFields(
t,
"bond_slave",
map[string]interface{}{"failures": 1, "status": 1, "actor_churned": 0, "partner_churned": 0, "total_churned": 0},
map[string]string{"bond": "bondLACP", "interface": "eth1"},
)
acc.AssertContainsTaggedFields(t, "bond_slave", map[string]interface{}{"count": 2}, map[string]string{"bond": "bondLACP"})
acc.AssertContainsTaggedFields(t, "bond_sys", map[string]interface{}{"slave_count": 2, "ad_port_count": 2}, map[string]string{"bond": "bondLACP", "mode": "802.3ad"})
acc.AssertContainsTaggedFields(
t,
"bond_sys",
map[string]interface{}{"slave_count": 2, "ad_port_count": 2},
map[string]string{"bond": "bondLACP", "mode": "802.3ad"},
)
}

View File

@ -188,7 +188,8 @@ func (c *CiscoTelemetryMDT) Start(acc telegraf.Accumulator) error {
opts = append(opts, grpc.MaxRecvMsgSize(c.MaxMsgSize))
}
if c.EnforcementPolicy.PermitKeepaliveWithoutCalls || (c.EnforcementPolicy.KeepaliveMinTime != 0 && c.EnforcementPolicy.KeepaliveMinTime != defaultKeepaliveMinTime) {
if c.EnforcementPolicy.PermitKeepaliveWithoutCalls ||
(c.EnforcementPolicy.KeepaliveMinTime != 0 && c.EnforcementPolicy.KeepaliveMinTime != defaultKeepaliveMinTime) {
// Only set if either parameter does not match defaults
opts = append(opts, grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
MinTime: time.Duration(c.EnforcementPolicy.KeepaliveMinTime),

View File

@ -395,7 +395,14 @@ func TestHandleNXAPIXformNXAPI(t *testing.T) {
c.handleTelemetry(data)
require.Empty(t, acc.Errors)
tags1 := map[string]string{"path": "show processes cpu", "foo": "bar", "TABLE_process_cpu": "i1", "row_number": "0", "source": "hostname", "subscription": "subscription"}
tags1 := map[string]string{
"path": "show processes cpu",
"foo": "bar",
"TABLE_process_cpu": "i1",
"row_number": "0",
"source": "hostname",
"subscription": "subscription",
}
fields1 := map[string]interface{}{"value": "foo"}
acc.AssertContainsTaggedFields(t, "show processes cpu", fields1, tags1)
}

View File

@ -580,18 +580,25 @@ const (
systemZookeeperRootNodesSQL = "SELECT count() AS zk_root_nodes FROM system.zookeeper WHERE path='/'"
systemReplicationExistsSQL = "SELECT count() AS replication_queue_exists FROM system.tables WHERE database='system' AND name='replication_queue'"
systemReplicationNumTriesSQL = "SELECT countIf(num_tries>1) AS replication_num_tries_replicas, countIf(num_tries>100) AS replication_too_many_tries_replicas FROM system.replication_queue SETTINGS empty_result_for_aggregation_by_empty_set=0"
systemReplicationNumTriesSQL = "SELECT countIf(num_tries>1) AS replication_num_tries_replicas, countIf(num_tries>100) " +
"AS replication_too_many_tries_replicas FROM system.replication_queue SETTINGS empty_result_for_aggregation_by_empty_set=0"
systemDetachedPartsSQL = "SELECT count() AS detached_parts FROM system.detached_parts SETTINGS empty_result_for_aggregation_by_empty_set=0"
systemDictionariesSQL = "SELECT origin, status, bytes_allocated FROM system.dictionaries"
systemMutationSQL = "SELECT countIf(latest_fail_time>toDateTime('0000-00-00 00:00:00') AND is_done=0) AS failed, countIf(latest_fail_time=toDateTime('0000-00-00 00:00:00') AND is_done=0) AS running, countIf(is_done=1) AS completed FROM system.mutations SETTINGS empty_result_for_aggregation_by_empty_set=0"
systemDisksSQL = "SELECT name, path, toUInt64(100*free_space / total_space) AS free_space_percent, toUInt64( 100 * keep_free_space / total_space) AS keep_free_space_percent FROM system.disks"
systemProcessesSQL = "SELECT multiIf(positionCaseInsensitive(query,'select')=1,'select',positionCaseInsensitive(query,'insert')=1,'insert','other') AS query_type, quantile\n(0.5)(elapsed) AS p50, quantile(0.9)(elapsed) AS p90, max(elapsed) AS longest_running FROM system.processes GROUP BY query_type SETTINGS empty_result_for_aggregation_by_empty_set=0"
systemMutationSQL = "SELECT countIf(latest_fail_time>toDateTime('0000-00-00 00:00:00') AND is_done=0) " +
"AS failed, countIf(latest_fail_time=toDateTime('0000-00-00 00:00:00') AND is_done=0) " +
"AS running, countIf(is_done=1) AS completed FROM system.mutations SETTINGS empty_result_for_aggregation_by_empty_set=0"
systemDisksSQL = "SELECT name, path, toUInt64(100*free_space / total_space) " +
"AS free_space_percent, toUInt64( 100 * keep_free_space / total_space) AS keep_free_space_percent FROM system.disks"
systemProcessesSQL = "SELECT multiIf(positionCaseInsensitive(query,'select')=1,'select',positionCaseInsensitive(query,'insert')=1,'insert','other') " +
"AS query_type, quantile\n(0.5)(elapsed) AS p50, quantile(0.9)(elapsed) AS p90, max(elapsed) AS longest_running " +
"FROM system.processes GROUP BY query_type SETTINGS empty_result_for_aggregation_by_empty_set=0"
systemTextLogExistsSQL = "SELECT count() AS text_log_exists FROM system.tables WHERE database='system' AND name='text_log'"
systemTextLogSQL = "SELECT count() AS messages_last_10_min, level FROM system.text_log WHERE level <= 'Notice' AND event_time >= now() - INTERVAL 600 SECOND GROUP BY level SETTINGS empty_result_for_aggregation_by_empty_set=0"
systemTextLogSQL = "SELECT count() AS messages_last_10_min, level FROM system.text_log " +
"WHERE level <= 'Notice' AND event_time >= now() - INTERVAL 600 SECOND GROUP BY level SETTINGS empty_result_for_aggregation_by_empty_set=0"
)
var commonMetrics = map[string]string{

View File

@ -52,7 +52,13 @@ func TestServeHTTP(t *testing.T) {
method: "POST",
path: "/",
status: http.StatusRequestEntityTooLarge,
body: strings.NewReader(`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry","deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},"data":"dGVzdGluZ0dvb2dsZSxzZW5zb3I9Ym1lXzI4MCB0ZW1wX2M9MjMuOTUsaHVtaWRpdHk9NjIuODMgMTUzNjk1Mjk3NDU1MzUxMDIzMQ==","messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z","publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`),
body: strings.NewReader(
`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry",` +
`"deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},` +
`"data":"dGVzdGluZ0dvb2dsZSxzZW5zb3I9Ym1lXzI4MCB0ZW1wX2M9MjMuOTUsaHVtaWRpdHk9NjIuODMgMTUzNjk1Mjk3NDU1MzUxMDIzMQ==",` +
`"messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z",` +
`"publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`,
),
},
{
name: "post valid data",
@ -60,7 +66,13 @@ func TestServeHTTP(t *testing.T) {
path: "/",
maxsize: 500 * 1024 * 1024,
status: http.StatusNoContent,
body: strings.NewReader(`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry","deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},"data":"dGVzdGluZ0dvb2dsZSxzZW5zb3I9Ym1lXzI4MCB0ZW1wX2M9MjMuOTUsaHVtaWRpdHk9NjIuODMgMTUzNjk1Mjk3NDU1MzUxMDIzMQ==","messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z","publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`),
body: strings.NewReader(
`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry",` +
`"deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},` +
`"data":"dGVzdGluZ0dvb2dsZSxzZW5zb3I9Ym1lXzI4MCB0ZW1wX2M9MjMuOTUsaHVtaWRpdHk9NjIuODMgMTUzNjk1Mjk3NDU1MzUxMDIzMQ==",` +
`"messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z",` +
`"publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`,
),
},
{
name: "fail write",
@ -68,8 +80,14 @@ func TestServeHTTP(t *testing.T) {
path: "/",
maxsize: 500 * 1024 * 1024,
status: http.StatusServiceUnavailable,
body: strings.NewReader(`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry","deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},"data":"dGVzdGluZ0dvb2dsZSxzZW5zb3I9Ym1lXzI4MCB0ZW1wX2M9MjMuOTUsaHVtaWRpdHk9NjIuODMgMTUzNjk1Mjk3NDU1MzUxMDIzMQ==","messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z","publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`),
fail: true,
body: strings.NewReader(
`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry",` +
`"deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},` +
`"data":"dGVzdGluZ0dvb2dsZSxzZW5zb3I9Ym1lXzI4MCB0ZW1wX2M9MjMuOTUsaHVtaWRpdHk9NjIuODMgMTUzNjk1Mjk3NDU1MzUxMDIzMQ==",` +
`"messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z",` +
`"publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`,
),
fail: true,
},
{
name: "full buffer",
@ -77,8 +95,14 @@ func TestServeHTTP(t *testing.T) {
path: "/",
maxsize: 500 * 1024 * 1024,
status: http.StatusServiceUnavailable,
body: strings.NewReader(`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry","deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},"data":"dGVzdGluZ0dvb2dsZSxzZW5zb3I9Ym1lXzI4MCB0ZW1wX2M9MjMuOTUsaHVtaWRpdHk9NjIuODMgMTUzNjk1Mjk3NDU1MzUxMDIzMQ==","messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z","publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`),
full: true,
body: strings.NewReader(
`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry",` +
`"deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},` +
`"data":"dGVzdGluZ0dvb2dsZSxzZW5zb3I9Ym1lXzI4MCB0ZW1wX2M9MjMuOTUsaHVtaWRpdHk9NjIuODMgMTUzNjk1Mjk3NDU1MzUxMDIzMQ==",` +
`"messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z",` +
`"publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`,
),
full: true,
},
{
name: "post invalid body",
@ -94,7 +118,12 @@ func TestServeHTTP(t *testing.T) {
path: "/",
maxsize: 500 * 1024 * 1024,
status: http.StatusBadRequest,
body: strings.NewReader(`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry","deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},"data":"not base 64 encoded data","messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z","publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`),
body: strings.NewReader(
`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry",` +
`"deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},"data":"not base 64 encoded data",` +
`"messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z",` +
`"publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`,
),
},
{
name: "post invalid data format",
@ -102,7 +131,13 @@ func TestServeHTTP(t *testing.T) {
path: "/",
maxsize: 500 * 1024 * 1024,
status: http.StatusBadRequest,
body: strings.NewReader(`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry","deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},"data":"bm90IHZhbGlkIGZvcm1hdHRlZCBkYXRh","messageId":"204004313210337","message_id":"204004313210337","publishTime":"2018-09-14T19:22:54.587Z","publish_time":"2018-09-14T19:22:54.587Z"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`),
body: strings.NewReader(
`{"message":{"attributes":{"deviceId":"myPi","deviceNumId":"2808946627307959","deviceRegistryId":"my-registry",` +
`"deviceRegistryLocation":"us-central1","projectId":"conference-demos","subFolder":""},` +
`"data":"bm90IHZhbGlkIGZvcm1hdHRlZCBkYXRh","messageId":"204004313210337","message_id":"204004313210337",` +
`"publishTime":"2018-09-14T19:22:54.587Z","publish_time":"2018-09-14T19:22:54.587Z"},` +
`"subscription":"projects/conference-demos/subscriptions/my-subscription"}`,
),
},
{
name: "post invalid structured body",
@ -110,7 +145,10 @@ func TestServeHTTP(t *testing.T) {
path: "/",
maxsize: 500 * 1024 * 1024,
status: http.StatusBadRequest,
body: strings.NewReader(`{"message":{"attributes":{"thing":1},"data":"bm90IHZhbGlkIGZvcm1hdHRlZCBkYXRh"},"subscription":"projects/conference-demos/subscriptions/my-subscription"}`),
body: strings.NewReader(
`{"message":{"attributes":{"thing":1},"data":"bm90IHZhbGlkIGZvcm1hdHRlZCBkYXRh"},` +
`"subscription":"projects/conference-demos/subscriptions/my-subscription"}`,
),
},
}

View File

@ -21,7 +21,11 @@ import (
type mockGatherCloudWatchClient struct{}
func (m *mockGatherCloudWatchClient) ListMetrics(_ context.Context, params *cwClient.ListMetricsInput, _ ...func(*cwClient.Options)) (*cwClient.ListMetricsOutput, error) {
func (m *mockGatherCloudWatchClient) ListMetrics(
_ context.Context,
params *cwClient.ListMetricsInput,
_ ...func(*cwClient.Options),
) (*cwClient.ListMetricsOutput, error) {
return &cwClient.ListMetricsOutput{
Metrics: []types.Metric{
{
@ -38,7 +42,11 @@ func (m *mockGatherCloudWatchClient) ListMetrics(_ context.Context, params *cwCl
}, nil
}
func (m *mockGatherCloudWatchClient) GetMetricData(_ context.Context, params *cwClient.GetMetricDataInput, _ ...func(*cwClient.Options)) (*cwClient.GetMetricDataOutput, error) {
func (m *mockGatherCloudWatchClient) GetMetricData(
_ context.Context,
params *cwClient.GetMetricDataInput,
_ ...func(*cwClient.Options),
) (*cwClient.GetMetricDataOutput, error) {
return &cwClient.GetMetricDataOutput{
MetricDataResults: []types.MetricDataResult{
{
@ -155,7 +163,11 @@ func TestGather_MultipleNamespaces(t *testing.T) {
type mockSelectMetricsCloudWatchClient struct{}
func (m *mockSelectMetricsCloudWatchClient) ListMetrics(_ context.Context, params *cwClient.ListMetricsInput, _ ...func(*cwClient.Options)) (*cwClient.ListMetricsOutput, error) {
func (m *mockSelectMetricsCloudWatchClient) ListMetrics(
_ context.Context,
params *cwClient.ListMetricsInput,
_ ...func(*cwClient.Options),
) (*cwClient.ListMetricsOutput, error) {
metrics := []types.Metric{}
// 4 metrics are available
metricNames := []string{"Latency", "RequestCount", "HealthyHostCount", "UnHealthyHostCount"}
@ -202,7 +214,11 @@ func (m *mockSelectMetricsCloudWatchClient) ListMetrics(_ context.Context, param
return result, nil
}
func (m *mockSelectMetricsCloudWatchClient) GetMetricData(_ context.Context, params *cwClient.GetMetricDataInput, _ ...func(*cwClient.Options)) (*cwClient.GetMetricDataOutput, error) {
func (m *mockSelectMetricsCloudWatchClient) GetMetricData(
_ context.Context,
params *cwClient.GetMetricDataInput,
_ ...func(*cwClient.Options),
) (*cwClient.GetMetricDataOutput, error) {
return nil, nil
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,9 @@
{
"requestId": "c8291d2e-8c46-4f2a-a8df-2562550287ad",
"timestamp": 1651679861072,
"records": [
{
"data": "eyJtZXRyaWNfc3RyZWFtX25hbWUiOiJncnBuLXNhbmRib3gtZGV2LWNsb3Vkd2F0Y2gtbWV0cmljLXN0cmVhbSIsImFjY291bnRfaWQiOiI1NDk3MzQzOTk3MDkiLCJyZWdpb24iOiJ1cy13ZXN0LTIiLCJuYW1lc3BhY2UiOiJBV1MvRUMyIiwibWV0cmljX25hbWUiOiJDUFVVdGlsaXphdGlvbiIsImRpbWVuc2lvbnMiOnsiSW5zdGFuY2VJZCI6ImktMGVmYzdmZGYwOWMxMjM0MjgifSwidGltZXN0YW1wIjoxNjUxNjc5NTgwMDAwLCJ2YWx1ZSI6eyJtYXgiOjEwLjAxMTY2NjY2NjY2NjY2NywibWluIjoxMC4wMTE2NjY2NjY2NjY2NjcsInN1bSI6MTAuMDExNjY2NjY2NjY2NjY3LCJjb3VudCI6MS4wfSwidW5pdCI6IlBlcmNlbnQifQ=="
}
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,78 @@
{
"op": {
"samples": {
"couch_total_disk_size": [
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341,
559341
]
},
"samplesCount": 60,
"isPersistent": true,
"lastTStamp": 1615918178442,
"interval": 1000
},
"hot_keys": [
{
"name": "first-duck",
"ops": 6.003482019571351e-05
}
]
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,404 @@
{
"storageTotals": {
"ram": {
"total": 450972598272,
"quotaTotal": 360777252864,
"quotaUsed": 360777252864,
"used": 446826622976,
"usedByData": 255061495696,
"quotaUsedPerNode": 51539607552,
"quotaTotalPerNode": 51539607552
},
"hdd": {
"total": 1108766539776,
"quotaTotal": 1108766539776,
"used": 559135126484,
"usedByData": 515767865143,
"free": 498944942902
}
},
"serverGroupsUri": "/pools/default/serverGroups",
"name": "default",
"alerts": [
"Metadata overhead warning. Over 63% of RAM allocated to bucket \"blastro-df\" on node \"172.16.8.148\" is taken up by keys and metadata.",
"Metadata overhead warning. Over 65% of RAM allocated to bucket \"blastro-df\" on node \"172.16.10.65\" is taken up by keys and metadata.",
"Metadata overhead warning. Over 64% of RAM allocated to bucket \"blastro-df\" on node \"172.16.13.173\" is taken up by keys and metadata.",
"Metadata overhead warning. Over 65% of RAM allocated to bucket \"blastro-df\" on node \"172.16.15.75\" is taken up by keys and metadata.",
"Metadata overhead warning. Over 65% of RAM allocated to bucket \"blastro-df\" on node \"172.16.13.105\" is taken up by keys and metadata.",
"Metadata overhead warning. Over 64% of RAM allocated to bucket \"blastro-df\" on node \"172.16.8.127\" is taken up by keys and metadata.",
"Metadata overhead warning. Over 63% of RAM allocated to bucket \"blastro-df\" on node \"172.16.15.120\" is taken up by keys and metadata.",
"Metadata overhead warning. Over 66% of RAM allocated to bucket \"blastro-df\" on node \"172.16.10.187\" is taken up by keys and metadata."
],
"alertsSilenceURL": "/controller/resetAlerts",
"nodes": [
{
"systemStats": {
"cpu_utilization_rate": 35.43307086614173,
"swap_total": 0,
"swap_used": 0,
"mem_total": 64424656896,
"mem_free": 23181365248
},
"interestingStats": {
"cmd_get": 17.98201798201798,
"couch_docs_actual_disk_size": 68506048063,
"couch_docs_data_size": 38718796110,
"couch_views_actual_disk_size": 0,
"couch_views_data_size": 0,
"curr_items": 140158886,
"curr_items_tot": 279374646,
"ep_bg_fetched": 0.999000999000999,
"get_hits": 10.98901098901099,
"mem_used": 36497390640,
"ops": 829.1708291708292,
"vb_replica_curr_items": 139215760
},
"uptime": "341236",
"memoryTotal": 64424656896,
"memoryFree": 23181365248,
"mcdMemoryReserved": 49152,
"mcdMemoryAllocated": 49152,
"couchApiBase": "http://172.16.10.187:8092/",
"clusterMembership": "active",
"recoveryType": "none",
"status": "healthy",
"otpNode": "ns_1@172.16.10.187",
"thisNode": true,
"hostname": "172.16.10.187:8091",
"clusterCompatibility": 196608,
"version": "3.0.1-1444-rel-community",
"os": "x86_64-unknown-linux-gnu",
"ports": {
"proxy": 11211,
"direct": 11210
}
},
{
"systemStats": {
"cpu_utilization_rate": 47.38255033557047,
"swap_total": 0,
"swap_used": 0,
"mem_total": 64424656896,
"mem_free": 23665811456
},
"interestingStats": {
"cmd_get": 172.8271728271728,
"couch_docs_actual_disk_size": 79360565405,
"couch_docs_data_size": 38736382876,
"couch_views_actual_disk_size": 0,
"couch_views_data_size": 0,
"curr_items": 140174377,
"curr_items_tot": 279383025,
"ep_bg_fetched": 0.999000999000999,
"get_hits": 167.8321678321678,
"mem_used": 36650059656,
"ops": 1685.314685314685,
"vb_replica_curr_items": 139208648
},
"uptime": "341210",
"memoryTotal": 64424656896,
"memoryFree": 23665811456,
"mcdMemoryReserved": 49152,
"mcdMemoryAllocated": 49152,
"couchApiBase": "http://172.16.10.65:8092/",
"clusterMembership": "active",
"recoveryType": "none",
"status": "healthy",
"otpNode": "ns_1@172.16.10.65",
"hostname": "172.16.10.65:8091",
"clusterCompatibility": 196608,
"version": "3.0.1-1444-rel-community",
"os": "x86_64-unknown-linux-gnu",
"ports": {
"proxy": 11211,
"direct": 11210
}
},
{
"systemStats": {
"cpu_utilization_rate": 25.5586592178771,
"swap_total": 0,
"swap_used": 0,
"mem_total": 64424656896,
"mem_free": 23726600192
},
"interestingStats": {
"cmd_get": 63.06306306306306,
"couch_docs_actual_disk_size": 79345105217,
"couch_docs_data_size": 38728086130,
"couch_views_actual_disk_size": 0,
"couch_views_data_size": 0,
"curr_items": 139195268,
"curr_items_tot": 279349113,
"ep_bg_fetched": 0,
"get_hits": 53.05305305305306,
"mem_used": 36476665576,
"ops": 1878.878878878879,
"vb_replica_curr_items": 140153845
},
"uptime": "341210",
"memoryTotal": 64424656896,
"memoryFree": 23726600192,
"mcdMemoryReserved": 49152,
"mcdMemoryAllocated": 49152,
"couchApiBase": "http://172.16.13.105:8092/",
"clusterMembership": "active",
"recoveryType": "none",
"status": "healthy",
"otpNode": "ns_1@172.16.13.105",
"hostname": "172.16.13.105:8091",
"clusterCompatibility": 196608,
"version": "3.0.1-1444-rel-community",
"os": "x86_64-unknown-linux-gnu",
"ports": {
"proxy": 11211,
"direct": 11210
}
},
{
"systemStats": {
"cpu_utilization_rate": 26.45803698435277,
"swap_total": 0,
"swap_used": 0,
"mem_total": 64424656896,
"mem_free": 23854841856
},
"interestingStats": {
"cmd_get": 51.05105105105105,
"couch_docs_actual_disk_size": 74465931949,
"couch_docs_data_size": 38723830730,
"couch_views_actual_disk_size": 0,
"couch_views_data_size": 0,
"curr_items": 139209869,
"curr_items_tot": 279380019,
"ep_bg_fetched": 0,
"get_hits": 47.04704704704704,
"mem_used": 36471784896,
"ops": 1831.831831831832,
"vb_replica_curr_items": 140170150
},
"uptime": "340526",
"memoryTotal": 64424656896,
"memoryFree": 23854841856,
"mcdMemoryReserved": 49152,
"mcdMemoryAllocated": 49152,
"couchApiBase": "http://172.16.13.173:8092/",
"clusterMembership": "active",
"recoveryType": "none",
"status": "healthy",
"otpNode": "ns_1@172.16.13.173",
"hostname": "172.16.13.173:8091",
"clusterCompatibility": 196608,
"version": "3.0.1-1444-rel-community",
"os": "x86_64-unknown-linux-gnu",
"ports": {
"proxy": 11211,
"direct": 11210
}
},
{
"systemStats": {
"cpu_utilization_rate": 47.31034482758621,
"swap_total": 0,
"swap_used": 0,
"mem_total": 64424656896,
"mem_free": 23773573120
},
"interestingStats": {
"cmd_get": 77.07707707707708,
"couch_docs_actual_disk_size": 74743093945,
"couch_docs_data_size": 38594660087,
"couch_views_actual_disk_size": 0,
"couch_views_data_size": 0,
"curr_items": 139215932,
"curr_items_tot": 278427644,
"ep_bg_fetched": 0,
"get_hits": 53.05305305305305,
"mem_used": 36306500344,
"ops": 1981.981981981982,
"vb_replica_curr_items": 139211712
},
"uptime": "340495",
"memoryTotal": 64424656896,
"memoryFree": 23773573120,
"mcdMemoryReserved": 49152,
"mcdMemoryAllocated": 49152,
"couchApiBase": "http://172.16.15.120:8092/",
"clusterMembership": "active",
"recoveryType": "none",
"status": "healthy",
"otpNode": "ns_1@172.16.15.120",
"hostname": "172.16.15.120:8091",
"clusterCompatibility": 196608,
"version": "3.0.1-1444-rel-community",
"os": "x86_64-unknown-linux-gnu",
"ports": {
"proxy": 11211,
"direct": 11210
}
},
{
"systemStats": {
"cpu_utilization_rate": 17.60660247592847,
"swap_total": 0,
"swap_used": 0,
"mem_total": 64424656896,
"mem_free": 23662190592
},
"interestingStats": {
"cmd_get": 146.8531468531468,
"couch_docs_actual_disk_size": 72932847344,
"couch_docs_data_size": 38581771457,
"couch_views_actual_disk_size": 0,
"couch_views_data_size": 0,
"curr_items": 139226879,
"curr_items_tot": 278436540,
"ep_bg_fetched": 0,
"get_hits": 144.8551448551448,
"mem_used": 36421860496,
"ops": 1495.504495504495,
"vb_replica_curr_items": 139209661
},
"uptime": "337174",
"memoryTotal": 64424656896,
"memoryFree": 23662190592,
"mcdMemoryReserved": 49152,
"mcdMemoryAllocated": 49152,
"couchApiBase": "http://172.16.8.127:8092/",
"clusterMembership": "active",
"recoveryType": "none",
"status": "healthy",
"otpNode": "ns_1@172.16.8.127",
"hostname": "172.16.8.127:8091",
"clusterCompatibility": 196608,
"version": "3.0.1-1444-rel-community",
"os": "x86_64-unknown-linux-gnu",
"ports": {
"proxy": 11211,
"direct": 11210
}
},
{
"systemStats": {
"cpu_utilization_rate": 21.68831168831169,
"swap_total": 0,
"swap_used": 0,
"mem_total": 64424656896,
"mem_free": 24049729536
},
"interestingStats": {
"cmd_get": 11.98801198801199,
"couch_docs_actual_disk_size": 66414273220,
"couch_docs_data_size": 38587642702,
"couch_views_actual_disk_size": 0,
"couch_views_data_size": 0,
"curr_items": 139193759,
"curr_items_tot": 278398926,
"ep_bg_fetched": 0,
"get_hits": 9.990009990009991,
"mem_used": 36237234088,
"ops": 883.1168831168832,
"vb_replica_curr_items": 139205167
},
"uptime": "341228",
"memoryTotal": 64424656896,
"memoryFree": 24049729536,
"mcdMemoryReserved": 49152,
"mcdMemoryAllocated": 49152,
"couchApiBase": "http://172.16.8.148:8092/",
"clusterMembership": "active",
"recoveryType": "none",
"status": "healthy",
"otpNode": "ns_1@172.16.8.148",
"hostname": "172.16.8.148:8091",
"clusterCompatibility": 196608,
"version": "3.0.1-1444-rel-community",
"os": "x86_64-unknown-linux-gnu",
"ports": {
"proxy": 11211,
"direct": 11210
}
}
],
"buckets": {
"uri": "/pools/default/buckets",
"terseBucketsBase": "/pools/default/b/",
"terseStreamingBucketsBase": "/pools/default/bs/"
},
"remoteClusters": {
"uri": "/pools/default/remoteClusters",
"validateURI": "/pools/default/remoteClusters?just_validate=1"
},
"controllers": {
"addNode": {
"uri": "/controller/addNode"
},
"rebalance": {
"uri": "/controller/rebalance"
},
"failOver": {
"uri": "/controller/failOver"
},
"startGracefulFailover": {
"uri": "/controller/startGracefulFailover"
},
"reAddNode": {
"uri": "/controller/reAddNode"
},
"reFailOver": {
"uri": "/controller/reFailOver"
},
"ejectNode": {
"uri": "/controller/ejectNode"
},
"setRecoveryType": {
"uri": "/controller/setRecoveryType"
},
"setAutoCompaction": {
"uri": "/controller/setAutoCompaction",
"validateURI": "/controller/setAutoCompaction?just_validate=1"
},
"clusterLogsCollection": {
"startURI": "/controller/startLogsCollection",
"cancelURI": "/controller/cancelLogsCollection"
},
"replication": {
"createURI": "/controller/createReplication",
"validateURI": "/controller/createReplication?just_validate=1"
},
"setFastWarmup": {
"uri": "/controller/setFastWarmup",
"validateURI": "/controller/setFastWarmup?just_validate=1"
}
},
"rebalanceStatus": "none",
"rebalanceProgressUri": "/pools/default/rebalanceProgress",
"stopRebalanceUri": "/controller/stopRebalance",
"nodeStatusesUri": "/nodeStatuses",
"maxBucketCount": 10,
"autoCompactionSettings": {
"parallelDBAndViewCompaction": false,
"databaseFragmentationThreshold": {
"percentage": 50,
"size": "undefined"
},
"viewFragmentationThreshold": {
"percentage": 50,
"size": "undefined"
}
},
"fastWarmupSettings": {
"fastWarmupEnabled": true,
"minMemoryThreshold": 10,
"minItemsThreshold": 10
},
"tasks": {
"uri": "/pools/default/tasks"
},
"visualSettingsUri": "/internalSettings/visual",
"counters": {
"rebalance_success": 4,
"rebalance_start": 6,
"rebalance_stop": 2
}
}

View File

@ -0,0 +1,8 @@
{
"pools": [
{
"name": "default",
"uri": "/pools/default"
}
]
}

View File

@ -199,7 +199,11 @@ func TestMultipleJSONFileImports(t *testing.T) {
// Write csv file to process into the 'process' directory.
f, err := os.Create(filepath.Join(processDirectory, testJSONFile))
require.NoError(t, err)
_, err = f.WriteString("{\"Name\": \"event1\",\"Speed\": 100.1,\"Length\": 20.1}\n{\"Name\": \"event2\",\"Speed\": 500,\"Length\": 1.4}\n{\"Name\": \"event3\",\"Speed\": 200,\"Length\": 10.23}\n{\"Name\": \"event4\",\"Speed\": 80,\"Length\": 250}\n{\"Name\": \"event5\",\"Speed\": 120.77,\"Length\": 25.97}")
_, err = f.WriteString(
"{\"Name\": \"event1\",\"Speed\": 100.1,\"Length\": 20.1}\n{\"Name\": \"event2\",\"Speed\": 500,\"Length\": 1.4}\n" +
"{\"Name\": " + "\"event3\",\"Speed\": 200,\"Length\": 10.23}\n{\"Name\": \"event4\",\"Speed\": 80,\"Length\": 250}\n" +
"{\"Name\": \"event5\",\"Speed\": 120.77,\"Length\": 25.97}",
)
require.NoError(t, err)
err = f.Close()
require.NoError(t, err)

View File

@ -6,16 +6,19 @@ import (
"errors"
"testing"
"github.com/influxdata/telegraf/testutil"
"github.com/stretchr/testify/require"
"github.com/influxdata/telegraf/testutil"
)
var (
measurement = "dmcache"
badFormatOutput = []string{"cs-1: 0 4883791872 cache 8 1018/1501122 512 7/464962 139 352643 "}
good2DevicesFormatOutput = []string{
"cs-1: 0 4883791872 cache 8 1018/1501122 512 7/464962 139 352643 15 46 0 7 0 1 writeback 2 migration_threshold 2048 mq 10 random_threshold 4 sequential_threshold 512 discard_promote_adjustment 1 read_promote_adjustment 4 write_promote_adjustment 8",
"cs-2: 0 4294967296 cache 8 72352/1310720 128 26/24327168 2409 286 265 524682 0 0 0 1 writethrough 2 migration_threshold 2048 mq 10 random_threshold 4 sequential_threshold 512 discard_promote_adjustment 1 read_promote_adjustment 4 write_promote_adjustment 8",
"cs-1: 0 4883791872 cache 8 1018/1501122 512 7/464962 139 352643 15 46 0 7 0 1 writeback 2 migration_threshold 2048 mq 10 random_threshold 4 " +
"sequential_threshold 512 discard_promote_adjustment 1 read_promote_adjustment 4 write_promote_adjustment 8",
"cs-2: 0 4294967296 cache 8 72352/1310720 128 26/24327168 2409 286 265 524682 0 0 0 1 writethrough 2 migration_threshold 2048 mq 10 " +
"random_threshold 4 sequential_threshold 512 discard_promote_adjustment 1 read_promote_adjustment 4 write_promote_adjustment 8",
}
)

View File

@ -42,12 +42,31 @@ var info = types.Info{
Secure: true,
},
}, InsecureRegistryCIDRs: []*registry.NetIPNet{{IP: []byte{127, 0, 0, 0}, Mask: []byte{255, 0, 0, 0}}}, Mirrors: []string{}},
OperatingSystem: "Linux Mint LMDE (containerized)",
BridgeNfIptables: true,
HTTPSProxy: "",
Labels: []string{},
MemoryLimit: false,
DriverStatus: [][2]string{{"Pool Name", "docker-8:1-1182287-pool"}, {"Base Device Size", "10.74 GB"}, {"Pool Blocksize", "65.54 kB"}, {"Backing Filesystem", "extfs"}, {"Data file", "/dev/loop0"}, {"Metadata file", "/dev/loop1"}, {"Data Space Used", "17.3 GB"}, {"Data Space Total", "107.4 GB"}, {"Data Space Available", "36.53 GB"}, {"Metadata Space Used", "20.97 MB"}, {"Metadata Space Total", "2.147 GB"}, {"Metadata Space Available", "2.127 GB"}, {"Udev Sync Supported", "true"}, {"Deferred Removal Enabled", "false"}, {"Data loop file", "/var/lib/docker/devicemapper/devicemapper/data"}, {"Metadata loop file", "/var/lib/docker/devicemapper/devicemapper/metadata"}, {"Library Version", "1.02.115 (2016-01-25)"}, {"Thin Pool Minimum Free Space", "10.74GB"}},
OperatingSystem: "Linux Mint LMDE (containerized)",
BridgeNfIptables: true,
HTTPSProxy: "",
Labels: []string{},
MemoryLimit: false,
DriverStatus: [][2]string{
{"Pool Name", "docker-8:1-1182287-pool"},
{"Base Device Size", "10.74 GB"},
{"Pool Blocksize", "65.54 kB"},
{"Backing Filesystem", "extfs"},
{"Data file", "/dev/loop0"},
{"Metadata file", "/dev/loop1"},
{"Data Space Used", "17.3 GB"},
{"Data Space Total", "107.4 GB"},
{"Data Space Available", "36.53 GB"},
{"Metadata Space Used", "20.97 MB"},
{"Metadata Space Total", "2.147 GB"},
{"Metadata Space Available", "2.127 GB"},
{"Udev Sync Supported", "true"},
{"Deferred Removal Enabled", "false"},
{"Data loop file", "/var/lib/docker/devicemapper/devicemapper/data"},
{"Metadata loop file", "/var/lib/docker/devicemapper/devicemapper/metadata"},
{"Library Version", "1.02.115 (2016-01-25)"},
{"Thin Pool Minimum Free Space", "10.74GB"},
},
NFd: 19,
HTTPProxy: "",
Driver: "devicemapper",

View File

@ -152,17 +152,33 @@ func TestDovecotIntegration(t *testing.T) {
acc.AssertContainsTaggedFields(t, "dovecot", fields, tags)
}
const sampleGlobal = `reset_timestamp last_update num_logins num_cmds num_connected_sessions user_cpu sys_cpu clock_time min_faults maj_faults vol_cs invol_cs disk_input disk_output read_count read_bytes write_count write_bytes mail_lookup_path mail_lookup_attr mail_read_count mail_read_bytes mail_cache_hits
1453969886 1454603963.039864 7503897 52595715 1204 100831175.372000 83849071.112000 4326001931528183.495762 763950011 1112443 4120386897 3685239306 41679480946688 1819070669176832 2368906465 2957928122981169 3545389615 1666822498251286 24396105 302845 20155768 669946617705 1557255080`
const sampleGlobal = `reset_timestamp last_update num_logins num_cmds num_connected_sessions user_cpu sys_cpu clock_time ` +
`min_faults maj_faults vol_cs invol_cs disk_input disk_output read_count read_bytes write_count write_bytes ` +
`mail_lookup_path mail_lookup_attr mail_read_count mail_read_bytes mail_cache_hits
1453969886 1454603963.039864 7503897 52595715 1204 100831175.372000 83849071.112000 4326001931528183.495762 ` +
`763950011 1112443 4120386897 3685239306 41679480946688 1819070669176832 2368906465 2957928122981169 ` +
`3545389615 1666822498251286 24396105 302845 20155768 669946617705 1557255080`
const sampleDomain = `domain reset_timestamp last_update num_logins num_cmds num_connected_sessions user_cpu sys_cpu clock_time min_faults maj_faults vol_cs invol_cs disk_input disk_output read_count read_bytes write_count write_bytes mail_lookup_path mail_lookup_attr mail_read_count mail_read_bytes mail_cache_hits
domain.test 1453969886 1454603963.039864 7503897 52595715 1204 100831175.372000 83849071.112000 4326001931528183.495762 763950011 1112443 4120386897 3685239306 41679480946688 1819070669176832 2368906465 2957928122981169 3545389615 1666822498251286 24396105 302845 20155768 669946617705 1557255080`
const sampleDomain = `domain reset_timestamp last_update num_logins num_cmds num_connected_sessions user_cpu ` +
`sys_cpu clock_time min_faults maj_faults vol_cs invol_cs disk_input disk_output read_count read_bytes ` +
`write_count write_bytes mail_lookup_path mail_lookup_attr mail_read_count mail_read_bytes mail_cache_hits
domain.test 1453969886 1454603963.039864 7503897 52595715 1204 100831175.372000 83849071.112000 ` +
`4326001931528183.495762 763950011 1112443 4120386897 3685239306 41679480946688 1819070669176832 ` +
`2368906465 2957928122981169 3545389615 1666822498251286 24396105 302845 20155768 669946617705 1557255080`
const sampleIP = `ip reset_timestamp last_update num_logins num_cmds num_connected_sessions user_cpu sys_cpu clock_time min_faults maj_faults vol_cs invol_cs disk_input disk_output read_count read_bytes write_count write_bytes mail_lookup_path mail_lookup_attr mail_read_count mail_read_bytes mail_cache_hits
192.168.0.100 1453969886 1454603963.039864 7503897 52595715 1204 100831175.372000 83849071.112000 4326001931528183.495762 763950011 1112443 4120386897 3685239306 41679480946688 1819070669176832 2368906465 2957928122981169 3545389615 1666822498251286 24396105 302845 20155768 669946617705 1557255080`
const sampleIP = `ip reset_timestamp last_update num_logins num_cmds num_connected_sessions user_cpu ` +
`sys_cpu clock_time min_faults maj_faults vol_cs invol_cs disk_input disk_output read_count ` +
`read_bytes write_count write_bytes mail_lookup_path mail_lookup_attr mail_read_count mail_read_bytes mail_cache_hits
192.168.0.100 1453969886 1454603963.039864 7503897 52595715 1204 100831175.372000 83849071.112000 ` +
`4326001931528183.495762 763950011 1112443 4120386897 3685239306 41679480946688 1819070669176832 ` +
`2368906465 2957928122981169 3545389615 1666822498251286 24396105 302845 20155768 669946617705 1557255080`
const sampleUser = `user reset_timestamp last_update num_logins num_cmds user_cpu sys_cpu clock_time min_faults maj_faults vol_cs invol_cs disk_input disk_output read_count read_bytes write_count write_bytes mail_lookup_path mail_lookup_attr mail_read_count mail_read_bytes mail_cache_hits
user.1@domain.test 1453969886 1454603963.039864 7503897 52595715 100831175.372000 83849071.112000 4326001931528183.495762 763950011 1112443 4120386897 3685239306 41679480946688 1819070669176832 2368906465 2957928122981169 3545389615 1666822498251286 24396105 302845 20155768 669946617705 1557255080`
const sampleUser = `user reset_timestamp last_update num_logins num_cmds user_cpu sys_cpu clock_time ` +
`min_faults maj_faults vol_cs invol_cs disk_input disk_output read_count read_bytes write_count ` +
`write_bytes mail_lookup_path mail_lookup_attr mail_read_count mail_read_bytes mail_cache_hits
user.1@domain.test 1453969886 1454603963.039864 7503897 52595715 100831175.372000 83849071.112000 ` +
`4326001931528183.495762 763950011 1112443 4120386897 3685239306 41679480946688 1819070669176832 ` +
`2368906465 2957928122981169 3545389615 1666822498251286 24396105 302845 20155768 669946617705 1557255080`
func TestDovecotContainerIntegration(t *testing.T) {
if testing.Short() {