Skip to content

Clean up x-pack files shipped with logstash artifacts #18544

@donoghuc

Description

@donoghuc

Currently logstash artifacts ship with every file under the x-pack directory in source. Many of these fiiles are unused (test/build code is included). We should only ship files needed at runtime (or metadata files useful for understanding artifacts). For example, only ship lib/**, src/**, etc). Note, one option would be to simply be more selective in

"x-pack/**/*",

Current files shipped in for example a logstash rpm:

➜  x-pack tree
.
├── build
│   ├── libs
│   │   └── logstash-xpack.jar
│   └── tmp
│       └── jar
│           └── MANIFEST.MF
├── build.gradle
├── CHANGELOG.md
├── ci
│   ├── integration_tests.sh
│   └── unit_tests.sh
├── distributions
│   └── internal
│       └── observabilitySRE
│           ├── build-ext.gradle
│           ├── config
│           │   ├── fips-jvm.options
│           │   └── security
│           │       └── java.security
│           ├── docker
│           │   └── Dockerfile
│           ├── plugin
│           │   └── logstash-integration-fips_validation
│           │       ├── lib
│           │       │   ├── logstash
│           │       │   │   └── fips_validation.rb
│           │       │   └── logstash_registry.rb
│           │       └── logstash-integration-fips_validation.gemspec
│           ├── plugin-allow-list.txt
│           ├── qa
│           │   ├── acceptance
│           │   │   ├── docker
│           │   │   │   ├── certs
│           │   │   │   │   └── generate.sh
│           │   │   │   ├── docker-compose.yml
│           │   │   │   ├── elasticsearch
│           │   │   │   │   └── config
│           │   │   │   │       └── elasticsearch-fips.yml
│           │   │   │   ├── filebeat
│           │   │   │   │   ├── config
│           │   │   │   │   │   └── filebeat-fips.yml
│           │   │   │   │   └── data
│           │   │   │   │       └── sample_logs.txt
│           │   │   │   └── logstash
│           │   │   │       ├── config
│           │   │   │       │   └── logstash-fips.yml
│           │   │   │       └── pipeline
│           │   │   │           ├── filebeat-to-ls-to-es.conf
│           │   │   │           ├── filebeat-to-ls-weak.conf
│           │   │   │           ├── logstash-to-elasticsearch-weak.conf
│           │   │   │           └── logstash-to-elasticsearch.conf
│           │   │   └── spec
│           │   │       └── acceptance_tests_spec.rb
│           │   ├── smoke
│           │   │   ├── docker
│           │   │   │   ├── certs
│           │   │   │   │   └── generate.sh
│           │   │   │   ├── docker-compose.yml
│           │   │   │   ├── elasticsearch
│           │   │   │   │   └── config
│           │   │   │   │       └── elasticsearch-fips.yml
│           │   │   │   ├── filebeat
│           │   │   │   │   └── filebeat.yml
│           │   │   │   ├── logstash
│           │   │   │   │   ├── config
│           │   │   │   │   │   └── logstash.yml
│           │   │   │   │   └── pipeline
│           │   │   │   │       └── logstash.conf
│           │   │   │   └── test-logs
│           │   │   │       └── test.log
│           │   │   └── spec
│           │   │       └── smoke_test_spec.rb
│           │   └── spec
│           │       └── shared_helpers.rb
│           └── README.md
├── gradle.properties
├── lib
│   ├── config_management
│   │   ├── bootstrap_check.rb
│   │   ├── elasticsearch_source.rb
│   │   ├── extension.rb
│   │   └── hooks.rb
│   ├── filters
│   │   └── geoip
│   │       └── database_manager.rb
│   ├── geoip_database_management
│   │   ├── constants.rb
│   │   ├── data_path.rb
│   │   ├── db_info.rb
│   │   ├── downloader.rb
│   │   ├── extension.rb
│   │   ├── manager.rb
│   │   ├── metadata.rb
│   │   ├── metric.rb
│   │   ├── subscription_observer.rb
│   │   ├── subscription.rb
│   │   └── util.rb
│   ├── helpers
│   │   ├── elasticsearch_options.rb
│   │   └── loggable_try.rb
│   ├── license_checker
│   │   ├── license_manager.rb
│   │   ├── license_reader.rb
│   │   ├── licensed.rb
│   │   └── x_pack_info.rb
│   ├── monitoring
│   │   ├── inputs
│   │   │   ├── metrics
│   │   │   │   ├── state_event_factory.rb
│   │   │   │   └── stats_event_factory.rb
│   │   │   ├── metrics.rb
│   │   │   └── timer_task_logger.rb
│   │   ├── internal_pipeline_source.rb
│   │   ├── monitoring.rb
│   │   └── outputs
│   │       └── elasticsearch_monitoring.rb
│   ├── template.cfg.erb
│   └── x-pack
│       └── logstash_registry.rb
├── qa
│   └── integration
│       ├── fips-validation
│       │   └── logstash-integration-fips-validation_spec.rb
│       ├── management
│       │   ├── multiple_pipelines_spec.rb
│       │   └── read_configuration_spec.rb
│       ├── monitoring
│       │   ├── direct_shipping_spec.rb
│       │   ├── es_documents_structure_validation_spec.rb
│       │   ├── geoip_metric_spec.rb
│       │   ├── monitoring_is_disabled_spec.rb
│       │   ├── multiple_host_defined_spec.rb
│       │   ├── no_ssl_create_monitoring_indexes_spec.rb
│       │   └── persisted_queue_is_enabled_spec.rb
│       ├── spec_helper.rb
│       └── support
│           ├── elasticsearch
│           │   └── api
│           │       └── actions
│           │           └── update_password.rb
│           ├── helpers.rb
│           └── shared_examples.rb
├── README.md
├── settings.gradle
├── spec
│   ├── config_management
│   │   ├── bootstrap_check_spec.rb
│   │   ├── elasticsearch_source_spec.rb
│   │   ├── extension_spec.rb
│   │   ├── fixtures
│   │   │   └── pipelines.json
│   │   └── hooks_spec.rb
│   ├── filters
│   │   └── geoip
│   │       ├── database_manager_spec.rb
│   │       └── test_helper.rb
│   ├── geoip_database_management
│   │   ├── downloader_spec.rb
│   │   ├── fixtures
│   │   │   ├── normal_resp.json
│   │   │   └── sample.tgz
│   │   ├── manager_spec.rb
│   │   ├── metadata_spec.rb
│   │   ├── spec_helper.rb
│   │   └── subscription_spec.rb
│   ├── helpers
│   │   └── elasticsearch_options_spec.rb
│   ├── license_checker
│   │   ├── license_info_spec.rb
│   │   ├── license_manager_spec.rb
│   │   └── license_reader_spec.rb
│   ├── monitoring
│   │   ├── inputs
│   │   │   ├── metrics
│   │   │   │   ├── state_event
│   │   │   │   │   └── lir_serializer_spec.rb
│   │   │   │   ├── state_event_factory_spec.rb
│   │   │   │   └── stats_event_factory_spec.rb
│   │   │   ├── metrics_spec.rb
│   │   │   └── timer_task_logger_spec.rb
│   │   ├── internal_pipeline_source_spec.rb
│   │   ├── pipeline_register_hook_spec.rb
│   │   └── schemas
│   │       ├── monitoring_document_new_schema.json
│   │       ├── monitoring_document_schema.json
│   │       ├── states_document_new_schema.json
│   │       └── states_document_schema.json
│   ├── spec_helper.rb
│   └── support
│       ├── helpers.rb
│       └── matchers.rb
└── src
    └── test
        └── java
            └── org
                └── logstash
                    └── xpack
                        └── test
                            ├── RSpecIntegrationTests.java
                            ├── RSpecObservabilitySREAcceptanceTests.java
                            ├── RSpecObservabilitySRETests.java
                            └── RSpecTests.java

84 directories, 119 files

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions