I am new to Graylog, I would like to know about plugins development from scratch, can anyone please share some docs or info’s? I tried to mimic graylog-plugin-collector and develop a new plugin, it got compiled successfully and upon putting the .jar file in /usr/share/graylog-server/plugins graylog server continuously restarts automatically.
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.
After that is done, in the graylog-plugin-sample folder, do the following:
npm install
mvn package
The 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 npm start.
cd graylog2-server/graylog2-web-interface
#Modify the config.js file
vim config.js
#Start the server
npm start
Your plugin will be automatically included as long as it meets the following criteria set forth in the graylog2-server/graylog2-web-interface/webpack.combined.config.js file.
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 graylog-plugin-