mpawslambda

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do()

Do the plugin

Types

type LambdaPlugin

type LambdaPlugin struct {
	FunctionName string
	Prefix       string

	AccessKeyID     string
	SecretAccessKey string
	Region          string

	CloudWatch *cloudwatch.CloudWatch
}

LambdaPlugin mackerel plugin for aws Lambda

func (LambdaPlugin) FetchMetrics

func (p LambdaPlugin) FetchMetrics() (map[string]interface{}, error)

FetchMetrics fetch the metrics

func (LambdaPlugin) GraphDefinition

func (p LambdaPlugin) GraphDefinition() map[string]mp.Graphs

GraphDefinition of LambdaPlugin

Example
helperForDefault := mp.NewMackerelPlugin(defaultLambda())
helperForDefault.OutputDefinitions()
Output:

# mackerel-agent-plugin
{"graphs":{"lambda.dead_letters":{"label":"Lambda Dead Letter","unit":"integer","metrics":[{"name":"dead_letter_errors","label":"Errors","stacked":false}]},"lambda.duration":{"label":"Lambda Duration","unit":"float","metrics":[{"name":"duration_avg","label":"Average","stacked":false},{"name":"duration_max","label":"Maximum","stacked":false},{"name":"duration_min","label":"Minimum","stacked":false}]},"lambda.invocations":{"label":"Lambda Invocations","unit":"integer","metrics":[{"name":"invocations_success","label":"Success","stacked":false},{"name":"invocations_error","label":"Error","stacked":false},{"name":"invocations_throttles","label":"Throttles","stacked":false}]}}}

func (LambdaPlugin) MetricKeyPrefix

func (p LambdaPlugin) MetricKeyPrefix() string

MetricKeyPrefix interface for PluginWithPrefix

Jump to

Keyboard shortcuts

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