Comments (5)
Change prometheus.Handler
to promhttp.Handler
. @ammanms19
from prometheus_oracle_exporter.
Did you perform a "go get / go install" previous?
Seems something wrong with your environment.
from prometheus_oracle_exporter.
same problem. changing anything in source to promhttp.Handler
as suggested by @kylexlau doesn't do anything for me when building manually from source either.
[azauner@xxx~]$ https_proxy=xxx:xxx go get -u github.com/freenetdigital/prometheus_oracle_exporter
# github.com/freenetdigital/prometheus_oracle_exporter
go/src/github.com/freenetdigital/prometheus_oracle_exporter/main.go:938:3: undefined: prometheus.Handler
[azauner@xxx~]$ go version
go version go1.11.5 linux/amd64
from prometheus_oracle_exporter.
Hi,
Got it to work. You need to change not only the Handler but of course also need to import the relevant dependency at the top;
--- a/main.go 2019-06-24 15:04:53.134872921 +0200
+++ b/main.go 2019-06-24 15:02:52.614874202 +0200
@@ -8,6 +8,7 @@
"time"
_ "github.com/mattn/go-oci8"
"github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/common/log"
)
@@ -935,7 +936,7 @@
if r.URL.Query().Get("tablebytes") == "true" {; e.vTabBytes = true; }
if r.URL.Query().Get("indexbytes") == "true" {; e.vIndBytes = true; }
if r.URL.Query().Get("lobbytes") == "true" {; e.vLobBytes = true; }
- prometheus.Handler().ServeHTTP(w, r)
+ promhttp.Handler().ServeHTTP(w, r)
}
func main() {
from prometheus_oracle_exporter.
Thank you.
from prometheus_oracle_exporter.
Related Issues (20)
- Custom query doesn't work how described in doc HOT 1
- document missing the below details HOT 3
- tried running the exporter on oracle vm but getting the attached error message HOT 1
- alertlog usage HOT 2
- Oracle exporter installation issues HOT 1
- oracledb_alert metric are not working HOT 8
- Missing columns in output HOT 3
- Labels are missing in metrics HOT 3
- Timeout needed on connection level
- Limiting the scrape scope per database or instance
- custom scrape interval HOT 1
- grafana dashboard HOT 1
- Compile error in alertlog.go HOT 3
- In Custom metrics include the value in the result
- go get is failing because of change in the folder format in prometheus/common HOT 2
- Database name in configuration has no effect other than labeling the scrape output HOT 1
- Auditing events from Prometheus monitoring
- static listener and dynamic listener HOT 1
- possible to create a docker container
- Unsupported type value error occurs for a custom metric query which checks alertlog of pdb database
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 prometheus_oracle_exporter.