diff --git a/graylog-plugin-function-xmllookupfunction/.mvn/jvm.config b/graylog-plugin-function-xmllookupfunction/.mvn/jvm.config new file mode 100644 index 0000000..32599ce --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/.mvn/jvm.config @@ -0,0 +1,10 @@ +--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED diff --git a/graylog-plugin-function-xmllookupfunction/GETTING-STARTED.md b/graylog-plugin-function-xmllookupfunction/GETTING-STARTED.md new file mode 100644 index 0000000..23880c9 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/GETTING-STARTED.md @@ -0,0 +1,8 @@ +Getting started with your new Graylog plugin +============================================ + +Welcome to your new Graylog plugin! + +Please refer to https://docs.graylog.org/docs/plugins for documentation on how to write +plugins for Graylog. + diff --git a/graylog-plugin-function-xmllookupfunction/README.md b/graylog-plugin-function-xmllookupfunction/README.md new file mode 100644 index 0000000..156b703 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/README.md @@ -0,0 +1,56 @@ +# XmlLookupFunction Plugin for Graylog + +__Use this paragraph to enter a description of your plugin.__ + +**Required Graylog version:** 2.0 and later + +Installation +------------ + +[Download the plugin](https://github.com/vshulkin/graylog-plugin-function-xmllookupfunction/releases) +and place the `.jar` file in your Graylog plugin directory. The plugin directory +is the `plugins/` folder relative from your `graylog-server` directory by default +and can be configured in your `graylog.conf` file. + +Restart `graylog-server` and you are done. + +Development +----------- + +You can improve your development experience for the web interface part of your plugin +dramatically by making use of hot reloading. To do this, do the following: + +* `git clone https://github.com/Graylog2/graylog2-server.git` +* `cd graylog2-server/graylog2-web-interface` +* `ln -s $YOURPLUGIN plugin/` +* `npm install && npm start` + +Usage +----- + +__Use this paragraph to document the usage of your plugin__ + + +Getting started +--------------- + +This project is using Maven 3 and requires Java 8 or higher. + +* Clone this repository. +* Run `mvn package` to build a JAR file. +* Optional: Run `mvn jdeb:jdeb` and `mvn rpm:rpm` to create a DEB and RPM package respectively. +* Copy generated JAR file in target directory to your Graylog plugin directory. +* Restart the Graylog. + +Plugin Release +-------------- + +We are using the maven release plugin: + +``` +$ mvn release:prepare +[...] +$ mvn release:perform +``` + +This sets the version numbers, creates a tag and pushes to GitHub. diff --git a/graylog-plugin-function-xmllookupfunction/build.config.js b/graylog-plugin-function-xmllookupfunction/build.config.js new file mode 100644 index 0000000..500cf49 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/build.config.js @@ -0,0 +1,6 @@ +const path = require('path'); + +module.exports = { + // Make sure that this is the correct path to the web interface part of the Graylog server repository. + web_src_path: path.resolve(__dirname, '../graylog2-server', 'graylog2-web-interface'), +}; diff --git a/graylog-plugin-function-xmllookupfunction/package.json b/graylog-plugin-function-xmllookupfunction/package.json new file mode 100644 index 0000000..b69df25 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/package.json @@ -0,0 +1,28 @@ +{ + "name": "XmlLookupFunction", + "version": "1.0.0-SNAPSHOT", + "description": "", + "repository": { + "type": "git", + "url": "vshulkin/graylog-plugin-function-xmllookupfunction" + }, + "scripts": { + "build": "webpack", + "lint": "eslint src", + "lint:path": "eslint", + "test": "jest" + }, + "keywords": [ + "graylog" + ], + "author": "John Doe ", + "license": "MIT", + "eslintConfig": { + "extends": "graylog" + }, + "dependencies": { + }, + "devDependencies": { + "graylog-web-plugin": "file:../graylog2-server/graylog2-web-interface/packages/graylog-web-plugin" + } +} diff --git a/graylog-plugin-function-xmllookupfunction/pom.xml b/graylog-plugin-function-xmllookupfunction/pom.xml new file mode 100644 index 0000000..111dd62 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/pom.xml @@ -0,0 +1,248 @@ + + + + 4.0.0 + + + org.graylog.plugins + graylog-plugin-parent + 5.1.5 + + + org.graylog.plugins + graylog-plugin-function-xmllookupfunction + 1.0.0-SNAPSHOT + jar + + ${project.artifactId} + Graylog ${project.artifactId} plugin. + https://www.graylog.org + + + + John Doe + you@example.org + + + + + scm:git:git@github.com:vshulkin/graylog-plugin-function-xmllookupfunction.git + scm:git:git@github.com:vshulkin/graylog-plugin-function-xmllookupfunction.git + https://github.com/vshulkin/graylog-plugin-function-xmllookupfunction + HEAD + + + + UTF-8 + 17 + 17 + + + true + + ${project.parent.version} + /usr/share/graylog-server/plugin + + + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + Nexus Release Repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://oss.sonatype.org/content/repositories/snapshots + + false + + + true + + + + sonatype-nexus-releases + Sonatype Nexus Releases + https://oss.sonatype.org/content/repositories/releases + + true + + + false + + + + + + + org.graylog2 + graylog2-server + ${graylog.version} + provided + + + org.graylog.plugins + graylog-plugin-pipeline-processor + 2.5.2 + provided + + + + org.graylog2 + graylog2-server + ${graylog.version} + test-jar + test + + + + + + ${web.build-dir} + + src/main/resources + true + + + + + maven-assembly-plugin + + true + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + + ${project.groupId}.${project.artifactId} + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 2.4.1 + + false + + + + package + + shade + + + + + + + + + + + + org.apache.maven.plugins + maven-release-plugin + 2.5.2 + + true + forked-path + @{project.version} + clean test + package + + + + + jdeb + org.vafer + 1.4 + + ${project.build.directory}/${project.artifactId}-${project.version}.deb + + + ${project.build.directory}/${project.build.finalName}.jar + file + + perm + ${graylog.plugin-dir} + 644 + root + root + + + + + + + + org.codehaus.mojo + rpm-maven-plugin + 2.1.4 + + Application/Internet + + /usr + + + _unpackaged_files_terminate_build 0 + _binaries_in_noarch_packages_terminate_build 0 + + 644 + 755 + root + root + + + ${graylog.plugin-dir} + + + ${project.build.directory}/ + + ${project.build.finalName}.jar + + + + + + + + + + diff --git a/graylog-plugin-function-xmllookupfunction/src/deb/control/control b/graylog-plugin-function-xmllookupfunction/src/deb/control/control new file mode 100644 index 0000000..dd855d6 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/src/deb/control/control @@ -0,0 +1,8 @@ +Package: [[name]] +Version: [[version]] +Architecture: all +Maintainer: John Doe +Section: web +Priority: optional +Depends: graylog-server | graylog-radio +Description: [[description]] diff --git a/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunction.java b/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunction.java new file mode 100644 index 0000000..0e1fd7b --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunction.java @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2020 Graylog, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the Server Side Public License, version 1, + * as published by MongoDB, Inc. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Server Side Public License for more details. + * + * You should have received a copy of the Server Side Public License + * along with this program. If not, see + * . + */ + +package org.graylog.plugins.custom; + +import com.google.common.collect.ImmutableList; +import org.graylog.plugins.pipelineprocessor.EvaluationContext; +import org.graylog.plugins.pipelineprocessor.ast.expressions.Expression; +import org.graylog.plugins.pipelineprocessor.ast.functions.AbstractFunction; +import org.graylog.plugins.pipelineprocessor.ast.functions.Function; +import org.graylog.plugins.pipelineprocessor.ast.functions.FunctionArgs; +import org.graylog.plugins.pipelineprocessor.ast.functions.FunctionDescriptor; +import org.graylog.plugins.pipelineprocessor.ast.functions.ParameterDescriptor; +import org.w3c.dom.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.xml.parsers.DocumentBuilderFactory; +import java.io.ByteArrayInputStream; +import java.nio.charset.StandardCharsets; +import java.util.List; + +public class XmlLookupFunction extends AbstractFunction { + private static final Logger LOG = LoggerFactory.getLogger(XmlLookupFunction.class); + public static final String NAME = "xml_lookup"; + + private final ParameterDescriptor input = + ParameterDescriptor.string("input").description("XML input string").build(); + private final ParameterDescriptor query = + ParameterDescriptor.string("query").description("Tag name or tag@attribute").build(); + + @Override + public FunctionDescriptor descriptor() { + return FunctionDescriptor.builder() + .name(NAME) + .description("Extracts value from XML input using tag name or tag@attribute") + .params(ImmutableList.of(input, query)) + .returnType(String.class) + .build(); + } + + @Override + public String evaluate(FunctionArgs args, EvaluationContext context) { + final String xmlInput = input.required(args, context); + final String lookup = query.required(args, context); + + try { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(true); + Document doc = factory.newDocumentBuilder().parse( + new ByteArrayInputStream(xmlInput.getBytes(StandardCharsets.UTF_8))); + + if (lookup.contains("@")) { + String[] parts = lookup.split("@", 2); + return getAttribute(doc, parts[0], parts[1]); + } else { + return getTagValue(doc, lookup); + } + } catch (Exception e) { + LOG.error("Failed to evaluate xml_lookup: {}", e.getMessage(), e); + return null; + } + } + + private String getTagValue(Document doc, String tagName) { + NodeList nodes = doc.getElementsByTagNameNS("*", tagName); + if (nodes.getLength() > 0) { + return nodes.item(0).getTextContent().trim(); + } + return null; + } + + private String getAttribute(Document doc, String tagName, String attrName) { + NodeList nodes = doc.getElementsByTagNameNS("*", tagName); + for (int i = 0; i < nodes.getLength(); i++) { + NamedNodeMap attrs = nodes.item(i).getAttributes(); + if (attrs != null) { + Node attr = attrs.getNamedItem(attrName); + if (attr != null) { + return attr.getTextContent(); + } + } + } + return null; + } +} + + diff --git a/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunctionMetaData.java b/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunctionMetaData.java new file mode 100644 index 0000000..5afe2ac --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunctionMetaData.java @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2020 Graylog, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the Server Side Public License, version 1, + * as published by MongoDB, Inc. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Server Side Public License for more details. + * + * You should have received a copy of the Server Side Public License + * along with this program. If not, see + * . + */ +package org.graylog.plugins.custom; + +import org.graylog2.plugin.PluginMetaData; +import org.graylog2.plugin.ServerStatus; +import org.graylog2.plugin.Version; + +import java.net.URI; +import java.util.Collections; +import java.util.Set; + +/** + * Implement the PluginMetaData interface here. + */ +public class XmlLookupFunctionMetaData implements PluginMetaData { + private static final String PLUGIN_PROPERTIES = "org.graylog.plugins.graylog-plugin-function-xmllookupfunction/graylog-plugin.properties"; + + @Override + public String getUniqueId() { + return "org.graylog.plugins.custom.XmlLookupFunctionPlugin"; + } + + @Override + public String getName() { + return "XmlLookupFunction"; + } + + @Override + public String getAuthor() { + return "John Doe "; + } + + @Override + public URI getURL() { + return URI.create("https://github.com/vshulkin/graylog-plugin-function-xmllookupfunction"); + } + + @Override + public Version getVersion() { + return Version.fromPluginProperties(getClass(), PLUGIN_PROPERTIES, "version", Version.from(0, 0, 0, "unknown")); + } + + @Override + public String getDescription() { + // TODO Insert correct plugin description + return "Description of XmlLookupFunction plugin"; + } + + @Override + public Version getRequiredVersion() { + return Version.fromPluginProperties(getClass(), PLUGIN_PROPERTIES, "graylog.version", Version.from(0, 0, 0, "unknown")); + } + + @Override + public Set getRequiredCapabilities() { + return Collections.emptySet(); + } +} diff --git a/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunctionModule.java b/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunctionModule.java new file mode 100644 index 0000000..ed8413b --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunctionModule.java @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2020 Graylog, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the Server Side Public License, version 1, + * as published by MongoDB, Inc. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Server Side Public License for more details. + * + * You should have received a copy of the Server Side Public License + * along with this program. If not, see + * . + */ + +package org.graylog.plugins.custom; + +import com.google.inject.Binder; +import com.google.inject.TypeLiteral; +import com.google.inject.multibindings.MapBinder; +import org.graylog.plugins.pipelineprocessor.ast.functions.Function; +import org.graylog2.plugin.PluginConfigBean; +import org.graylog2.plugin.PluginModule; + + + +import java.util.Collections; +import java.util.Set; + +/** + * Extend the PluginModule abstract class here to add you plugin to the system. + */ +public class XmlLookupFunctionModule extends PluginModule { + /** + * Returns all configuration beans required by this plugin. + * + * Implementing this method is optional. The default method returns an empty {@link Set}. + */ + @Override + public Set getConfigBeans() { + return Collections.emptySet(); + } + + @Override + protected void configure() { + addMessageProcessorFunction(XmlLookupFunction.NAME, XmlLookupFunction.class); + } + protected void addMessageProcessorFunction(String name, Class> functionClass) { + addMessageProcessorFunction(binder(), name, functionClass); + } + + public static MapBinder> processorFunctionBinder(Binder binder) { + return MapBinder.newMapBinder(binder, TypeLiteral.get(String.class), new TypeLiteral>() {}); + } + + public static void addMessageProcessorFunction(Binder binder, String name, Class> functionClass) { + processorFunctionBinder(binder).addBinding(name).to(functionClass); + } +} diff --git a/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunctionPlugin.java b/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunctionPlugin.java new file mode 100644 index 0000000..af5f7cb --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/src/main/java/org/graylog/plugins/custom/XmlLookupFunctionPlugin.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2020 Graylog, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the Server Side Public License, version 1, + * as published by MongoDB, Inc. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Server Side Public License for more details. + * + * You should have received a copy of the Server Side Public License + * along with this program. If not, see + * . + */ +package org.graylog.plugins.custom; + +import org.graylog2.plugin.Plugin; +import org.graylog2.plugin.PluginMetaData; +import org.graylog2.plugin.PluginModule; + +import java.util.Collection; +import java.util.Collections; + +/** + * Implement the Plugin interface here. + */ +public class XmlLookupFunctionPlugin implements Plugin { + @Override + public PluginMetaData metadata() { + return new XmlLookupFunctionMetaData(); + } + + @Override + public Collection modules () { + return Collections.singletonList(new XmlLookupFunctionModule()); + } +} diff --git a/graylog-plugin-function-xmllookupfunction/src/main/resources/META-INF/services/org.graylog2.plugin.Plugin b/graylog-plugin-function-xmllookupfunction/src/main/resources/META-INF/services/org.graylog2.plugin.Plugin new file mode 100644 index 0000000..a98bd50 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/src/main/resources/META-INF/services/org.graylog2.plugin.Plugin @@ -0,0 +1 @@ +org.graylog.plugins.custom.XmlLookupFunctionPlugin \ No newline at end of file diff --git a/graylog-plugin-function-xmllookupfunction/src/main/resources/org.graylog.plugins.graylog-plugin-function-xmllookupfunction/graylog-plugin.properties b/graylog-plugin-function-xmllookupfunction/src/main/resources/org.graylog.plugins.graylog-plugin-function-xmllookupfunction/graylog-plugin.properties new file mode 100644 index 0000000..63e3eb5 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/src/main/resources/org.graylog.plugins.graylog-plugin-function-xmllookupfunction/graylog-plugin.properties @@ -0,0 +1,12 @@ +# The plugin version +version=${project.version} + +# The required Graylog server version +graylog.version=${graylog.version} + +# When set to true (the default) the plugin gets a separate class loader +# when loading the plugin. When set to false, the plugin shares a class loader +# with other plugins that have isolated=false. +# +# Do not disable this unless this plugin depends on another plugin! +isolated=true diff --git a/graylog-plugin-function-xmllookupfunction/src/web/index.jsx b/graylog-plugin-function-xmllookupfunction/src/web/index.jsx new file mode 100644 index 0000000..23fc2f6 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/src/web/index.jsx @@ -0,0 +1,26 @@ +import 'webpack-entry'; + +import { PluginManifest, PluginStore } from 'graylog-web-plugin/plugin'; + +import packageJson from '../../package.json'; + +const manifest = new PluginManifest(packageJson, { + /* This is the place where you define which entities you are providing to the web interface. + Right now you can add routes and navigation elements to it. + + Examples: */ + + // Adding a route to /sample, rendering YourReactComponent when called: + + // routes: [ + // { path: '/sample', component: YourReactComponent, permissions: 'inputs:create' }, + // ], + + // Adding an element to the top navigation pointing to /sample named "Sample": + + // navigation: [ + // { path: '/sample', description: 'Sample' }, + // ] +}); + +PluginStore.register(manifest); diff --git a/graylog-plugin-function-xmllookupfunction/target/classes/META-INF/services/org.graylog2.plugin.Plugin b/graylog-plugin-function-xmllookupfunction/target/classes/META-INF/services/org.graylog2.plugin.Plugin new file mode 100644 index 0000000..a98bd50 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/target/classes/META-INF/services/org.graylog2.plugin.Plugin @@ -0,0 +1 @@ +org.graylog.plugins.custom.XmlLookupFunctionPlugin \ No newline at end of file diff --git a/graylog-plugin-function-xmllookupfunction/target/classes/org.graylog.plugins.graylog-plugin-function-xmllookupfunction/graylog-plugin.properties b/graylog-plugin-function-xmllookupfunction/target/classes/org.graylog.plugins.graylog-plugin-function-xmllookupfunction/graylog-plugin.properties new file mode 100644 index 0000000..364ac82 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/target/classes/org.graylog.plugins.graylog-plugin-function-xmllookupfunction/graylog-plugin.properties @@ -0,0 +1,12 @@ +# The plugin version +version=1.0.0-SNAPSHOT + +# The required Graylog server version +graylog.version=5.1.5 + +# When set to true (the default) the plugin gets a separate class loader +# when loading the plugin. When set to false, the plugin shares a class loader +# with other plugins that have isolated=false. +# +# Do not disable this unless this plugin depends on another plugin! +isolated=true diff --git a/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunction.class b/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunction.class new file mode 100644 index 0000000..0a35b3b Binary files /dev/null and b/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunction.class differ diff --git a/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionMetaData.class b/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionMetaData.class new file mode 100644 index 0000000..eef0967 Binary files /dev/null and b/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionMetaData.class differ diff --git a/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionModule$1.class b/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionModule$1.class new file mode 100644 index 0000000..2b2a3cf Binary files /dev/null and b/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionModule$1.class differ diff --git a/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionModule.class b/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionModule.class new file mode 100644 index 0000000..96f9b7d Binary files /dev/null and b/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionModule.class differ diff --git a/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionPlugin.class b/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionPlugin.class new file mode 100644 index 0000000..a1f3ba7 Binary files /dev/null and b/graylog-plugin-function-xmllookupfunction/target/classes/org/graylog/plugins/custom/XmlLookupFunctionPlugin.class differ diff --git a/graylog-plugin-function-xmllookupfunction/target/graylog-plugin-function-xmllookupfunction-1.0.0-SNAPSHOT.jar b/graylog-plugin-function-xmllookupfunction/target/graylog-plugin-function-xmllookupfunction-1.0.0-SNAPSHOT.jar new file mode 100644 index 0000000..9e0f739 Binary files /dev/null and b/graylog-plugin-function-xmllookupfunction/target/graylog-plugin-function-xmllookupfunction-1.0.0-SNAPSHOT.jar differ diff --git a/graylog-plugin-function-xmllookupfunction/target/maven-archiver/pom.properties b/graylog-plugin-function-xmllookupfunction/target/maven-archiver/pom.properties new file mode 100644 index 0000000..6e1cb39 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Apache Maven +#Fri May 09 12:06:43 EDT 2025 +artifactId=graylog-plugin-function-xmllookupfunction +groupId=org.graylog.plugins +version=1.0.0-SNAPSHOT diff --git a/graylog-plugin-function-xmllookupfunction/target/original-graylog-plugin-function-xmllookupfunction-1.0.0-SNAPSHOT.jar b/graylog-plugin-function-xmllookupfunction/target/original-graylog-plugin-function-xmllookupfunction-1.0.0-SNAPSHOT.jar new file mode 100644 index 0000000..dc7e024 Binary files /dev/null and b/graylog-plugin-function-xmllookupfunction/target/original-graylog-plugin-function-xmllookupfunction-1.0.0-SNAPSHOT.jar differ diff --git a/graylog-plugin-function-xmllookupfunction/webpack.config.js b/graylog-plugin-function-xmllookupfunction/webpack.config.js new file mode 100644 index 0000000..2a842e7 --- /dev/null +++ b/graylog-plugin-function-xmllookupfunction/webpack.config.js @@ -0,0 +1,8 @@ +const path = require('path'); +const { PluginWebpackConfig } = require('graylog-web-plugin'); +const { loadBuildConfig } = require('graylog-web-plugin'); + +// Remember to use the same name here and in `getUniqueId()` in the java MetaData class +module.exports = new PluginWebpackConfig(__dirname, 'org.graylog.plugins.custom.XmlLookupFunctionPlugin', loadBuildConfig(path.resolve(__dirname, './build.config')), { + // Here goes your additional webpack configuration. +});