Documentation ¶
Index ¶
- Constants
- Variables
- func RunCarbon(ShareDir string, DataDir string, GraphiteCarbonPort int, ...)
- func RunCarbonApi(z string, port int, l int, cacheType string, mc string, memsize int, cpus int, ...)
- type Graphite
- func GraphiteFactory(protocol string, host string, port int, prefix string) (*Graphite, error)
- func NewGraphite(host string, port int) (*Graphite, error)
- func NewGraphiteNop(host string, port int) *Graphite
- func NewGraphiteUDP(host string, port int) (*Graphite, error)
- func NewGraphiteWithMetricPrefix(host string, port int, prefix string) (*Graphite, error)
- func (graphite *Graphite) Connect() error
- func (graphite *Graphite) Disconnect() error
- func (graphite *Graphite) IsNop() bool
- func (graphite *Graphite) SendMetric(metric Metric) error
- func (graphite *Graphite) SendMetrics(metrics []Metric) error
- func (graphite *Graphite) SimpleSend(stat string, value string) error
- type Metric
- Bugs
Constants ¶
const Version = "0.9.0"
Variables ¶
var BuildVersion = "(development build)"
BuildVersion is provided to be overridden at build time. Eg. go build -ldflags -X 'main.BuildVersion=...'
var Limiter limiter
Limiter limits concurrent zipper requests
var Metrics = struct { Requests *expvar.Int RequestCacheHits *expvar.Int FindRequests *expvar.Int FindCacheHits *expvar.Int RenderRequests *expvar.Int MemcacheTimeouts *expvar.Int CacheSize expvar.Func CacheItems expvar.Func }{ Requests: expvar.NewInt("requests"), RequestCacheHits: expvar.NewInt("request_cache_hits"), FindRequests: expvar.NewInt("find_requests"), FindCacheHits: expvar.NewInt("find_cache_hits"), RenderRequests: expvar.NewInt("render_requests"), MemcacheTimeouts: expvar.NewInt("memcache_timeouts"), }
Metrics contains exported counters and values for graphite
var Zipper zipper
Zipper is API entry to carbonzipper
Functions ¶
Types ¶
type Graphite ¶
type Graphite struct { Host string Port int Protocol string Timeout time.Duration Prefix string // contains filtered or unexported fields }
Graphite is a struct that defines the relevant properties of a graphite connection
func GraphiteFactory ¶
func NewGraphite ¶
NewGraphite is a factory method that's used to create a new Graphite
func NewGraphiteNop ¶
NewGraphiteNop is a factory method that returns a Graphite struct but will not actually try to send any packets to a remote host and, instead, will just log. This is useful if you want to use Graphite in a project but don't want to make Graphite a requirement for the project.
func NewGraphiteUDP ¶
When a UDP connection to Graphite is required
func NewGraphiteWithMetricPrefix ¶
NewGraphiteWithMetricPrefix is a factory method that's used to create a new Graphite with a metric prefix
func (*Graphite) Connect ¶
Given a Graphite struct, Connect populates the Graphite.conn field with an appropriate TCP connection
func (*Graphite) Disconnect ¶
Given a Graphite struct, Disconnect closes the Graphite.conn field
func (*Graphite) SendMetric ¶
Given a Metric struct, the SendMetric method sends the supplied metric to the Graphite connection that the method is called upon
func (*Graphite) SendMetrics ¶
Given a slice of Metrics, the SendMetrics method sends the metrics, as a batch, to the Graphite connection that the method is called upon
Notes ¶
Bugs ¶
doesn't handle timezones the same as graphite-web
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
carbonzipperpb
Package carbonzipperpb is a generated protocol buffer package.
|
Package carbonzipperpb is a generated protocol buffer package. |
mlog
mini logging package
|
mini logging package |
Package carbonzipperpb is a generated protocol buffer package.
|
Package carbonzipperpb is a generated protocol buffer package. |
framing
Package framing provides a prefix length framed net.Conn connection.
|
Package framing provides a prefix length framed net.Conn connection. |
this is a parser for graphite's storage-schemas.conf it supports old and new retention format see https://graphite.readthedocs.io/en/0.9.9/config-carbon.html#storage-schemas-conf based on https://github.com/grobian/carbonwriter but with some improvements
|
this is a parser for graphite's storage-schemas.conf it supports old and new retention format see https://graphite.readthedocs.io/en/0.9.9/config-carbon.html#storage-schemas-conf based on https://github.com/grobian/carbonwriter but with some improvements |
Package whisper implements Graphite's Whisper database format
|
Package whisper implements Graphite's Whisper database format |