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

how to use my golang code start prometheus server? #2301

Closed
jinhang opened this Issue Dec 26, 2016 · 5 comments

Comments

Projects
None yet
1 participant
@jinhang
Copy link

jinhang commented Dec 26, 2016

I want use my golang project's main() start prometheus server (call cmd/promethus/main.go Main())

@jinhang

This comment has been minimized.

Copy link
Author

jinhang commented Dec 26, 2016

_/home/jinhang/gowork/prometheus/cmd/prometheus

./main.go:204: cannot use notifier (type *notifier.Notifier) as type "github.com/prometheus/client_golang/prometheus".Collector in argument to "github.com/prometheus/client_golang/prometheus".MustRegister:
*notifier.Notifier does not implement "github.com/prometheus/client_golang/prometheus".Collector (wrong type for Collect method)
have Collect(chan<- "github.com/prometheus/prometheus/vendor/github.com/prometheus/client_golang/prometheus".Metric)
want Collect(chan<- "github.com/prometheus/client_golang/prometheus".Metric)
./main.go:282: cannot use []"github.com/prometheus/common/model".LabelSet literal (type []"github.com/prometheus/common/model".LabelSet) as type []"github.com/prometheus/prometheus/vendor/github.com/prometheus/common/model".LabelSet in field value
Error: process exited with code 2.

@jinhang

This comment has been minimized.

Copy link
Author

jinhang commented Dec 26, 2016

maybe I have the porblem with
#2298

@jinhang

This comment has been minimized.

Copy link
Author

jinhang commented Dec 26, 2016

go version go1.7.1 linux/386

@jinhang

This comment has been minimized.

Copy link
Author

jinhang commented Dec 26, 2016

prometheus/web_ui$ go build ./server/AmServer.go
cmd/prometheus/config.go:28:2: cannot find package "/usr/local/goworkspace/src/github.com/prometheus/web_ui/vendor/github.com/asaskevich/govalidator" in any of:
/usr/local/go/src/
/usr/local/goworkspace/src/github.com/prometheus/web_ui/vendor/github.com/asaskevich/govalidator (from $GOROOT)
/usr/local/goworkspace/src//usr/local/goworkspace/src/github.com/prometheus/web_ui/vendor/github.com/asaskevich/govalidator (from $GOPATH)
cmd/prometheus/main.go:27:2: cannot find package "
/usr/local/goworkspace/src/github.com/prometheus/web_ui/vendor/github.com/prometheus/client_golang/prometheus"

@jinhang jinhang closed this Dec 28, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.