mirror of
https://github.com/nshttpd/mikrotik-exporter.git
synced 2024-11-21 11:05:23 +01:00
add in go runtime metrics
This commit is contained in:
parent
4bfa7adfef
commit
2c3eaf66cd
6
main.go
6
main.go
@ -175,7 +175,13 @@ func createMetricsHandler() (http.Handler, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
promhttp.Handler()
|
||||||
|
|
||||||
registry := prometheus.NewRegistry()
|
registry := prometheus.NewRegistry()
|
||||||
|
err = registry.Register(prometheus.NewGoCollector())
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
err = registry.Register(nc)
|
err = registry.Register(nc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user