2013-07-08 18:37:12 +00:00
|
|
|
// Copyright (c) 2013, Prometheus Team
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2014-06-26 13:56:21 +00:00
|
|
|
eventStats = prometheus.NewCounterVec(
|
|
|
|
prometheus.CounterOpts{
|
2014-06-27 16:51:29 +00:00
|
|
|
Name: "statsd_bridge_events_total",
|
2014-06-26 13:56:21 +00:00
|
|
|
Help: "The total number of StatsD events seen.",
|
|
|
|
},
|
|
|
|
[]string{"type"},
|
|
|
|
)
|
|
|
|
networkStats = prometheus.NewCounterVec(
|
|
|
|
prometheus.CounterOpts{
|
2014-06-27 16:51:29 +00:00
|
|
|
Name: "statsd_bridge_packets_total",
|
2014-06-26 13:56:21 +00:00
|
|
|
Help: "The total number of StatsD packets seen.",
|
|
|
|
},
|
|
|
|
[]string{"type"},
|
|
|
|
)
|
|
|
|
configLoads = prometheus.NewCounterVec(
|
|
|
|
prometheus.CounterOpts{
|
2014-06-27 16:51:29 +00:00
|
|
|
Name: "statsd_bridge_config_reloads_total",
|
2014-06-26 13:56:21 +00:00
|
|
|
Help: "The number of configuration reloads.",
|
|
|
|
},
|
|
|
|
[]string{"outcome"},
|
|
|
|
)
|
|
|
|
mappingsCount = prometheus.NewGauge(prometheus.GaugeOpts{
|
|
|
|
Name: "statsd_bridge_loaded_mappings_count",
|
|
|
|
Help: "The number of configured metric mappings.",
|
|
|
|
})
|
2013-07-08 18:37:12 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2014-06-26 13:56:21 +00:00
|
|
|
prometheus.MustRegister(eventStats)
|
|
|
|
prometheus.MustRegister(networkStats)
|
|
|
|
prometheus.MustRegister(configLoads)
|
|
|
|
prometheus.MustRegister(mappingsCount)
|
2013-07-08 18:37:12 +00:00
|
|
|
}
|