2013-04-03 20:33:32 +04:00
|
|
|
// Copyright (c) 2013, Prometheus Team
|
2013-02-12 05:36:06 +04:00
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2013-02-18 08:09:21 +04:00
|
|
|
// A simple skeletal example of how this instrumentation framework is registered
|
|
|
|
// and invoked. Literally, this is the bare bones.
|
2012-05-21 12:43:21 +04:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2013-01-12 01:52:36 +04:00
|
|
|
"flag"
|
2013-04-03 20:33:32 +04:00
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
2012-05-21 12:43:21 +04:00
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2013-01-12 01:52:36 +04:00
|
|
|
flag.Parse()
|
|
|
|
|
2013-04-03 20:33:32 +04:00
|
|
|
http.Handle(prometheus.ExpositionResource, prometheus.DefaultHandler)
|
2013-03-29 00:03:01 +04:00
|
|
|
http.ListenAndServe(*listeningAddress, nil)
|
2012-05-21 12:43:21 +04:00
|
|
|
}
|
2013-03-29 00:03:01 +04:00
|
|
|
|
|
|
|
var (
|
|
|
|
listeningAddress = flag.String("listeningAddress", ":8080", "The address to listen to requests on.")
|
|
|
|
)
|