I forked the 2.2 branch of graylog-plugin-sample and got it working for 2.3 with a few minor tweaks. I’ve submitted a pull request to update the main project.
Until then, you can try it out here:
git clone -b "2.3" https://github.com/billmurrin/graylog-plugin-sample.git
Now you can clone the 2.3.0 branch of the Graylog repo, run npm install and then build your vendor manifest
git clone -b "2.3.0" https://github.com/Graylog2/graylog2-server.git
webpack --config webpack.vendor.js
After that is done, in the
graylog-plugin-sample folder, do the following:
mvn package should succeed and you should be able to add the jar from the
graylog-plugin-sample/target folder to your plugin directory on your Graylog server and have it run.
If you want to do hot-reloading with the webpack dev server (makes working with React way easier) you need to modify the
graylog2-server/graylog2-web-interface/config.js file to suit your needs and then run
#Modify the config.js file
#Start the server
Your plugin will be automatically included as long as it meets the following criteria set forth in the
- You plugin directory is located two directories away (…/…/graylog-plugin-sample) from the graylog2-web-interface directory
- The name of the plugin folder starts with
|- graylog2-server (../)
|- graylog2-web-interface (../../)
|- graylog2-plugin-sample (../)
I hope that makes sense, please let me know if I can be of any assistance.