Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.