How to pack mybeat to mybeat.rpm?

I am based on https://www.elastic.co/guide/en/beats/devguide/current/beater-interface.html to build my own beat. Then I wrote my codes. Finally I go build main.go and Now i have ./main and *.yml , nothing else.

I want to make my own beat to build a rpm package.

so I used "rpm2cpio rpm_pack_name.rpm | cpio -div" to unzip filebeat.rpm, It gets the list of files as
'etc/' 'lib/' 'usr'

  1. I will be based on the /etc, lib/, usr/ to add mybeat.service, mybeat.sh, init.d/mybeat, if I just want the program to run in the background, Can i not write mybeat.sh ?
  1. What is the role of the import_dashboards and migrate_beat_config_1_x_to_5_0.py?In my beat, can i not write it?
  1. If you did it, please tell me what else should I pay attention to?

If you used the beat generator to bootstrap your beat with the boilerplate code then you can run make package (requires Docker) to build RPM/Deb/Zip/Tar.gz. We use the same process to package the Beats we release.

OK, Thanks.

This topic was automatically closed after 21 days. New replies are no longer allowed.