diff --git a/Dockerfile b/Dockerfile index 5dceebd..98f26ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,6 @@ ENV GOPATH /go ENV PATH $GOROOT/bin:$PATH ENV APPLOC $GOPATH/src/github.com/digitalocean/ceph_exporter -ADD . $APPLOC - RUN apt-get update && \ apt-get install -y build-essential git curl && \ apt-get install -y librados-dev librbd-dev @@ -16,6 +14,7 @@ RUN \ mkdir -p /goroot && \ curl https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1 +ADD . $APPLOC WORKDIR $APPLOC RUN go get -d && \ go build -o /bin/ceph_exporter diff --git a/collectors/health.go b/collectors/health.go index f20f973..118eb9e 100644 --- a/collectors/health.go +++ b/collectors/health.go @@ -31,8 +31,8 @@ var ( recoveryIORateRegex = regexp.MustCompile(`(\d+) (\w{2})/s`) recoveryIOKeysRegex = regexp.MustCompile(`(\d+) keys/s`) recoveryIOObjectsRegex = regexp.MustCompile(`(\d+) objects/s`) - clientIOReadRegex = regexp.MustCompile(`(\d+) (\w[bB])/s rd`) - clientIOWriteRegex = regexp.MustCompile(`(\d+) (\w[bB])/s wr`) + clientIOReadRegex = regexp.MustCompile(`(\d+) ([kKmMgG][bB])/s rd`) + clientIOWriteRegex = regexp.MustCompile(`(\d+) ([kKmMgG][bB])/s wr`) clientIOReadOpsRegex = regexp.MustCompile(`(\d+) op/s rd`) clientIOWriteOpsRegex = regexp.MustCompile(`(\d+) op/s wr`)