Unfortunately, the documentation on this topic is hard to find. You can read about it here: https://www.elastic.co/guide/en/logstash/current/use-ingest-pipelines.html#use-ingest-pipelines
Also, you can find a guide about developing your own modules: https://www.elastic.co/guide/en/beats/devguide/current/filebeat-modules-devguide.html
Let me know if you need more help.