0
votes

Since I'm fairly new to Logstash and Elasticsearch, I try to follow the user guides as closely as possible.

Currently I'm trying to set up a Logstash codec plugin by following this guide: https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_codec_plugin.html

However I'm stuck at step 3 when copying the example code. There are no files in the downloaded repository which match the ones described in the example. Namely: the gemspec file and the two rb files.

What did I miss?

2

2 Answers

2
votes

If you're using Logstash 2.4, you can use the new plugin generator: https://www.elastic.co/guide/en/logstash/current/plugin-generator.html

bin/logstash-plugin generate --type codec --name your_codec

That command will generate everything for you, including the gemspec and rb files.

0
votes

First you might be better off using the existing codec instead of developing one (but I don't know what you are trying to do).

But if you are intend to develop a codec, other users had the same problem and one found a solution : https://github.com/logstash-plugins/logstash-codec-example/issues/3#issuecomment-244621222

The files actually exists in a pull request: https://github.com/logstash-plugins/logstash-codec-example/pull/7/files

You'll have to pull this commit to have the missing files.