elasticache

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 IndexPrefixElastiCacheReport = "elasticache-reports"
View Source
const MonitorInstanceStsSessionName = "monitor-instance"
View Source
const TemplateElastiCacheReport = `` /* 1758-byte string literal not displayed */
View Source
const TemplateNameElastiCacheReport = "elasticache-reports"
View Source
const TypeElastiCacheReport = "elasticache-report"

Variables

This section is empty.

Functions

func FetchDailyInstancesStats

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

FetchDailyInstancesStats fetches the stats of the ElastiCache instances of an AwsAccount to import them in ElasticSearch. The stats are fetched from the last hour. In this way, FetchInstancesStats should be called every hour.

func PutElastiCacheMonthlyReport

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

PutElastiCacheMonthlyReport puts a monthly report of ElastiCache instance in ES

Types

type Cpu

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

Cpu contains cpu 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 all the information of an ElastiCache instance

type InstanceBase

type InstanceBase struct {
	Id            string `json:"id"`
	Status        string `json:"status"`
	Region        string `json:"region"`
	NodeType      string `json:"nodeType"`
	Nodes         []Node `json:"nodes"`
	Engine        string `json:"engine"`
	EngineVersion string `json:"engineVersion"`
}

InstanceBase contains basics information of an ElastiCache instance

type InstanceReport

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

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

type Network

type Network struct {
	In  float64 `json:"in"`
	Out float64 `json:"out"`
}

Network contains network statistics of an instance

type Node

type Node struct {
	Id     string `json:"id"`
	Status string `json:"status"`
	Region string `json:"region"`
}

type Stats

type Stats struct {
	Cpu     Cpu     `json:"cpu"`
	Network Network `json:"network"`
}

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