stackdriver

package module
v0.0.0-...-1eac30e Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

README

Stackdriver Output for Mozilla Heka

A Mozilla Heka Output for Stackdriver.com's custom metric API.

The Stackdriver custom metrics API throttles requests at one per minute. This output will collect metrics matched from the message_matcher and emit them to the Stackdriver custom metrics API as a collection of metrics every minute.

Installation

  • You will need to aquire a Stackdriver API key. The key must have an Access Role of "Agent and Custom Metric Data Key"

  • Create or add to the file {heka_root}/cmake/plugin_loader.cmake

git_clone(https://github.com/christianvozar/stackdriver master)
add_external_plugin(git https://github.com/christianvozar/heka-stackdriver-output master)
  • Build Heka per normal instructions for your platform.

Additional instructions can be found in the Heka documentation for external plugins.

Parameters

  • api_key (string, required) Stackdriver API key. (default: none)
  • ticker_interval (uint, optional) Interval to send custom metrics to Stackdriver API. The Stackdriver custom metrics API currently enforces a one minute throttling for sending metrics. (default: 60 seconds)

Example Stackdriver Output Configuration File

[Stackdriver]
type = "StackdriverCustomMetricsOutput"
api_key = "EXAMPLEAPIKEY00000000000000000000"

[Stackdriver.Metrics.cpu_steal]
name = "cpu-steal"
value = "%CpuSteal%"
instance_id = ""

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatUnixNano

func FormatUnixNano(t int64) int64

FormatUnixNano converts a Unix nanosecond-precision timestamp to a Unix seconds-precision timestamp.

Types

type StackdriverCustomMetric

type StackdriverCustomMetric struct {
	Name       string
	Value      string
	InstanceID string
}

type StackdriverCustomMetricOutput

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

func (*StackdriverCustomMetricOutput) ConfigStruct

func (so *StackdriverCustomMetricOutput) ConfigStruct() interface{}

func (*StackdriverCustomMetricOutput) Init

func (so *StackdriverCustomMetricOutput) Init(config interface{}) (err error)

func (*StackdriverCustomMetricOutput) Run

func (so *StackdriverCustomMetricOutput) Run(or OutputRunner, h PluginHelper) (err error)

type StackdriverCustomMetricOutputConfig

type StackdriverCustomMetricOutputConfig struct {
	// Stackdriver API key.
	APIKey string `toml:"api_key"`
	// Interval to send metrics to Stackdriver customer metrics API.
	// Defaults to one minute intervals to send messages as that is the current limit from Stackdriver.
	TickerInterval uint `toml:"ticker_interval"`
	// Set of metric templates this output should use, keyed by field name.
	Metric map[string]StackdriverCustomMetric
}

Stackdriver Output config struct

Jump to

Keyboard shortcuts

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