prometheus/main.go

18 lines
342 B
Go
Raw Normal View History

2012-11-24 11:33:34 +00:00
package main
import (
"code.google.com/p/gorest"
"github.com/matttproud/prometheus/storage/metric/leveldb"
2012-11-24 11:33:34 +00:00
"net/http"
)
func main() {
m, _ := leveldb.NewLevigoMetricPersistence("/tmp/metrics")
2012-11-24 11:33:34 +00:00
s := &MetricsService{
persistence: m,
}
gorest.RegisterService(s)
http.Handle("/", gorest.Handle())
http.ListenAndServe(":8787", nil)
}