aws

package
v0.13.7 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EC2Instance

type EC2Instance struct {

	// AWSAccount is the AWS account number for the VM.
	AWSAccount string

	// InstanceID is the instance id of the instance.
	InstanceID string

	// Region is the AWS region for the VM. The format of this field is "aws:{region}",
	// where supported values for {region} are listed at
	// http://docs.aws.amazon.com/general/latest/gr/rande.html.
	Region string
}

EC2Instance represents aws_ec2_instance type monitored resource. For definition refer to https://cloud.google.com/monitoring/api/resources#tag_aws_ec2_instance

func (*EC2Instance) MonitoredResource

func (aws *EC2Instance) MonitoredResource() (resType string, labels map[string]string)

MonitoredResource returns resource type and resource labels for AWSEC2Instance

type Interface

type Interface interface {

	// MonitoredResource returns the resource type and resource labels.
	MonitoredResource() (resType string, labels map[string]string)
}

Interface is a type that represent monitor resource that satisfies monitoredresource.Interface

func Autodetect

func Autodetect() Interface

Autodetect auto detects monitored resources based on the environment where the application is running. It supports detection of following resource types 1. aws_ec2_instance:

Returns MonitoredResInterface which implements getLabels() and getType() For resource definition go to https://cloud.google.com/monitoring/api/resources

Jump to

Keyboard shortcuts

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