Documentation ¶
Overview ¶
Package statsd_exporter embeds https://github.com/prometheus/statsd_exporter
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultConfig = Config{ ListenUDP: ":9125", ListenTCP: ":9125", UnixSocketMode: "755", CacheSize: 1000, CacheType: "lru", EventQueueSize: 10000, EventFlushThreshold: 1000, EventFlushInterval: 200 * time.Millisecond, ParseDogStatsd: true, ParseInfluxDB: true, ParseLibrato: true, ParseSignalFX: true, }
Functions ¶
Types ¶
type Config ¶
type Config struct { // Enabled enables the integration. Enabled bool `yaml:"enabled"` CommonConfig config.Common `yaml:",inline"` ListenUDP string `yaml:"listen_udp"` ListenTCP string `yaml:"listen_tcp"` ListenUnixgram string `yaml:"listen_unixgram"` UnixSocketMode string `yaml:"unix_socket_mode"` MappingConfig *mapper.MetricMapper `yaml:"mapping_config"` ReadBuffer int `yaml:"read_buffer"` CacheSize int `yaml:"cache_size"` CacheType string `yaml:"cache_type"` EventQueueSize int `yaml:"event_queue_size"` EventFlushThreshold int `yaml:"event_flush_threshold"` EventFlushInterval time.Duration `yaml:"event_flush_interval"` ParseDogStatsd bool `yaml:"parse_dogstatsd_tags"` ParseInfluxDB bool `yaml:"parse_influxdb_tags"` ParseLibrato bool `yaml:"parse_librato_tags"` ParseSignalFX bool `yaml:"parse_signalfx_tags"` }
Config controls the statsd_exporter integration.
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler for Config.
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporters defines the statsd_exporter integration.
func (*Exporter) CommonConfig ¶
CommonConfig satisfies common.Integration.
func (*Exporter) RegisterRoutes ¶
RegisterRoutes satisfies common.Integration. The mux.Router provided here is expected to be a subrouter, where all registered paths will be registered within that subroute.
func (*Exporter) ScrapeConfigs ¶
func (e *Exporter) ScrapeConfigs() []config.ScrapeConfig
ScrapeConfigs satisfies Integration.ScrapeConfigs.
type Metrics ¶
type Metrics struct { EventStats *prometheus.CounterVec EventsFlushed prometheus.Counter EventsUnmapped prometheus.Counter UDPPackets prometheus.Counter TCPConnections prometheus.Counter TCPErrors prometheus.Counter TCPLineTooLong prometheus.Counter UnixgramPackets prometheus.Counter LinesReceived prometheus.Counter SamplesReceived prometheus.Counter SampleErrors *prometheus.CounterVec TagsReceived prometheus.Counter TagErrors prometheus.Counter MappingsCount prometheus.Gauge ConflictingEventStats *prometheus.CounterVec ErrorEventStats *prometheus.CounterVec EventsActions *prometheus.CounterVec MetricsCount *prometheus.GaugeVec }
Metrics holds metrics used by the statsd_exporter integration. These metrics are distinct from the set of metrics used by the exporter itself, and are just used to monitor the stats of the listeners that forward data to the exporter.
func NewMetrics ¶
func NewMetrics(r prometheus.Registerer) (*Metrics, error)
NewMetrics initializes Metrics and registers them to the given Registerer.