Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go Build ERROR #104

Closed
Liamlu28 opened this issue Sep 19, 2018 · 3 comments
Closed

Go Build ERROR #104

Liamlu28 opened this issue Sep 19, 2018 · 3 comments

Comments

@Liamlu28
Copy link

ceph_exporter go build error

go version go1.9.4 linux/amd64

[root@rg1-ceph01 ~/go/src/ceph_exporter]# go build

./exporter.go:85:39: cannot use collectors.NewClusterUsageCollector(conn, cluster) (type *collectors.ClusterUsageCollector) as type "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector in array or slice literal:
*collectors.ClusterUsageCollector does not implement "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method)
have Collect(chan<- "github.com/digitalocean/ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
want Collect(chan<- "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
./exporter.go:86:36: cannot use collectors.NewPoolUsageCollector(conn, cluster) (type *collectors.PoolUsageCollector) as type "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector in array or slice literal:
*collectors.PoolUsageCollector does not implement "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method)
have Collect(chan<- "github.com/digitalocean/ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
want Collect(chan<- "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
./exporter.go:87:40: cannot use collectors.NewClusterHealthCollector(conn, cluster) (type *collectors.ClusterHealthCollector) as type "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector in array or slice literal:
*collectors.ClusterHealthCollector does not implement "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method)
have Collect(chan<- "github.com/digitalocean/ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
want Collect(chan<- "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
./exporter.go:88:34: cannot use collectors.NewMonitorCollector(conn, cluster) (type *collectors.MonitorCollector) as type "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector in array or slice literal:
*collectors.MonitorCollector does not implement "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method)
have Collect(chan<- "github.com/digitalocean/ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
want Collect(chan<- "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
./exporter.go:89:30: cannot use collectors.NewOSDCollector(conn, cluster) (type *collectors.OSDCollector) as type "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector in array or slice literal:
*collectors.OSDCollector does not implement "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method)
have Collect(chan<- "github.com/digitalocean/ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
want Collect(chan<- "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
./exporter.go:95:24: cannot use collectors.NewRGWCollector(cluster, config, false) (type *collectors.RGWCollector) as type "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector in append:
*collectors.RGWCollector does not implement "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method)
have Collect(chan<- "github.com/digitalocean/ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
want Collect(chan<- "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
./exporter.go:100:24: cannot use collectors.NewRGWCollector(cluster, config, true) (type *collectors.RGWCollector) as type "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector in append:
*collectors.RGWCollector does not implement "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method)
have Collect(chan<- "github.com/digitalocean/ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)
want Collect(chan<- "ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus".Metric)

@Liamlu28
Copy link
Author

ignore

@yangzan66
Copy link

how do you fix it? if ignore, there is no ceph_expoter

@alram
Copy link
Collaborator

alram commented Oct 27, 2020

docker build -t digitalocean/ceph_exporter . is the way to build the container. If you want to build it locally you'll have to look at the content of the dockerfile to satisfy all the deps.

@alram alram closed this as completed Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants