hadoop_exporter icon indicating copy to clipboard operation
hadoop_exporter copied to clipboard

./namenode_exporter.go:312:28: undefined: prometheus.Handler

Open luckercs opened this issue 4 years ago • 1 comments

when i run 'go build namenode_exporter.go', I got this question, How to solve this problem?

luckercs avatar Apr 25 '20 10:04 luckercs

see https://github.com/freenetdigital/prometheus_oracle_exporter/issues/22 for a similar problem.

You need to add this import : "github.com/prometheus/client_golang/prometheus/promhttp" and replace prometheus.Handler() by promhttp.Handler()

ghost avatar Mar 17 '21 08:03 ghost