Comments (6)
Removing the whole vendor dir did the job for me (Fedora 27 and Ubuntu 16.04 )
git clone https://github.com/digitalocean/ceph_exporter.git ceph_exporter
cd ceph_exporter
# use the luminous branch
git checkout luminous
go get -d .
rm -rf $GOPATH/src/github.com/digitalocean/ceph_exporter/vendor/*
# use current go version:
perl -pni -e "s#1.5.3#1.10.1#g" Makefile.COMMON
make
HTH
from ceph_exporter.
What version of golang are you using?
For us it works with golang 1.8 (Ubuntu 16.04 go packages from https://launchpad.net/~gophers/+archive/ubuntu/archive).
Here's a snippet from our docker build script:
export GOHOME=/usr/lib/go-1.8
export PATH=${GOHOME}/bin:${PATH}
export GOPATH=/go
export APPLOC=${GOPATH}/src/github.com/digitalocean
pushd ${APPLOC}
git clone https://github.com/digitalocean/ceph_exporter.git ceph_exporter
pushd ceph_exporter
go get -d .
go build -o /bin/ceph_exporter
from ceph_exporter.
for me the following works
cd ceph_exporter
make
from ceph_exporter.
It's not work for me.
Here is what happened:
[root@ceph ceph_exporter]# make
GO15VENDOREXPERIMENT=1 GOROOT=/usr/lib/golang /usr/lib/golang/bin/go build -o ceph_exporter
# _/root/ceph_exporter
./exporter.go:49: cannot use collectors.NewClusterUsageCollector(conn, cluster) (type *collectors.ClusterUsageCollector) as type "github.com/prometheus/client_golang/prometheus".Collector in array or slice literal:
*collectors.ClusterUsageCollector does not implement "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<- "github.com/prometheus/client_golang/prometheus".Metric)
./exporter.go:50: cannot use collectors.NewPoolUsageCollector(conn, cluster) (type *collectors.PoolUsageCollector) as type "github.com/prometheus/client_golang/prometheus".Collector in array or slice literal:
*collectors.PoolUsageCollector does not implement "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<- "github.com/prometheus/client_golang/prometheus".Metric)
./exporter.go:51: cannot use collectors.NewClusterHealthCollector(conn, cluster) (type *collectors.ClusterHealthCollector) as type "github.com/prometheus/client_golang/prometheus".Collector in array or slice literal:
*collectors.ClusterHealthCollector does not implement "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<- "github.com/prometheus/client_golang/prometheus".Metric)
./exporter.go:52: cannot use collectors.NewMonitorCollector(conn, cluster) (type *collectors.MonitorCollector) as type "github.com/prometheus/client_golang/prometheus".Collector in array or slice literal:
*collectors.MonitorCollector does not implement "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<- "github.com/prometheus/client_golang/prometheus".Metric)
./exporter.go:53: cannot use collectors.NewOSDCollector(conn, cluster) (type *collectors.OSDCollector) as type "github.com/prometheus/client_golang/prometheus".Collector in array or slice literal:
*collectors.OSDCollector does not implement "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<- "github.com/prometheus/client_golang/prometheus".Metric)
make: *** [ceph_exporter] Error 2
from ceph_exporter.
Hi guys,
I had the same issue here, trying to build ceph_exporter into CentOS 7.4, with golang 1.9.
Follow a snippet of what I did:
export GOPATH=$(pwd)
export PATH=$PATH:$GOPATH/bin
git clone https://github.com/digitalocean/ceph_exporter.git ceph_exporter
go get -d <each_package>
make
Errors output shows that you have prometheus in a different path that exporter.go is expecting. I only had to remove prometheus from src/github.com/digitalocean/ceph_exporter/vendor/github.com/prometheus/client_golang/prometheus
and run make again.
from ceph_exporter.
Builds seem to be working fine with modern versions of Go :)
from ceph_exporter.
Related Issues (20)
- ceph_osd_weight metric return REWEIGHT instead of WEIGHT HOT 4
- ceph_health_status_interp's status HOT 2
- can not build HOT 1
- does 2.0.7-luminous support ceph jewel ? HOT 1
- curl <host>:9128/metrics hangs HOT 9
- osdmap health details are not not found when monitoring ceph octopus with 3.0.0-nautilus HOT 5
- ceph_exporter gather error HOT 3
- Prometheus Exporters Hub by this repository! Thanks! :) HOT 1
- Add new DAEMON_OLD_VERSION flag to health_status_interp HOT 2
- Support OSD operations Latency for Nautilus release HOT 4
- activating TLS on exporter HOT 2
- Cannot connect to ceph cluster: permission denied HOT 6
- compile get error: "could not determine kind of name for C.rados_mgr_command" HOT 3
- add bucket sharks and obj nums metrics support HOT 1
- Pgs stats HOT 2
- add bucket usage collector HOT 4
- fatal error: rados/librados.h: No such file or directory HOT 1
- Add Docs Listing the Exported Metrics HOT 4
- Update image build workflow to tag images with git tags HOT 3
- go build failed v4.2.0 with go version go1.20.4 linux/amd6 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ceph_exporter.