msiedlarek / nifi_exporter

Apache NiFi metrics exporter for Prometheus
Apache License 2.0
31 stars 22 forks source link

Build Issue #1

Closed synologic closed 5 years ago

synologic commented 6 years ago

Hi,

i'm having an issue when trying to build your project. I'm not a GO dev, however when i try go build i get: ./main.go:111: cannot use collectors.NewDiagnosticsCollector(api, node.Labels) (type collectors.DiagnosticsCollector) as type "github.com/prometheus/client_golang/prometheus".Collector in argument to "github.com/prometheus/client_golang/prometheus".DefaultRegisterer.Register: collectors.DiagnosticsCollector does not implement "github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method) have Collect(chan<- "github.com/msiedlarek/nifi_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric) want Collect(chan<- "github.com/prometheus/client_golang/prometheus".Metric) ./main.go:114: cannot use collectors.NewCountersCollector(api, node.Labels) (type collectors.CountersCollector) as type "github.com/prometheus/client_golang/prometheus".Collector in argument to "github.com/prometheus/client_golang/prometheus".DefaultRegisterer.Register: collectors.CountersCollector does not implement "github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method) have Collect(chan<- "github.com/msiedlarek/nifi_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric) want Collect(chan<- "github.com/prometheus/client_golang/prometheus".Metric) ./main.go:117: cannot use collectors.NewProcessGroupsCollector(api, node.Labels) (type collectors.ProcessGroupsCollector) as type "github.com/prometheus/client_golang/prometheus".Collector in argument to "github.com/prometheus/client_golang/prometheus".DefaultRegisterer.Register: collectors.ProcessGroupsCollector does not implement "github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method) have Collect(chan<- "github.com/msiedlarek/nifi_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric) want Collect(chan<- "github.com/prometheus/client_golang/prometheus".Metric)

Please advise

jpds commented 5 years ago

@synologic It looks like you haven't done go get before go build to fetch the dependencies.

msiedlarek commented 5 years ago

Correct, go get github.com/msiedlarek/nifi_exporter should be enough to get the source, all dependencies, compile and install.