Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ CHANGELOG*
/metricbeat/module/windows/wmi @elastic/obs-infraobs-integrations
/metricbeat/module/zookeeper @elastic/obs-infraobs-integrations
/packetbeat/ @elastic/sec-linux-platform
/pkg/autodiscover/ @elastic/elastic-agent-data-plane
/script/ @elastic/elastic-agent-data-plane
/testing/ @elastic/elastic-agent-data-plane
/tools/ @elastic/elastic-agent-data-plane
Expand Down
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ updates:
- dependabot
allow:
# Team:Elastic-Agent-Data-Plane
- dependency-name: github.com/elastic/elastic-agent-autodiscover
- dependency-name: github.com/elastic/elastic-agent-client/*
- dependency-name: github.com/elastic/elastic-agent-libs
- dependency-name: github.com/elastic/elastic-agent-shipper-client
Expand Down
776 changes: 565 additions & 211 deletions NOTICE.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions filebeat/autodiscover/builder/hints/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

"github.com/elastic/go-ucfg"

"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/elastic-agent-autodiscover/utils"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/utils"

"github.com/elastic/beats/v7/filebeat/fileset"
"github.com/elastic/beats/v7/filebeat/harvester"
Expand Down
14 changes: 7 additions & 7 deletions filebeat/autodiscover/builder/hints/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/elastic/beats/v7/pkg/autodiscover/bus"
"github.com/elastic/beats/v7/testing/testutils"
"github.com/elastic/elastic-agent-autodiscover/bus"
conf "github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/keystore"
"github.com/elastic/elastic-agent-libs/logp/logptest"
Expand Down Expand Up @@ -616,7 +616,7 @@ func TestGenerateHints(t *testing.T) {
"logs": mapstr.M{
"processors": mapstr.M{
"1": mapstr.M{
"dissect": mapstr.M{
"dissect": mapstr.M{ //nolint:gosec // test tokenizer fixture
"tokenizer": "%{key1} %{key2}",
},
},
Expand All @@ -635,7 +635,7 @@ func TestGenerateHints(t *testing.T) {
"close_timeout": "true",
"processors": []any{
map[string]any{
"dissect": map[string]any{
"dissect": map[string]any{ //nolint:gosec // test tokenizer fixture
"tokenizer": "%{key1} %{key2}",
},
},
Expand Down Expand Up @@ -665,7 +665,7 @@ func TestGenerateHints(t *testing.T) {
"logs": mapstr.M{
"processors": mapstr.M{
"1": mapstr.M{
"dissect": mapstr.M{
"dissect": mapstr.M{ //nolint:gosec // test tokenizer fixture
"tokenizer": "%{key1} %{key2}",
},
},
Expand All @@ -690,7 +690,7 @@ func TestGenerateHints(t *testing.T) {
},
},
map[string]any{
"dissect": map[string]any{
"dissect": map[string]any{ //nolint:gosec // test tokenizer fixture
"tokenizer": "%{key1} %{key2}",
},
},
Expand Down Expand Up @@ -1194,7 +1194,7 @@ func TestGenerateHintsWithPaths(t *testing.T) {
"logs": mapstr.M{
"processors": mapstr.M{
"1": mapstr.M{
"dissect": mapstr.M{
"dissect": mapstr.M{ //nolint:gosec // test tokenizer fixture
"tokenizer": "%{key1} %{key2}",
},
},
Expand All @@ -1213,7 +1213,7 @@ func TestGenerateHintsWithPaths(t *testing.T) {
"close_timeout": "true",
"processors": []any{
map[string]any{
"dissect": map[string]any{
"dissect": map[string]any{ //nolint:gosec // test tokenizer fixture
"tokenizer": "%{key1} %{key2}",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/elastic/beats/v7/libbeat/tests/integration"
"github.com/elastic/elastic-agent-autodiscover/docker"
"github.com/elastic/beats/v7/pkg/autodiscover/docker"
"github.com/elastic/elastic-agent-libs/logp/logptest"
)

Expand Down
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ require (
github.com/dgraph-io/badger/v4 v4.6.0
github.com/elastic/bayeux v1.0.5
github.com/elastic/ebpfevents v0.9.0
github.com/elastic/elastic-agent-autodiscover v0.10.3-0.20260423154939-e990715f9426
github.com/elastic/elastic-agent-libs v0.46.1
github.com/elastic/elastic-agent-system-metrics v0.14.4
github.com/elastic/go-elasticsearch/v8 v8.19.0
Expand Down Expand Up @@ -255,10 +254,15 @@ require (
go.opentelemetry.io/collector/service v0.155.0
go.opentelemetry.io/otel/sdk/metric v1.44.0
go.uber.org/goleak v1.3.0
sigs.k8s.io/kind v0.32.0
)

require (
al.essio.dev/pkg/shellescape v1.5.1 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/cenkalti/backoff/v6 v6.0.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/twmb/franz-go v1.21.3 // indirect
go.opentelemetry.io/collector/exporter v1.61.0 // indirect
Expand Down
12 changes: 10 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho=
al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890=
aqwari.net/xml v0.0.0-20210331023308-d9421b293817 h1:+3Rh5EaTzNLnzWx3/uy/mAaH/dGI7svJ6e0oOIDcPuE=
aqwari.net/xml v0.0.0-20210331023308-d9421b293817/go.mod h1:c7kkWzc7HS/t8Q2DcVY8P2d1dyWNEhEVT5pL0ZHO11c=
cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4=
Expand Down Expand Up @@ -128,6 +130,8 @@ github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mo
github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0 h1:XRzhVemXdgvJqCH0sFfrBUTnUJSBrBf7++ypk+twtRs=
github.com/AzureAD/microsoft-authentication-library-for-go v1.6.0/go.mod h1:HKpQxkWaGLJ+D/5H8QRpyQXA1eKjxkFlOMwck5+33Jk=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0 h1:DHa2U07rk8syqvCge0QIGMCE1WxGj9njT44GH7zNJLQ=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.55.0 h1:UnDZ/zFfG1JhH/DqxIZYU/1CUAlTUScoXD/LcM2Ykk8=
Expand Down Expand Up @@ -358,8 +362,6 @@ github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0=
github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68=
github.com/elastic/ebpfevents v0.9.0 h1:La6+7+hbnzlM6IOo9edRJfa4qQ6Uo4ALsKRhS2gwBKI=
github.com/elastic/ebpfevents v0.9.0/go.mod h1:RDOopYpSomVu55gCO8CPqDMzcU1poDvBeQUEb7pkI2k=
github.com/elastic/elastic-agent-autodiscover v0.10.3-0.20260423154939-e990715f9426 h1:zqt0GOf6/e287nhLlAODfW6Pncydjr4ArEpM589MIXI=
github.com/elastic/elastic-agent-autodiscover v0.10.3-0.20260423154939-e990715f9426/go.mod h1:HyjdiEVP/A7iMN0jeac2EoUohpHKAZIFRDQsvPDg2Dw=
github.com/elastic/elastic-agent-client/v7 v7.18.1 h1:WnM53JjaukeysrAuiTyrhDPmFxJG07ZAByc2TrkcKcs=
github.com/elastic/elastic-agent-client/v7 v7.18.1/go.mod h1:uDpSGZ+YCKgqgtkwCA0qjwX0gU/wmixDsVbPjY3GkPs=
github.com/elastic/elastic-agent-libs v0.46.1 h1:1dVRKOaGWBxqDQPb/NCtoJHI8Nx3QbJOmr4v6y+UdKQ=
Expand Down Expand Up @@ -442,6 +444,8 @@ github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJP
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v1.3.3 h1:MVQghNeW+LZcmXe7SY1V36Z+WFMDjpqGAGacLe2T0ds=
github.com/envoyproxy/protoc-gen-validate v1.3.3/go.mod h1:TsndJ/ngyIdQRhMcVVGDDHINPLWB7C82oDArY51KfB0=
github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
Expand Down Expand Up @@ -902,6 +906,8 @@ github.com/otiai10/mint v1.6.3 h1:87qsV/aw1F5as1eH1zS/yqHY85ANKVMgkDrf9rcxbQs=
github.com/otiai10/mint v1.6.3/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM=
github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2 h1:CXwSGu/LYmbjEab5aMCs5usQRVBGThelUKBNnoSOuso=
github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0=
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pierrec/lz4/v4 v4.1.27 h1:+PhzhWDrjRj89TH2sw43nE3+4+W8lSxIuQadEHZyjUk=
Expand Down Expand Up @@ -1573,6 +1579,8 @@ pgregory.net/rapid v1.3.0 h1:vBvO0VSqti75J1jjYqpgPNBLKMd1+gxa9fYo7vk/Exc=
pgregory.net/rapid v1.3.0/go.mod h1:dPlE4OBBxgXPqkP79flB6sJL1dx5azpI7HQ9MY9Z7uk=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/kind v0.32.0 h1:p9hscbj98u/qyrjVpjId86LI70nQmbSsipV7wCG10Xk=
sigs.k8s.io/kind v0.32.0/go.mod h1:FSqriGaoTPruiXWfRnUXNykF8r2t+fHtK0P0m1AbGF8=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
Expand Down
4 changes: 2 additions & 2 deletions heartbeat/autodiscover/builder/hints/monitors.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

"github.com/elastic/go-ucfg"

"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/elastic-agent-autodiscover/utils"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/utils"

"github.com/elastic/beats/v7/libbeat/autodiscover"
"github.com/elastic/beats/v7/libbeat/autodiscover/template"
Expand Down
16 changes: 8 additions & 8 deletions heartbeat/autodiscover/builder/hints/monitors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

"github.com/stretchr/testify/assert"

"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
"github.com/elastic/elastic-agent-libs/logp"
"github.com/elastic/elastic-agent-libs/mapstr"
)
Expand Down Expand Up @@ -140,9 +140,9 @@
"type": "http",
"hosts": []string{"1.2.3.4:9090"},
"schedule": "@every 5s",
"processors": []interface{}{
map[string]interface{}{
"add_locale": map[string]interface{}{
"processors": []any{
map[string]any{
"add_locale": map[string]any{
"abbrevation": "MST",
},
},
Expand Down Expand Up @@ -200,22 +200,22 @@

m := heartbeatHints{
config: defaultConfig(),
logger: logp.L(),

Check failure on line 203 in heartbeat/autodiscover/builder/hints/monitors_test.go

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

use of `logp.L` forbidden because "accept a *logp.Logger as a parameter instead of using the global logp.L()" (forbidigo)

Check failure on line 203 in heartbeat/autodiscover/builder/hints/monitors_test.go

View workflow job for this annotation

GitHub Actions / lint (macos-latest)

use of `logp.L` forbidden because "accept a *logp.Logger as a parameter instead of using the global logp.L()" (forbidigo)

Check failure on line 203 in heartbeat/autodiscover/builder/hints/monitors_test.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

use of `logp.L` forbidden because "accept a *logp.Logger as a parameter instead of using the global logp.L()" (forbidigo)
}
cfgs := m.CreateConfig(test.event)
assert.Equal(t, test.len, len(cfgs), test.message)
assert.Len(t, cfgs, test.len, test.message)

if len(cfgs) != 0 {
config := mapstr.M{}
err := cfgs[0].Unpack(&config)
assert.Nil(t, err, test.message)
assert.NoError(t, err, test.message)

// Autodiscover can return configs with different sort orders here, which is irrelevant
// To make tests pass consistently we sort the host list
hostStrs := []string{}
if hostsSlice, ok := config["hosts"].([]interface{}); ok && len(hostsSlice) > 0 {
if hostsSlice, ok := config["hosts"].([]any); ok && len(hostsSlice) > 0 {
for _, hi := range hostsSlice {
hostStrs = append(hostStrs, hi.(string))
hostStrs = append(hostStrs, hi.(string)) //nolint:errcheck // test fixture type
}
sort.Strings(hostStrs)
config["hosts"] = hostStrs
Expand Down
2 changes: 1 addition & 1 deletion libbeat/autodiscover/appender.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"strings"

"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
"github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/logp"
)
Expand Down
6 changes: 3 additions & 3 deletions libbeat/autodiscover/appender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
conf "github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/logp"
)
Expand All @@ -40,7 +40,7 @@ func newFakeAppender(_ *conf.C, _ *logp.Logger) (Appender, error) {
func TestAppenderRegistry(t *testing.T) {
// Add a new builder
reg := NewRegistry()
reg.AddAppender("fake", newFakeAppender)
reg.AddAppender("fake", newFakeAppender) //nolint:errcheck // test registration

// Check if that appender is available in registry
b := reg.GetAppender("fake")
Expand All @@ -60,7 +60,7 @@ func TestAppenderRegistry(t *testing.T) {
assert.NotNil(t, appender)

// Attempt to build using an array of configs
Registry.AddAppender("fake", newFakeAppender)
Registry.AddAppender("fake", newFakeAppender) //nolint:errcheck // test registration
cfgs := []*conf.C{cfg}
appenders, err := NewAppenders(cfgs)
assert.NoError(t, err)
Expand Down
8 changes: 4 additions & 4 deletions libbeat/autodiscover/appenders/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ import (
"github.com/elastic/beats/v7/libbeat/autodiscover/template"
"github.com/elastic/beats/v7/libbeat/common/cfgwarn"
"github.com/elastic/beats/v7/libbeat/conditions"
"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
conf "github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/logp"
"github.com/elastic/elastic-agent-libs/mapstr"
)

func init() {
autodiscover.Registry.AddAppender("config", NewConfigAppender)
autodiscover.Registry.AddAppender("config", NewConfigAppender) //nolint:errcheck // provider registration
}

type config struct {
Expand All @@ -52,7 +52,7 @@ func NewConfigAppender(cfg *conf.C, logger *logp.Logger) (autodiscover.Appender,
config := config{}
err := cfg.Unpack(&config)
if err != nil {
return nil, fmt.Errorf("unable to unpack config appender due to error: %+v", err)
return nil, fmt.Errorf("unable to unpack config appender due to error: %+w", err)
}

var cond conditions.Condition
Expand Down Expand Up @@ -88,7 +88,7 @@ func (c *configAppender) Append(event bus.Event) {
if !ok {
return
}
if c.condition == nil || c.condition.Check(mapstr.M(event)) == true {
if c.condition == nil || c.condition.Check(mapstr.M(event)) {
// Merge the template with all the configs
for _, cfg := range cfgs {
cf := mapstr.M{}
Expand Down
4 changes: 2 additions & 2 deletions libbeat/autodiscover/appenders/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
conf "github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/logp/logptest"
"github.com/elastic/elastic-agent-libs/mapstr"
Expand Down Expand Up @@ -107,7 +107,7 @@ condition.equals:
assert.Len(t, cfgs, 1)

out := mapstr.M{}
cfgs[0].Unpack(&out)
cfgs[0].Unpack(&out) //nolint:errcheck // test assertion follows

assert.Equal(t, out, test.result)
})
Expand Down
2 changes: 1 addition & 1 deletion libbeat/autodiscover/autodiscover.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/cfgfile"
"github.com/elastic/beats/v7/libbeat/common/reload"
"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
conf "github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/keystore"
"github.com/elastic/elastic-agent-libs/logp"
Expand Down
2 changes: 1 addition & 1 deletion libbeat/autodiscover/autodiscover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/cfgfile"
"github.com/elastic/beats/v7/libbeat/tests/resources"
"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
conf "github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/keystore"
"github.com/elastic/elastic-agent-libs/logp"
Expand Down
2 changes: 1 addition & 1 deletion libbeat/autodiscover/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"strings"

"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
"github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/keystore"
"github.com/elastic/elastic-agent-libs/logp"
Expand Down
2 changes: 1 addition & 1 deletion libbeat/autodiscover/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
conf "github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/logp"
"github.com/elastic/elastic-agent-libs/paths"
Expand Down
4 changes: 2 additions & 2 deletions libbeat/autodiscover/eventselect.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package autodiscover
import (
"fmt"

"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
"github.com/elastic/elastic-agent-libs/config"
)

Expand All @@ -47,7 +47,7 @@ func (q queryConfigFrom) CreateConfig(e bus.Event) ([]*config.C, error) {
fieldName := string(q)
config, ok := e[fieldName].([]*config.C)
if !ok {
return nil, fmt.Errorf("Event field '%v' does not contain a valid configuration object", fieldName)
return nil, fmt.Errorf("Event field '%v' does not contain a valid configuration object", fieldName) //nolint:staticcheck // error message format
}
return config, nil
}
2 changes: 1 addition & 1 deletion libbeat/autodiscover/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/gofrs/uuid/v5"

"github.com/elastic/beats/v7/libbeat/cfgfile"
"github.com/elastic/elastic-agent-autodiscover/bus"
"github.com/elastic/beats/v7/pkg/autodiscover/bus"
"github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/keystore"
"github.com/elastic/elastic-agent-libs/logp"
Expand Down
2 changes: 1 addition & 1 deletion libbeat/autodiscover/providers/docker/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"time"

"github.com/elastic/beats/v7/libbeat/autodiscover/template"
"github.com/elastic/elastic-agent-autodiscover/docker"
"github.com/elastic/beats/v7/pkg/autodiscover/docker"
"github.com/elastic/elastic-agent-libs/config"
)

Expand Down
Loading
Loading