Skip to content
Merged
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LOGSTASH_PATH=../../logstash
ELASTICSEARCH_TREEISH=9.0
ELASTICSEARCH_TREEISH=main
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import co.elastic.logstash.filters.elasticintegration.ingest.PipelineProcessor;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.cluster.metadata.ProjectId;
import org.elasticsearch.ingest.Pipeline;
import org.elasticsearch.ingest.PipelineConfiguration;
import org.elasticsearch.ingest.Processor;
Expand Down Expand Up @@ -46,7 +47,7 @@ public IngestPipelineFactory withProcessors(final Map<String, Processor.Factory>

public Optional<IngestPipeline> create(final PipelineConfiguration pipelineConfiguration) {
try {
final Pipeline pipeline = Pipeline.create(pipelineConfiguration.getId(), pipelineConfiguration.getConfig(false), processorFactories, scriptService);
final Pipeline pipeline = Pipeline.create(pipelineConfiguration.getId(), pipelineConfiguration.getConfig(false), processorFactories, scriptService, ProjectId.DEFAULT);
final IngestPipeline ingestPipeline = new IngestPipeline(pipelineConfiguration, pipeline);
LOGGER.debug(() -> String.format("successfully created ingest pipeline `%s` from pipeline configuration", pipelineConfiguration.getId()));
return Optional.of(ingestPipeline);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
package co.elastic.logstash.filters.elasticintegration.geoip;

import org.elasticsearch.cluster.metadata.ProjectId;
import org.elasticsearch.ingest.Processor;
import org.elasticsearch.ingest.geoip.GeoIpProcessor;

Expand All @@ -22,7 +23,9 @@ public GeoIpProcessorFactory(final IpDatabaseProvider ipDatabaseProvider) {
public Processor create(Map<String, Processor.Factory> processorFactories,
String tag,
String description,
Map<String, Object> config) throws Exception {
return new GeoIpProcessor.Factory("geoip", this.ipDatabaseProvider).create(processorFactories, tag, description, config);
Map<String, Object> config,
ProjectId projectId) throws Exception {
return new GeoIpProcessor.Factory("geoip", this.ipDatabaseProvider)
.create(processorFactories, tag, description, config, projectId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import co.elastic.logstash.filters.elasticintegration.IngestPipelineResolver;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.cluster.metadata.ProjectId;
import org.elasticsearch.ingest.AbstractProcessor;
import org.elasticsearch.ingest.ConfigurationUtils;
import org.elasticsearch.ingest.IngestDocument;
Expand Down Expand Up @@ -91,7 +92,8 @@ public Factory(IngestPipelineResolver pipelineProvider, ScriptService scriptServ
public Processor create(Map<String, Processor.Factory> registry,
String processorTag,
String description,
Map<String, Object> config) throws Exception {
Map<String, Object> config,
ProjectId projectId) throws Exception {
String pipeline = ConfigurationUtils.readStringProperty(TYPE, processorTag, config, "name");
TemplateScript.Factory pipelineTemplate = ConfigurationUtils.compileTemplate(TYPE, processorTag, "name", pipeline, scriptService);
boolean ignoreMissingPipeline = ConfigurationUtils.readBooleanProperty(TYPE, processorTag, config, "ignore_missing_pipeline", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
package co.elastic.logstash.filters.elasticintegration.ingest;

import org.elasticsearch.cluster.metadata.ProjectId;
import org.elasticsearch.ingest.AbstractProcessor;
import org.elasticsearch.ingest.IngestDocument;
import org.elasticsearch.ingest.Processor;
Expand Down Expand Up @@ -36,7 +37,7 @@ public static final class Factory implements Processor.Factory {

@Override
public SetSecurityUserProcessor create(Map<String, Processor.Factory> registry, String processorTag,
String description, Map<String, Object> config) {
String description, Map<String, Object> config, ProjectId projectId) {
String[] supportedConfigs = {"field", "properties"};
for (String cfg : supportedConfigs) {
config.remove(cfg);
Expand Down