Error when installing Mongo Exporter for Promethus

94 views Asked by At

As explained in docks of Mongo Exporter, it is said to run the make release command in terminal, when doing that in Mac, First it is downloading the goRunner latest docker image then giving this error

docker run --rm --privileged \
        -v /Users/hirenmorenew/Documents/Innovate/mongodb_exporter:/go/src/github.com/user/repo \
        -w /go/src/github.com/user/repo \
        goreleaser/goreleaser release --snapshot --skip-publish --rm-dist 
Flag --rm-dist has been deprecated, please use --clean instead
  • starting release...
  • loading config file                              file=.goreleaser.yml
  ⨯ release failed after 0s                          error=yaml: unmarshal errors:
  line 91: field replacements not found in type config.NFPM 
2

There are 2 answers

0
markalex On

Sounds like a bug or unaccounted by exporter change in goreleaser.

File .goreleaser.yml on its 91 line contains replacements:. It seems like goreleaser doesn't expect it to be there.

Try modifying Makefile's release block to use older version of goreleaser. Or find out which changes resulted in breaking compatibility, and replace replacements: block accordingly.

Additionally, consider filing an issue in their repo.

0
Hiren More On

I pulled old image of goreleser: v1.18.2 which fixed the issue