# Plugin Development

**URL:** https://community.graylog.org/t/plugin-development/2166
**Category:** Development
**Created:** [August 21, 2017, 2:57pm UTC](https://community.graylog.org/t/plugin-development/2166 "2017-08-21T14:57:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![guddu](https://avatars.discourse-cdn.com/v4/letter/g/848f3c/32.png) [@guddu](https://community.graylog.org/u/guddu)
#### Post date: [August 21, 2017, 2:57pm UTC](https://community.graylog.org/t/plugin-development/2166/1 "2017-08-21T14:57:43Z")

</div>

Hi All,

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.

Thanks in advance

---

<div class="post-metadata">

### Author: ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)
#### Post date: [August 21, 2017, 3:18pm UTC](https://community.graylog.org/t/plugin-development/2166/2 "2017-08-21T15:18:52Z")

</div>

Please refer to [http://docs.graylog.org/en/2.3/pages/plugins.html](http://docs.graylog.org/en/2.3/pages/plugins.html)

---

<div class="post-metadata">

### Author: ![guddu](https://avatars.discourse-cdn.com/v4/letter/g/848f3c/32.png) [@guddu](https://community.graylog.org/u/guddu)
#### Post date: [August 21, 2017, 5:06pm UTC](https://community.graylog.org/t/plugin-development/2166/3 "2017-08-21T17:06:59Z")

</div>

Hi,

Can you please let me know on any sample plugin which can work out of box…

Thanks

---

<div class="post-metadata">

### Author: ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)
#### Post date: [August 21, 2017, 5:21pm UTC](https://community.graylog.org/t/plugin-development/2166/4 "2017-08-21T17:21:34Z")

</div>

You can peek at the official plugins in the Graylog2 GitHub organization:

[https://github.com/Graylog2?q=plugin](https://github.com/Graylog2?q=plugin)

---

<div class="post-metadata">

### Author: ![billmurrin](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/billmurrin/32/42_2.png) [@billmurrin](https://community.graylog.org/u/billmurrin)
#### Post date: [August 25, 2017, 9:40am UTC](https://community.graylog.org/t/plugin-development/2166/5 "2017-08-25T09:40:50Z")

</div>

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:

> **[billmurrin/graylog-plugin-sample](https://github.com/billmurrin/graylog-plugin-sample/tree/2.3)**
>
> Sample plugin for Graylog 2.0 including web ui parts. - billmurrin/graylog-plugin-sample

```auto
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

```auto
git clone -b "2.3.0" https://github.com/Graylog2/graylog2-server.git
cd graylog2-server/graylog2-web-interface
npm install
webpack --config webpack.vendor.js

```

After that is done, in the `graylog-plugin-sample` folder, do the following:

```auto
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`.

```auto
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.

1. You plugin directory is located two directories away (…/…/graylog-plugin-sample) from the graylog2-web-interface directory
2. The name of the plugin folder starts with `graylog-plugin-`

_Example_

```auto
MAIN_DIR
|- graylog2-server (../)
     |- graylog2-web-interface (../../)
|- graylog2-plugin-sample (../)

```

I hope that makes sense, please let me know if I can be of any assistance.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)
#### Post date: [September 8, 2017, 9:41am UTC](https://community.graylog.org/t/plugin-development/2166/6 "2017-09-08T09:41:20Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
