diff --git a/dev-tools/packaging/packages.yml b/dev-tools/packaging/packages.yml index ea3ddfe76e07..6c3752fb2fa1 100644 --- a/dev-tools/packaging/packages.yml +++ b/dev-tools/packaging/packages.yml @@ -64,16 +64,6 @@ shared: source: '{{.AgentDropPath}}/filebeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.asc' mode: 0644 skip_on_missing: true - /var/lib/{{.BeatName}}/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz: - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz' - mode: 0644 - /var/lib/{{.BeatName}}/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.sha512: - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.sha512' - mode: 0644 - /var/lib/{{.BeatName}}/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.asc: - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.asc' - mode: 0644 - skip_on_missing: true /var/lib/{{.BeatName}}/downloads/metricbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz: source: '{{.AgentDropPath}}/metricbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz' mode: 0644 @@ -145,17 +135,6 @@ shared: source: '{{.AgentDropPath}}/filebeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.asc' mode: 0644 skip_on_missing: true - /etc/{{.BeatName}}/data/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz: - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz' - mode: 0644 - /etc/{{.BeatName}}/data/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.sha512: - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.sha512' - mode: 0644 - skip_on_missing: true - /etc/{{.BeatName}}/data/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.asc: - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.asc' - mode: 0644 - skip_on_missing: true /etc/{{.BeatName}}/data/downloads/metricbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz: source: '{{.AgentDropPath}}/metricbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz' mode: 0644 @@ -216,16 +195,6 @@ shared: source: '{{.AgentDropPath}}/filebeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.asc' mode: 0644 skip_on_missing: true - 'data/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz': - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz' - mode: 0644 - 'data/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.sha512': - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.sha512' - mode: 0644 - 'data/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.asc': - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz.asc' - mode: 0644 - skip_on_missing: true 'data/downloads/metricbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz': source: '{{.AgentDropPath}}/metricbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.tar.gz' mode: 0644 @@ -270,16 +239,6 @@ shared: source: '{{.AgentDropPath}}/filebeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip.asc' mode: 0644 skip_on_missing: true - 'data/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip': - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip' - mode: 0644 - 'data/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip.sha512': - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip.sha512' - mode: 0644 - 'data/downloads/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip.asc': - source: '{{.AgentDropPath}}/heartbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip.asc' - mode: 0644 - skip_on_missing: true 'data/downloads/metricbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip': source: '{{.AgentDropPath}}/metricbeat-{{ beat_version }}{{if .Snapshot}}-SNAPSHOT{{end}}-{{.GOOS}}-{{.AgentArchName}}.zip' mode: 0644 diff --git a/heartbeat/beater/heartbeat.go b/heartbeat/beater/heartbeat.go index 15185c707deb..7e0f2aa75a1e 100644 --- a/heartbeat/beater/heartbeat.go +++ b/heartbeat/beater/heartbeat.go @@ -139,8 +139,6 @@ func (bt *Heartbeat) RunStaticMonitors(b *beat.Beat) error { func (bt *Heartbeat) RunCentralMgmtMonitors(b *beat.Beat) { monitors := cfgfile.NewRunnerList(management.DebugK, bt.dynamicFactory, b.Publisher) reload.Register.MustRegisterList(b.Info.Beat+".monitors", monitors) - inputs := cfgfile.NewRunnerList(management.DebugK, bt.dynamicFactory, b.Publisher) - reload.Register.MustRegisterList("inputs", inputs) } // RunReloadableMonitors runs the `heartbeat.config.monitors` portion of the yaml config if present. diff --git a/heartbeat/monitors/active/http/http.go b/heartbeat/monitors/active/http/http.go index 744636635674..cf0f98338422 100644 --- a/heartbeat/monitors/active/http/http.go +++ b/heartbeat/monitors/active/http/http.go @@ -33,7 +33,6 @@ import ( func init() { monitors.RegisterActive("http", create) - monitors.RegisterActive("synthetics/http", create) } var debugf = logp.MakeDebug("http") diff --git a/heartbeat/monitors/active/icmp/icmp.go b/heartbeat/monitors/active/icmp/icmp.go index f9119ab19ec9..45fdf8a54b32 100644 --- a/heartbeat/monitors/active/icmp/icmp.go +++ b/heartbeat/monitors/active/icmp/icmp.go @@ -36,7 +36,6 @@ var debugf = logp.MakeDebug("icmp") func init() { monitors.RegisterActive("icmp", create) - monitors.RegisterActive("synthetics/icmp", create) } func create( diff --git a/heartbeat/monitors/active/tcp/tcp.go b/heartbeat/monitors/active/tcp/tcp.go index 6be682ee560d..26f96d2e0102 100644 --- a/heartbeat/monitors/active/tcp/tcp.go +++ b/heartbeat/monitors/active/tcp/tcp.go @@ -40,7 +40,6 @@ import ( func init() { monitors.RegisterActive("tcp", create) - monitors.RegisterActive("synthetics/tcp", create) } var debugf = logp.MakeDebug("tcp") diff --git a/x-pack/elastic-agent/CHANGELOG.asciidoc b/x-pack/elastic-agent/CHANGELOG.asciidoc index 068a2134980e..f4ad19cc290e 100644 --- a/x-pack/elastic-agent/CHANGELOG.asciidoc +++ b/x-pack/elastic-agent/CHANGELOG.asciidoc @@ -102,4 +102,3 @@ - Improved version CLI {pull}20359[20359] - Enroll CLI now restarts running daemon {pull}20359[20359] - Add restart CLI cmd {pull}20359[20359] -- Add new `synthetics/*` inputs to run Heartbeat {pull}20387[20387] diff --git a/x-pack/elastic-agent/magefile.go b/x-pack/elastic-agent/magefile.go index 2d634d6fce14..638537f3d7c9 100644 --- a/x-pack/elastic-agent/magefile.go +++ b/x-pack/elastic-agent/magefile.go @@ -523,7 +523,7 @@ func packageAgent(requiredPackages []string, packagingFn func()) { defer os.RemoveAll(dropPath) defer os.Unsetenv(agentDropPath) - packedBeats := []string{"filebeat", "heartbeat", "metricbeat"} + packedBeats := []string{"filebeat", "metricbeat"} for _, b := range packedBeats { pwd, err := filepath.Abs(filepath.Join("..", b)) diff --git a/x-pack/elastic-agent/pkg/agent/program/program_test.go b/x-pack/elastic-agent/pkg/agent/program/program_test.go index 8c46e15deec9..c9c4f9eb9d04 100644 --- a/x-pack/elastic-agent/pkg/agent/program/program_test.go +++ b/x-pack/elastic-agent/pkg/agent/program/program_test.go @@ -385,8 +385,8 @@ func TestConfiguration(t *testing.T) { err bool }{ "single_config": { - programs: []string{"filebeat", "heartbeat", "metricbeat", "endpoint"}, - expected: 4, + programs: []string{"filebeat", "metricbeat", "endpoint"}, + expected: 3, }, "constraints_config": { programs: []string{"filebeat"}, @@ -400,10 +400,10 @@ func TestConfiguration(t *testing.T) { // programs: []string{"journalbeat"}, // expected: 1, // }, - "synthetics_config": { - programs: []string{"heartbeat"}, - expected: 1, - }, + // "monitor_config": { + // programs: []string{"heartbeat"}, + // expected: 1, + // }, "enabled_true": { programs: []string{"filebeat"}, expected: 1, diff --git a/x-pack/elastic-agent/pkg/agent/program/supported.go b/x-pack/elastic-agent/pkg/agent/program/supported.go index ecd1232200a6..b6ec465bbcd5 100644 --- a/x-pack/elastic-agent/pkg/agent/program/supported.go +++ b/x-pack/elastic-agent/pkg/agent/program/supported.go @@ -19,9 +19,8 @@ func init() { // Packed Files // spec/endpoint.yml // spec/filebeat.yml - // spec/heartbeat.yml // spec/metricbeat.yml - unpacked := packer.MustUnpack("eJy8WVtzozgWft+f0a+7tQsizg5bNQ82GQTYIW2SSEJvSLINtsBsjC+wtf99S4C5OEn39M5UP3S5jYV0dC7f+b6T/3w55Cv+j1Um8n2SFX8vU/nlX19Yahf0Zb8J8GTHoZmzbLl5BWgriJcLZzcPgb57SmaSpcGZAXkUll5R7Os8ldpqmcc8C3Ka2lvxsN/Qfo+CQgSszJc8o3kIXu/dh9B4etjMQxDLEBTrCE8qAe0De9jPF88zuYJoSwDNGXy9t5LpxrVm55AE+6dkmgz35b1tSbsu5qmonjb7jWtNN4vnaSJSVEaYTtz2mYCyoNjUlY2P1XTOoVkJW+3nayG+HJ42+8KF6I5if01TeaAv+7l6z3VmsYCbe9fyPr7/s9usg3ZJjcfW7mnhWl63tzuwa/Gs6xyKMsSBvHleUuKfBPG2lDwmg30+OXe0/rhK5fmju/rb6dnKZiVFps5SeeRGEDN4vrcSbUN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4600Syk35LWXfEYVvCGpMin0nAvcUKUGkC+76eQQ6sdjevXao6sVVTXCoM2uWU0c79U38SZcRutZ3Quy2VgXlQh1bI38kJqWeUGlnBOmqUZwoMg/kTX9YYRWkouz0+e+JyWF/3IBmutYxM6JEWzUrmmb0pB8I8nVS+dySdsUdIaNWDDSJY5VZEhxWMQo6cbg4MyOczBNaQLTkOLnPT+64+pm4zf3nRKymQSjhctogvb+/KrGi4k3w+lEJXgrCplGv5PrMDFFzB5arTJTUmqlmdBNPy+Fe1YD3Ad/Ex9txtzG0iQiN0exA8O4mEBpifUkXNx/rtlDEKZbN/bEjc33LXP8cAVgzYFa3wqZgtlVkSeQ1b8W0ODEAK26bCcnCnix7UdzhrRMqlcIORf38RTJplh/FSngengU3ezo79YQ93c1OviPAPhE9e2osZhjYBbU/EZft2cOZI2Hw0ffZmRrzcXMVGycQzF0/enaR9sKtauoi70Rvj9X2IjURsSle39lqhGcMrjkz1tO78k0cjnI0Ebo/5Uefw5Qgcmby/a8WsB8aCTZ4zp1kyyTMCE76y853xEGlcIbTh28r0PGY8Xz43XnOn50BOf1F9NM5UHNB/XxG8hPiHG45EFpsmxVBXGzc+Y+JdddXNb5ZPpnrr+0F8r9XaZF/jFH715zxdNz54/lWKyRPqmFNxV/XgCdrh4uX4m91+Rwap57EAG4j7FfR/cynw0jPE6BvuCOs3GwORB+zHxK5o/d+RlTfzd3+WiHefK/H86i/SszfXUKWNw66rSWZf1a5uquJLudjXfG7XD/prb1ImnBD3zcnM9TvzjSHmpn27M9nd98IVn3VrFR9jmd3rwqL+Pno45JO/GmHVU2NYqyNZnqjOL/usptgbEQbgEWEA031V4LsKgK7bNXYwFuhXjWCr70IvDafCwq40hd1bLHc2v3665d//te/AgAA///6YIki") SupportedMap = make(map[string]Spec) for f, v := range unpacked { diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_basic-endpoint-security.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_basic-endpoint-security.yml index f0505a5f3237..31cdc7282619 100644 --- a/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_basic-endpoint-security.yml +++ b/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_basic-endpoint-security.yml @@ -21,7 +21,6 @@ output: inputs: - id: endpoint-id - type: endpoint name: endpoint-1 enabled: true package: diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_basic.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_basic.yml index 832dc4704de9..9dff3f786910 100644 --- a/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_basic.yml +++ b/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_basic.yml @@ -20,7 +20,6 @@ outputs: inputs: - id: endpoint-id - type: endpoint name: endpoint-1 enabled: true package: diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_no_fleet.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_no_fleet.yml index de7ccd2a11cd..8ac4e997c074 100644 --- a/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_no_fleet.yml +++ b/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_no_fleet.yml @@ -11,7 +11,6 @@ outputs: inputs: - id: endpoint-id - type: endpoint name: endpoint-1 enabled: true package: diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_unknown_output.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_unknown_output.yml index 48e362849bed..dbd492e4e259 100644 --- a/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_unknown_output.yml +++ b/x-pack/elastic-agent/pkg/agent/program/testdata/endpoint_unknown_output.yml @@ -16,7 +16,6 @@ outputs: inputs: - id: endpoint-id - type: endpoint name: endpoint-1 enabled: true package: diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/monitor_config-heartbeat.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/monitor_config-heartbeat.yml new file mode 100644 index 000000000000..59feb7568854 --- /dev/null +++ b/x-pack/elastic-agent/pkg/agent/program/testdata/monitor_config-heartbeat.yml @@ -0,0 +1,18 @@ +heartbeat: + monitors: + - type: icmp + name: icmp + schedule: "*/5 * * * * * *" + hosts: ["localhost"] + ipv4: true + ipv6: true + mode: any + timeout: 16s + wait: 1s + - type: tcp + name: tcp +output: + elasticsearch: + hosts: [127.0.0.1:9200, 127.0.0.1:9300] + username: elastic + password: changeme diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/monitor_config.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/monitor_config.yml new file mode 100644 index 000000000000..97e5d9d8980a --- /dev/null +++ b/x-pack/elastic-agent/pkg/agent/program/testdata/monitor_config.yml @@ -0,0 +1,23 @@ +streams: +- type: monitor/icmp + name: icmp + schedule: '*/5 * * * * * *' + hosts: ["localhost"] + ipv4: true + ipv6: true + mode: any + timeout: 16s + wait: 1s +- type: log/file +- type: monitor/tcp + name: tcp +management: + host: "localhost" +config: + reload: 123 +outputs: + default: + type: elasticsearch + hosts: [127.0.0.1:9200, 127.0.0.1:9300] + username: elastic + password: changeme diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/single_config-endpoint-security.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/single_config-endpoint-security.yml index 42d78b09ca53..4b58a1466ae2 100644 --- a/x-pack/elastic-agent/pkg/agent/program/testdata/single_config-endpoint-security.yml +++ b/x-pack/elastic-agent/pkg/agent/program/testdata/single_config-endpoint-security.yml @@ -21,7 +21,6 @@ output: inputs: - id: endpoint-id - type: endpoint name: endpoint-1 enabled: true package: diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/single_config-heartbeat.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/single_config-heartbeat.yml deleted file mode 100644 index f6be90698f65..000000000000 --- a/x-pack/elastic-agent/pkg/agent/program/testdata/single_config-heartbeat.yml +++ /dev/null @@ -1,18 +0,0 @@ -inputs: -- type: synthetics/http - id: unique-http-id - name: my-http - schedule: '*/5 * * * * * *' - host: "http://localhost:80/service/status" - timeout: 16s - wait: 1s - dataset.namespace: default -output: - elasticsearch: - hosts: - - 127.0.0.1:9200 - - 127.0.0.1:9300 - username: elastic - password: changeme - api_key: TiNAGG4BaaMdaH1tRfuU:KnR6yE41RrSowb0kQ0HWoA - ca_sha256: 7HIpactkIAq2Y49orFOOQKurWxmmSFZhBCoQYcRhJ3Y= diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/single_config.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/single_config.yml index 01d511004082..be0d2abdf02f 100644 --- a/x-pack/elastic-agent/pkg/agent/program/testdata/single_config.yml +++ b/x-pack/elastic-agent/pkg/agent/program/testdata/single_config.yml @@ -67,15 +67,7 @@ inputs: metricset: info hosts: ["http://apache.remote"] hosts: ["http://apache.local"] -- type: synthetics/http - id: unique-http-id - name: my-http - schedule: '*/5 * * * * * *' - host: "http://localhost:80/service/status" - timeout: 16s - wait: 1s - id: endpoint-id - type: endpoint name: endpoint-1 enabled: true package: diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/synthetics_config-heartbeat.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/synthetics_config-heartbeat.yml deleted file mode 100644 index 564d01afc15d..000000000000 --- a/x-pack/elastic-agent/pkg/agent/program/testdata/synthetics_config-heartbeat.yml +++ /dev/null @@ -1,33 +0,0 @@ -inputs: -- type: synthetics/http - id: unique-http-id - name: my-http - schedule: '*/5 * * * * * *' - host: "http://localhost:80/service/status" - timeout: 16s - wait: 1s - dataset.namespace: default -- type: synthetics/tcp - id: unique-tcp-id - name: my-tcp - schedule: '*/5 * * * * * *' - host: "localhost:777" - timeout: 16s - wait: 1s - dataset.namespace: default -- type: synthetics/icmp - id: unique-icmp-id - name: my-icmp - schedule: '@every 5s' - host: "localhost" - ipv4: true - ipv6: true - mode: any - timeout: 16s - wait: 1s - dataset.namespace: default -output: - elasticsearch: - hosts: [127.0.0.1:9200, 127.0.0.1:9300] - username: elastic - password: changeme diff --git a/x-pack/elastic-agent/pkg/agent/program/testdata/synthetics_config.yml b/x-pack/elastic-agent/pkg/agent/program/testdata/synthetics_config.yml deleted file mode 100644 index 74aa9916a658..000000000000 --- a/x-pack/elastic-agent/pkg/agent/program/testdata/synthetics_config.yml +++ /dev/null @@ -1,31 +0,0 @@ -inputs: -- type: synthetics/http - id: unique-http-id - name: my-http - schedule: '*/5 * * * * * *' - host: "http://localhost:80/service/status" - timeout: 16s - wait: 1s -- type: synthetics/tcp - id: unique-tcp-id - name: my-tcp - schedule: '*/5 * * * * * *' - host: "localhost:777" - timeout: 16s - wait: 1s -- type: synthetics/icmp - id: unique-icmp-id - name: my-icmp - schedule: '@every 5s' - host: "localhost" - ipv4: true - ipv6: true - mode: any - timeout: 16s - wait: 1s -outputs: - default: - type: elasticsearch - hosts: [127.0.0.1:9200, 127.0.0.1:9300] - username: elastic - password: changeme diff --git a/x-pack/elastic-agent/pkg/agent/transpiler/rules.go b/x-pack/elastic-agent/pkg/agent/transpiler/rules.go index 5ad790eb31e6..cf18593c408a 100644 --- a/x-pack/elastic-agent/pkg/agent/transpiler/rules.go +++ b/x-pack/elastic-agent/pkg/agent/transpiler/rules.go @@ -1199,7 +1199,7 @@ func (r *FilterValuesWithRegexpRule) Apply(ast *AST) error { newAST, ok := Lookup(newRoot, r.Key) if !ok { - // doesn't have key so its filtered out + newNodes = append(newNodes, item) continue } @@ -1210,7 +1210,7 @@ func (r *FilterValuesWithRegexpRule) Apply(ast *AST) error { } if n.name != r.Key { - // doesn't match so its filtered out + newNodes = append(newNodes, item) continue } diff --git a/x-pack/elastic-agent/spec/heartbeat.yml b/x-pack/elastic-agent/spec/heartbeat.yml deleted file mode 100644 index b13ea46059bb..000000000000 --- a/x-pack/elastic-agent/spec/heartbeat.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Heartbeat -cmd: heartbeat -args: ["-E", "setup.ilm.enabled=false", "-E", "setup.template.enabled=false", "-E", "management.mode=x-pack-fleet", "-E", "management.enabled=true", "-E", "logging.level=debug"] -artifact: beats/heartbeat -rules: - - fix_stream: {} - - filter_values_with_regexp: - key: type - re: ^synthetics/.+ - selector: inputs - - filter_values: - selector: inputs - key: enabled - values: - - true - - filter: - selectors: - - inputs - - output - - keystore -when: HasItems(%{[inputs]}) && HasNamespace('output', 'elasticsearch', 'redis', - 'kafka', 'logstash') diff --git a/x-pack/elastic-agent/spec/heartbeat.yml.disabled b/x-pack/elastic-agent/spec/heartbeat.yml.disabled new file mode 100644 index 000000000000..14aaa1d3da47 --- /dev/null +++ b/x-pack/elastic-agent/spec/heartbeat.yml.disabled @@ -0,0 +1,27 @@ +name: Heartbeat +cmd: heartbeat +rules: +- filter_values_with_regexp: + key: type + re: ^monitor/.+ + selector: streams +- map: + path: streams + rules: + - translate_with_regexp: + path: type + re: ^monitor/(?P.+) + with: $type +- copy: + from: streams + to: heartbeat +- rename: + from: heartbeat.streams + to: monitors +- filter: + selectors: + - heartbeat + - output + - keystore +when: HasItems(%{[heartbeat.monitors]}) && HasNamespace('output', 'elasticsearch', + 'redis', 'kafka', 'logstash')