Distributing custom beats?


(Grigory Shamov) #1

Hi All,

Is there a best practice on how to distribute custom beats Sources, including the right Golang dependencies?

Right now, it is kind of hard, because of Beats library having complex build mechanism. It gives a nice bolerplate; So you have your code under ./config and ./beater, and it all just works.

Then trying to ./vendor elastic/beats does not just work; on Github there is quite a few custom beats, they all have some "instructions" (first clone the beat, then clone elastic/beats of the righ version, then copy it somewhere, and then it all fails to import some dependency or another). And looks like copying the entire thing gives you Metricbeat, FIlebeat, and what not.

Is there a way to vendor just the necessary dependencies and still have an automatic build? Any tools that people use? I have tried just running the Google 'dep' tool on my custom beat tree, but it fails to create correct ./vendor somehow.

Thank you very much in advance!

--
Grigory Shamov
University of Manitoba / Westgrid


(ruflin) #2

One thing I wrote for apm-server which depends on libbeat can be found here: https://github.com/elastic/apm-server/tree/master/_beats It does some tricks around removing the unnecessary files and still making sure everything works. We should probably get this code into the beats generator so every new beat created can make use of these scripts and approve upon.

It would be great if you could try out these scripts on your end to let us know if they work for you or need further generalisation.


(Grigory Shamov) #3

Hi Ruflin,

Thanks a lot! will try now!

Grigory Shamov


#4

@ruflin: I tried the script but it doesn't work out of the box. I made some modifications to the original setup but I would appreciate some help before submitting PR back to Elastic.

see Create new beat based on libbeat 6.1?


(system) #5

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