rds

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const IndexPrefixRDSReport = "rds-reports"
View Source
const RDSStsSessionName = "fetch-rds"
View Source
const TemplateNameRDSReport = "rds-reports"
View Source
const TemplateRdsReport = `` /* 1601-byte string literal not displayed */
View Source
const TypeRDSReport = "rds-report"

Variables

This section is empty.

Functions

func FetchDailyInstancesStats

func FetchDailyInstancesStats(ctx context.Context, aa taws.AwsAccount) error

FetchDailyInstanceStats retrieves RDS information from the AWS API and generates a report

func PutRdsMonthlyReport

func PutRdsMonthlyReport(ctx context.Context, rdsCost []utils.CostPerResource, aa taws.AwsAccount, startDate, endDate time.Time) (bool, error)

PutRdsMonthlyReport puts a monthly report of RDS in ES

Types

type Cpu

type Cpu struct {
	Average float64 `json:"average"`
	Peak    float64 `json:"peak"`
}

Cpu contains cpu statistics of an instance

type FreeSpace

type FreeSpace struct {
	Minimum float64 `json:"minimum"`
	Maximum float64 `json:"maximum"`
	Average float64 `json:"average"`
}

FreeSpace contains free space statistics of an instance

type Instance

type Instance struct {
	InstanceBase
	Tags  []utils.Tag        `json:"tags"`
	Costs map[string]float64 `json:"costs"`
	Stats Stats              `json:"stats"`
}

Instance contains the information of an RDS instance

type InstanceBase

type InstanceBase struct {
	DBInstanceIdentifier string `json:"id"`
	AvailabilityZone     string `json:"availabilityZone"`
	DBInstanceClass      string `json:"type"`
	Engine               string `json:"engine"`
	AllocatedStorage     int64  `json:"allocatedStorage"`
	MultiAZ              bool   `json:"multiAZ"`
}

InstanceBase contains basics information of an RDS instance

type InstanceReport

type InstanceReport struct {
	utils.ReportBase
	Instance Instance `json:"instance"`
}

InstanceReport is saved in ES to have all the information of an RDS instance

type Stats

type Stats struct {
	Cpu       Cpu       `json:"cpu"`
	FreeSpace FreeSpace `json:"freeSpace"`
}

Stats contains statistics of an instance get on CloudWatch

Jump to

Keyboard shortcuts

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