rds

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-2-Clause, BSD-3-Clause, PostgreSQL Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const AuroraMaxStorage = 64 * 1024 * 1024 * 1024 * 1024

Aurora storage is automatically extended up until 64TB, so we should always report that limit as the total disk space (to avoid bogus disk space warnings)

Variables

View Source
var DescribeDBClustersErrorCache *util.TTLMap = util.NewTTLMap(10 * 60)

Functions

func DownloadLogFiles

func DownloadLogFiles(ctx context.Context, server *state.Server, logger *util.Logger) (state.PersistedLogState, []state.LogFile, []state.PostgresQuerySample, error)

DownloadLogFiles - Gets log files for an Amazon RDS instance

func GetSystemState

func GetSystemState(server *state.Server, logger *util.Logger) (system state.SystemState)

GetSystemState - Gets system information about an Amazon RDS instance

Types

type RdsOsCPUUtilization

type RdsOsCPUUtilization struct {
	Guest  float32 `json:"guest"`  // The percentage of CPU in use by guest programs.
	Idle   float32 `json:"idle"`   // The percentage of CPU that is idle.
	Irq    float32 `json:"irq"`    // The percentage of CPU in use by software interrupts.
	Nice   float32 `json:"nice"`   // The percentage of CPU in use by programs running at lowest priority.
	Steal  float32 `json:"steal"`  // The percentage of CPU in use by other virtual machines.
	System float32 `json:"system"` // The percentage of CPU in use by the kernel.
	Total  float32 `json:"total"`  // The total percentage of the CPU in use. This value excludes the nice value.
	User   float32 `json:"user"`   // The percentage of CPU in use by user programs.
	Wait   float32 `json:"wait"`   // The percentage of CPU unused while waiting for I/O access.
}

type RdsOsDiskIO

type RdsOsDiskIO struct {
	AvgQueueLen float32 `json:"avgQueueLen"` // The number of requests waiting in the I/O device's queue.
	AvgReqSz    float32 `json:"avgReqSz"`    // The average request size, in kilobytes.
	Await       float32 `json:"await"`       // The number of milliseconds required to respond to requests, including queue time and service time.
	Device      string  `json:"device"`      // The identifier of the disk device in use.
	ReadIOsPS   float32 `json:"readIOsPS"`   // The number of read operations per second.
	ReadKb      float32 `json:"readKb"`      // The total number of kilobytes read.
	ReadKbPS    float32 `json:"readKbPS"`    // The number of kilobytes read per second.
	RrqmPS      float32 `json:"rrqmPS"`      // The number of merged read requests queued per second.
	Tps         float32 `json:"tps"`         // The number of I/O transactions per second.
	Util        float32 `json:"util"`        // The percentage of CPU time during which requests were issued.
	WriteIOsPS  float32 `json:"writeIOsPS"`  // The number of write operations per second.
	WriteKb     float32 `json:"writeKb"`     // The total number of kilobytes written.
	WriteKbPS   float32 `json:"writeKbPS"`   // The number of kilobytes written per second.
	WrqmPS      float32 `json:"wrqmPS"`      // The number of merged write requests queued per second.
}

type RdsOsFileSystem

type RdsOsFileSystem struct {
	MaxFiles        int64   `json:"maxFiles"`        // The maximum number of files that can be created for the file system.
	MountPoint      string  `json:"mountPoint"`      // The path to the file system.
	Name            string  `json:"name"`            // The name of the file system.
	Total           int64   `json:"total"`           // The total number of disk space available for the file system, in kilobytes.
	Used            int64   `json:"used"`            // The amount of disk space used by files in the file system, in kilobytes.
	UsedFilePercent float32 `json:"usedFilePercent"` // The percentage of available files in use.
	UsedFiles       int64   `json:"usedFiles"`       // The number of files in the file system.
	UsedPercent     float32 `json:"usedPercent"`     // The percentage of the file-system disk space in use.
}

type RdsOsLoadAverageMinute

type RdsOsLoadAverageMinute struct {
	Fifteen float32 `json:"fifteen"` // The number of processes requesting CPU time over the last 15 minutes.
	Five    float32 `json:"five"`    // The number of processes requesting CPU time over the last 5 minutes.
	One     float32 `json:"one"`     // The number of processes requesting CPU time over the last minute.
}

type RdsOsMemory

type RdsOsMemory struct {
	Active         int64 `json:"active"`         // The amount of assigned memory, in kilobytes.
	Buffers        int64 `json:"buffers"`        // The amount of memory used for buffering I/O requests prior to writing to the storage device, in kilobytes.
	Cached         int64 `json:"cached"`         // The amount of memory used for caching file system–based I/O.
	Dirty          int64 `json:"dirty"`          // The amount of memory pages in RAM that have been modified but not written to their related data block in storage, in kilobytes.
	Free           int64 `json:"free"`           // The amount of unassigned memory, in kilobytes.
	HugePagesFree  int64 `json:"hugePagesFree"`  // The number of free huge pages. Huge pages are a feature of the Linux kernel.
	HugePagesRsvd  int64 `json:"hugePagesRsvd"`  // The number of committed huge pages.
	HugePagesSize  int64 `json:"hugePagesSize"`  // The size for each huge pages unit, in kilobytes.
	HugePagesSurp  int64 `json:"hugePagesSurp"`  // The number of available surplus huge pages over the total.
	HugePagesTotal int64 `json:"hugePagesTotal"` // The total number of huge pages for the system.
	Inactive       int64 `json:"inactive"`       // The amount of least-frequently used memory pages, in kilobytes.
	Mapped         int64 `json:"mapped"`         // The total amount of file-system contents that is memory mapped inside a process address space, in kilobytes.
	PageTables     int64 `json:"pageTables"`     // The amount of memory used by page tables, in kilobytes.
	Slab           int64 `json:"slab"`           // The amount of reusable kernel data structures, in kilobytes.
	Total          int64 `json:"total"`          // The total amount of memory, in kilobytes.
	Writeback      int64 `json:"writeback"`      // The amount of dirty pages in RAM that are still being written to the backing storage, in kilobytes.
}

type RdsOsNetworkInterface

type RdsOsNetworkInterface struct {
	Interface string  `json:"interface"` // The identifier for the network interface being used for the DB instance.
	Rx        float64 `json:"rx"`        // The number of packets received.
	Tx        float64 `json:"tx"`        // The number of packets uploaded.
}

type RdsOsSnapshot

type RdsOsSnapshot struct {
	Engine             string  `json:"engine"`             // The database engine for the DB instance.
	InstanceID         string  `json:"instanceID"`         // The DB instance identifier.
	InstanceResourceID string  `json:"instanceResourceID"` // A region-unique, immutable identifier for the DB instance, also used as the log stream identifier.
	Timestamp          string  `json:"timestamp"`          // The time at which the metrics were taken.
	Version            float32 `json:"version"`            // The version of the OS metrics' stream JSON format.
	Uptime             string  `json:"uptime"`             // The amount of time that the DB instance has been active.
	NumVCPUs           int32   `json:"numVCPUs"`           // The number of virtual CPUs for the DB instance.

	CPUUtilization    RdsOsCPUUtilization     `json:"cpuUtilization"`
	LoadAverageMinute RdsOsLoadAverageMinute  `json:"loadAverageMinute"`
	Memory            RdsOsMemory             `json:"memory"`
	Swap              RdsOsSwap               `json:"swap"`
	Network           []RdsOsNetworkInterface `json:"network"`
	DiskIO            []RdsOsDiskIO           `json:"diskIO"`
	FileSystems       []RdsOsFileSystem       `json:"fileSys"`
}

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html

type RdsOsSwap

type RdsOsSwap struct {
	Cached int64 `json:"cached"` // The amount of swap memory, in kilobytes, used as cache memory.
	Total  int64 `json:"total"`  // The total amount of swap memory available, in kilobytes.
	Free   int64 `json:"free"`   // The total amount of swap memory free, in kilobytes.
}

Jump to

Keyboard shortcuts

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