From 9bf125bf1d518ba2f98d6310151636fe5e1a3582 Mon Sep 17 00:00:00 2001 From: Craig MacKenzie Date: Thu, 20 Jun 2024 12:56:05 -0400 Subject: [PATCH] Remove now unused Beat spec files (#4964) * Remove unused beat spec files. * Rename filebeat to testbeat. --- pkg/component/component_test.go | 89 +++--- pkg/component/load_test.go | 22 +- specs/auditbeat.spec.yml | 53 ---- specs/heartbeat.spec.yml | 53 ---- specs/metricbeat.spec.yml | 297 ------------------ specs/osquerybeat.spec.yml | 40 --- specs/packetbeat.spec.yml | 41 --- .../{filebeat.spec.yml => testbeat.spec.yml} | 1 + 8 files changed, 46 insertions(+), 550 deletions(-) delete mode 100644 specs/auditbeat.spec.yml delete mode 100644 specs/heartbeat.spec.yml delete mode 100644 specs/metricbeat.spec.yml delete mode 100644 specs/osquerybeat.spec.yml delete mode 100644 specs/packetbeat.spec.yml rename specs/{filebeat.spec.yml => testbeat.spec.yml} (98%) diff --git a/pkg/component/component_test.go b/pkg/component/component_test.go index bf09c2be41e..a1032da799a 100644 --- a/pkg/component/component_test.go +++ b/pkg/component/component_test.go @@ -610,8 +610,8 @@ func TestToComponents(t *testing.T) { ID: "filestream-default", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -839,8 +839,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -948,8 +948,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -1059,8 +1059,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -1219,8 +1219,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -1256,8 +1256,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -1293,8 +1293,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "log", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -1316,7 +1316,6 @@ func TestToComponents(t *testing.T) { }, { ID: "log-default-logfile-1", - Type: client.UnitTypeInput, LogLevel: defaultUnitLogLevel, Config: MustExpectedConfig(map[string]interface{}{ "type": "log", @@ -1330,8 +1329,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "log", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -1358,8 +1357,8 @@ func TestToComponents(t *testing.T) { OutputType: "logstash", InputSpec: &InputRuntimeSpec{ InputType: "log", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -1386,8 +1385,8 @@ func TestToComponents(t *testing.T) { OutputType: "redis", InputSpec: &InputRuntimeSpec{ InputType: "log", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -1828,8 +1827,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -2087,8 +2086,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -2130,8 +2129,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -2168,8 +2167,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "log", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -2280,8 +2279,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "log", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -2309,8 +2308,8 @@ func TestToComponents(t *testing.T) { OutputType: "logstash", InputSpec: &InputRuntimeSpec{ InputType: "log", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -2380,8 +2379,8 @@ func TestToComponents(t *testing.T) { OutputType: "redis", InputSpec: &InputRuntimeSpec{ InputType: "log", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -3078,8 +3077,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "log", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -3136,8 +3135,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -3249,8 +3248,8 @@ func TestToComponents(t *testing.T) { OutputType: "elasticsearch", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -3364,8 +3363,8 @@ func TestToComponents(t *testing.T) { OutputType: "kafka", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { @@ -3468,8 +3467,8 @@ func TestToComponents(t *testing.T) { OutputType: "logstash", InputSpec: &InputRuntimeSpec{ InputType: "filestream", - BinaryName: "filebeat", - BinaryPath: filepath.Join("..", "..", "specs", "filebeat"), + BinaryName: "testbeat", + BinaryPath: filepath.Join("..", "..", "specs", "testbeat"), }, Units: []Unit{ { diff --git a/pkg/component/load_test.go b/pkg/component/load_test.go index 1bc4bed8915..080eb80fa55 100644 --- a/pkg/component/load_test.go +++ b/pkg/component/load_test.go @@ -45,10 +45,6 @@ func TestLoadSpec_Components(t *testing.T) { Name: "APM Server", Path: "apm-server.spec.yml", }, - { - Name: "Auditbeat", - Path: "auditbeat.spec.yml", - }, { Name: "Cloudbeat", Path: "cloudbeat.spec.yml", @@ -59,28 +55,12 @@ func TestLoadSpec_Components(t *testing.T) { }, { Name: "Filebeat", - Path: "filebeat.spec.yml", + Path: "testbeat.spec.yml", }, { Name: "Fleet Server", Path: "fleet-server.spec.yml", }, - { - Name: "Heartbeat", - Path: "heartbeat.spec.yml", - }, - { - Name: "Metricbeat", - Path: "metricbeat.spec.yml", - }, - { - Name: "Osquerybeat", - Path: "osquerybeat.spec.yml", - }, - { - Name: "Packetbeat", - Path: "packetbeat.spec.yml", - }, { Name: "Universal Profiling Collector", Path: "pf-elastic-collector.spec.yml", diff --git a/specs/auditbeat.spec.yml b/specs/auditbeat.spec.yml deleted file mode 100644 index c44498084d3..00000000000 --- a/specs/auditbeat.spec.yml +++ /dev/null @@ -1,53 +0,0 @@ -version: 2 -inputs: - - name: audit/auditd - description: "Auditd" - platforms: &platforms - - linux/amd64 - - linux/arm64 - - darwin/amd64 - - darwin/arm64 - - windows/amd64 - - container/amd64 - - container/arm64 - outputs: &outputs - - elasticsearch - - kafka - - logstash - - redis - command: &command - restart_monitoring_period: 5s - maximum_restarts_per_period: 1 - timeouts: - restart: 1s - args: - - "-E" - - "setup.ilm.enabled=false" - - "-E" - - "setup.template.enabled=false" - - "-E" - - "management.enabled=true" - - "-E" - - "management.restart_on_output_change=true" - - "-E" - - "logging.level=info" - - "-E" - - "logging.to_stderr=true" - - "-E" - - "gc_percent=${AUDITBEAT_GOGC:100}" - - "-E" - - "auditbeat.config.modules.enabled=false" - - "-E" - - "logging.event_data.to_stderr=true" - - "-E" - - "logging.event_data.to_files=false" - - name: audit/file_integrity - description: "Audit File Integrity" - platforms: *platforms - outputs: *outputs - command: *command - - name: audit/system - description: "Audit System" - platforms: *platforms - outputs: *outputs - command: *command diff --git a/specs/heartbeat.spec.yml b/specs/heartbeat.spec.yml deleted file mode 100644 index 8d15b722549..00000000000 --- a/specs/heartbeat.spec.yml +++ /dev/null @@ -1,53 +0,0 @@ -version: 2 -inputs: - - name: synthetics/browser - description: "Synthetics Browser Monitor" - platforms: &platforms - - linux/amd64 - - linux/arm64 - - darwin/amd64 - - darwin/arm64 - - windows/amd64 - - container/amd64 - - container/arm64 - outputs: &outputs - - elasticsearch - command: &command - restart_monitoring_period: 5s - maximum_restarts_per_period: 1 - timeouts: - restart: 1s - args: - - "-E" - - "setup.ilm.enabled=false" - - "-E" - - "setup.template.enabled=false" - - "-E" - - "management.enabled=true" - - "-E" - - "management.restart_on_output_change=true" - - "-E" - - "logging.level=info" - - "-E" - - "logging.to_stderr=true" - - "-E" - - "gc_percent=${HEARTBEAT_GOGC:100}" - - "-E" - - "logging.event_data.to_stderr=true" - - "-E" - - "logging.event_data.to_files=false" - - name: synthetics/http - description: "Synthetics HTTP Monitor" - platforms: *platforms - outputs: *outputs - command: *command - - name: synthetics/icmp - description: "Synthetics ICMP Monitor" - platforms: *platforms - outputs: *outputs - command: *command - - name: synthetics/tcp - description: "Synthetics TCP Monitor" - platforms: *platforms - outputs: *outputs - command: *command diff --git a/specs/metricbeat.spec.yml b/specs/metricbeat.spec.yml deleted file mode 100644 index 28d56167a55..00000000000 --- a/specs/metricbeat.spec.yml +++ /dev/null @@ -1,297 +0,0 @@ -version: 2 -inputs: - - name: beat/metrics - description: "Beat metrics" - platforms: &platforms - - linux/amd64 - - linux/arm64 - - darwin/amd64 - - darwin/arm64 - - windows/amd64 - - container/amd64 - - container/arm64 - outputs: &outputs - - elasticsearch - - kafka - - logstash - - redis - shippers: &shippers - - shipper - command: &command - restart_monitoring_period: 5s - maximum_restarts_per_period: 1 - timeouts: - restart: 1s - args: - - "-E" - - "setup.ilm.enabled=false" - - "-E" - - "setup.template.enabled=false" - - "-E" - - "management.enabled=true" - - "-E" - - "management.restart_on_output_change=true" - - "-E" - - "logging.level=info" - - "-E" - - "logging.to_stderr=true" - - "-E" - - "gc_percent=${METRICBEAT_GOGC:100}" - - "-E" - - "metricbeat.config.modules.enabled=false" - - "-E" - - "logging.event_data.to_stderr=true" - - "-E" - - "logging.event_data.to_files=false" - - name: docker/metrics - description: "Docker metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: elasticsearch/metrics - description: "Elasticsearch metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: enterprisesearch/metrics - description: "Enterprise search metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: kibana/metrics - description: "Kibana metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: kubernetes/metrics - description: "Kubernetes metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: linux/metrics - description: "Linux metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: logstash/metrics - description: "Logstash metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: mongodb/metrics - description: "Mongodb metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: mysql/metrics - description: "MySQL metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: postgresql/metrics - description: "PostgreSQL metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: redis/metrics - description: "Redis metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: system/metrics - description: "System metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: uwsgi/metrics - description: "UWSGI metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: windows/metrics - description: "Windows metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: aws/metrics - description: "AWS metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: awsfargate/metrics - description: "AWS Fargate metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: azure/metrics - description: "Azure metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: cloudfoundry/metrics - description: "PCF Cloudfoundry metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: containerd/metrics - description: "Containerd metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: mssql/metrics - description: "Microsoft SQL Server metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: oracle/metrics - description: "Oracle Database metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: syncgateway/metrics - description: "Couchbase Sync Gateway metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: http/metrics - description: "HTTP metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: activemq/metrics - description: "ActiveMQ metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: apache/metrics - description: "Apache metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: etcd/metrics - description: "Etcd metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: gcp/metrics - description: "GCP metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: haproxy/metrics - description: "HAProxy metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: iis/metrics - description: "IIS metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: jolokia/metrics - description: "Jolokia metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: kafka/metrics - description: "Kafka metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: memcached/metrics - description: "Memcached metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: nats/metrics - description: "NATS metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: nginx/metrics - description: "NGINX metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: prometheus/metrics - description: "Prometheus metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: rabbitmq/metrics - description: "RabbitMQ metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: sql/metrics - description: "SQL metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: stan/metrics - description: "Stan metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: statsd/metrics - description: "Statsd metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: traefik/metrics - description: "Traefik metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: vsphere/metrics - description: "VSphere metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command - - name: zookeeper/metrics - description: "ZooKeeper metrics" - platforms: *platforms - outputs: *outputs - shippers: *shippers - command: *command diff --git a/specs/osquerybeat.spec.yml b/specs/osquerybeat.spec.yml deleted file mode 100644 index dcbb28b89de..00000000000 --- a/specs/osquerybeat.spec.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: 2 -inputs: - - name: osquery - description: "Osquery" - platforms: - - linux/amd64 - - linux/arm64 - - darwin/amd64 - - darwin/arm64 - - windows/amd64 - - container/amd64 - - container/arm64 - outputs: - - elasticsearch - - logstash - - kafka - command: - restart_monitoring_period: 5s - maximum_restarts_per_period: 1 - timeouts: - restart: 1s - args: - - "-E" - - "setup.ilm.enabled=false" - - "-E" - - "setup.template.enabled=false" - - "-E" - - "management.enabled=true" - - "-E" - - "management.restart_on_output_change=true" - - "-E" - - "logging.level=info" - - "-E" - - "logging.to_stderr=true" - - "-E" - - "gc_percent=${OSQUERYBEAT_GOGC:100}" - - "-E" - - "logging.event_data.to_stderr=true" - - "-E" - - "logging.event_data.to_files=false" diff --git a/specs/packetbeat.spec.yml b/specs/packetbeat.spec.yml deleted file mode 100644 index a6d87d11437..00000000000 --- a/specs/packetbeat.spec.yml +++ /dev/null @@ -1,41 +0,0 @@ -version: 2 -inputs: - - name: packet - description: "Packet Capture" - platforms: - - linux/amd64 - - linux/arm64 - - darwin/amd64 - - darwin/arm64 - - windows/amd64 - - container/amd64 - - container/arm64 - outputs: - - elasticsearch - - kafka - - logstash - - redis - command: - restart_monitoring_period: 5s - maximum_restarts_per_period: 1 - timeouts: - restart: 1s - args: - - "-E" - - "setup.ilm.enabled=false" - - "-E" - - "setup.template.enabled=false" - - "-E" - - "management.enabled=true" - - "-E" - - "management.restart_on_output_change=true" - - "-E" - - "logging.level=info" - - "-E" - - "logging.to_stderr=true" - - "-E" - - "gc_percent=${PACKETBEAT_GOGC:100}" - - "-E" - - "logging.event_data.to_stderr=true" - - "-E" - - "logging.event_data.to_files=false" diff --git a/specs/filebeat.spec.yml b/specs/testbeat.spec.yml similarity index 98% rename from specs/filebeat.spec.yml rename to specs/testbeat.spec.yml index 9b2f3575837..c84f52cdcd9 100644 --- a/specs/filebeat.spec.yml +++ b/specs/testbeat.spec.yml @@ -1,3 +1,4 @@ +# Test Beat spec file based on the contents of the Filebeat 8.12.0 spec file when agentbeat was introduced. version: 2 inputs: - name: aws-cloudwatch