statsd

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

README

A "local" UDP server for gathering statistical information from infrastructure and storing it in a Redis Stream.

Each UDP packet containing a value should be in the format:

#1.3=foo

And for counts:

1=bar

Test using netcat:

echo -n "1=hello world" | nc -4u -w0 localhost 9045 

The stats server does basic buffering of data and uses batch updates to reduce load on Redis.

The stats server is configured via Redis and currently supports the following settings:

Documentation

Overview

Package statsd creates a simple statistics server that accepts UDP data and peridically pushes the stats to a statistics end point.

UDP data packets each contain a single stat. If the packet begins with a `#` character, then the stat is a floating point value to be set. Otherwise the stat is an integer count that increments the stat's total. The data format is the type character (if a value), a number, followed by a `=` (equals sign), followed by the name of the statistic (max 255 characters in length).

The statsd server aggregates statistics and pushes them to a final "end point" at certain intervals. Currently, the supported end points are:

* StatHat

Future end points we hope to support include:

* AWS Kinesis * AWS Lambda * Graphite

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements the entire statsd server.

func (*Server) Start

func (s *Server) Start() error

Start begins accepting UDP stats packets from the network. Start blocks until the server is stopped.

func (*Server) Stop

func (s *Server) Stop()

Stop terminates the server (not thread safe).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL