logstash/logstash — pull request #808 by bodgit (2013-11-27 14:50:22+00:00)
Title: Break out Netflow v9 field definitions into YAML file

As part of playing with the Netflow codec I enable Netflow on a device and then immediately find out it's sending some unsupported field. Adding said field requires altering the codec source, rebuilding the jar, etc. so instead I've extracted out the field definitions into an external YAML file. This base set should get bundled into the jar file which the codec reads at startup, and then I've added an additional configuration directive for the codec to specify a separate YAML file with the same format that can be used to augment the base set of fields.

The net result of this is I can now just update a YAML file with definitions as I find them and then periodically create PR's to update the base YAML file if necessary, no codes changes necessary.

NOTE!

* I can't currently work out how to get the YAML file added to the jar, it's not happening automatically so I think I need to update some sort of manifest. Any pointers?
* With the YAML file in the jar, is what I'm doing on line 33 the right way to load it from within the jar? The path ends up looking like "file:/path/to/logstash.jar!/logstash/codecs/netflow/netflow.yaml", does that need to be monkey patched like some of the other bits?