These are the steps I followed -
- I cloned and copied the log folder (https://github.com/elastic/beats/tree/master/filebeat/input), renamed it to newlog and placed it into that folder only.
- I changed the package name to newlog for all files inside it
- I tried to register that input in init() function inside input.go and also registered the input in include.go file.
I faced with duplicate harvester error -
(panic: name harvester already used) so I tried to change the harvester registry name to filebeat.harvestor.newlog and tried to build it.
It builds successfully with filebeat.input to newlog in filebeat.yml config but as an when I try to run it, it throws error
Harvester could not be started on new file: /root/fakeRBOS3253.log, Err: error setting up harvester: Harvester setup failed. Unexpected file opening error: Invalid harvester type
Can anybody help regarding this on how to add your custom tag input to beats?
Here, the problem is just not about having a custom tag name but I want to implement some custom logic functionality behind it.