Documentation ¶
Index ¶
Constants ¶
View Source
const ( // KeyEnabled toggles whether the AWS module is active or not. KeyEnabled = "aws.enabled" // DefaultEnabled defines the default setting. DefaultEnabled = false // KeyConfDir defines the aws configuration directory. KeyConfDir = "aws.conf_dir" // KeyConfExample shows an example configuration. KeyConfExample = "aws.config_example" )
Variables ¶
View Source
var ( // DefaultConfDir is the default location of aws configuration files. DefaultConfDir = path.Join(defaults.EtcPath, "aws.d") )
Functions ¶
This section is empty.
Types ¶
type AWS ¶
type AWS struct { // // Runs in ONE of two ways: shared or local // shared - multiple different sets of credentials - use AccessKeyID and SecretAccessKey from an IAM role // local - use a role in a local credentials file // // Mode is swithed based on which is configured, configure only ONE pair of authentication settings // // see: https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials/#Value // to be used with: https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials/#NewStaticCredentials AccessKeyID string `json:"access_key_id" toml:"access_key_id" yaml:"access_key_id"` SecretAccessKey string `json:"secret_access_key" toml:"secret_access_key" yaml:"secret_access_key"` // SessionToken string `json:"session_token" toml:"session_token" yaml:"session_token"` // ProviderName string `json:"provider_name" toml:"provider_name" yaml:"provider_name"` // // Local mode - non-shared version, running a local instance of circonus-cloud-agent // use with https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials/#NewSharedCredentials Role string `json:"role" toml:"role" yaml:"role"` CredentialsFile string `json:"credentials_file" toml:"credentials_file" yaml:"credentials_file"` }
AWS defines the credentials to use for AWS.
type AWSRegion ¶
type AWSRegion struct { Name string `json:"name" toml:"name" yaml:"name"` // e.g. us-east-1 Services []collectors.AWSCollector `json:"services" toml:"services" yaml:"services"` // which services to collectc metrics for in this region Tags circonus.Tags `json:"tags" toml:"tags" yaml:"tags"` // region tags (default region:Name) }
AWSRegion defines a specific aws region from which to collect metrics.
type AWSService ¶
type AWSService struct {
// contains filtered or unexported fields
}
AWSService defines the AWS cloud service client.
func New ¶
func New(ctx context.Context) (*AWSService, error)
New returns an AWS cloud service metric collector.
func (*AWSService) Enabled ¶
func (svc *AWSService) Enabled() bool
Enabled indicates whether the AWS service is enabled.
func (*AWSService) Scan ¶
func (svc *AWSService) Scan() error
Scan checks the service config directory for configurations and loads them.
func (*AWSService) Start ¶
func (svc *AWSService) Start() error
Start begins collecting metrics from AWS service.
type Config ¶
type Config struct { ID string `json:"id" toml:"id" yaml:"id"` // unique id for this service client instance, no spaces (ties several things together, short and immutable - logging, check search/create, tags, etc.) Regions []AWSRegion `json:"regions" toml:"regions" yaml:"regions"` // list of region specific configurations AWS AWS `json:"aws" toml:"aws" yaml:"aws"` // REQUIRED, aws credentials Circonus circonus.ServiceConfig `json:"circonus" toml:"circonus" yaml:"circonus"` // REQUIRED, circonus config: api credentials, check, broker, etc. Period string `json:"period" toml:"period" yaml:"period"` // 'basic' or 'detailed' Tags circonus.Tags `json:"tags" toml:"tags" yaml:"tags"` // global tags, added to all metrics }
Config defines an AWS service instance configuration NOTE: warning - ID must be thought of as immutable - if it changes a new check will be created.
Click to show internal directories.
Click to hide internal directories.