# Preferred way to upgrade beats library

**URL:** <https://discuss.elastic.co/t/preferred-way-to-upgrade-beats-library/122744>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [March 6, 2018, 4:03pm UTC](https://discuss.elastic.co/t/preferred-way-to-upgrade-beats-library/122744 "2018-03-06T16:03:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcroonen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dcroonen/32/27450_2.png) [@dcroonen](https://discuss.elastic.co/u/dcroonen)\
**Post date:** [March 6, 2018, 4:03pm UTC](https://discuss.elastic.co/t/preferred-way-to-upgrade-beats-library/122744/1 "2018-03-06T16:03:19Z")

</div>

Hi

I have a custom beat based upon metricbeat 6.0 now I want to build this beat against metricbeat 6.2. Just checking out the 6.2 version of the beat code and compiling doesn't work.

I got the following error:

> ./main.go:19:24: not enough arguments in call to instance.Run  
> ./main.go:19:35: undefined: beater.New  
> make: \*\*\* [smartbeat] Error 2

I fixed this error but then I got the next one.... Is there any preferred way on how to upgrade the beat libraries?

Regards  
Davy

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [March 12, 2018, 7:50am UTC](https://discuss.elastic.co/t/preferred-way-to-upgrade-beats-library/122744/2 "2018-03-12T07:50:00Z")

</div>

There is unfortunately no recommended way. We try not to break the standard interfaces when possible but as you figured out yourself with the above we did as we needed it to add some new features. We are discussing since quite some time to also have a changelog for devs building beats on top of libbeat but never got to it.

What is the next error(s) you hit? Did you manage to figure it out?

---

<div class="post-metadata">

**Author:** ![dcroonen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dcroonen/32/27450_2.png) [@dcroonen](https://discuss.elastic.co/u/dcroonen)\
**Post date:** [March 12, 2018, 12:12pm UTC](https://discuss.elastic.co/t/preferred-way-to-upgrade-beats-library/122744/3 "2018-03-12T12:12:55Z")

</div>

Hi @ruflin

I just generated a new temporary beat based upon metricbeat 6.2 and copied over the main.go file and replaced the temporary name in the main.go file by the original name, this did the trick. Of course this worked for now but it is not guaranteed that this will work the next time.

About your suggestions about having a changelog for developers, that would be a nice thing to have. I'm already looking forward to it.

Regards  
Davy

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [March 13, 2018, 8:35am UTC](https://discuss.elastic.co/t/preferred-way-to-upgrade-beats-library/122744/4 "2018-03-13T08:35:13Z")

</div>

Glad you got it working. The thing that will always work is coming to the forum and ask for help as you did. Sorry that we broke your Beat as it's really awesome to see community Beats.

Also keep an eye on [https://github.com/elastic/beats/pull/6245](https://github.com/elastic/beats/pull/6245) as this should make the updating of dependencies at least a bit easier.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 10, 2018, 8:35am UTC](https://discuss.elastic.co/t/preferred-way-to-upgrade-beats-library/122744/5 "2018-04-10T08:35:47Z")

</div>

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