rdsdownloader

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2017 License: MIT Imports: 16 Imported by: 0

README

rds-slowlog-downloader

Downloads RDS(for MySQL, Aurora) slow query logs.

Installation

Download from https://github.com/tkuchiki/rds-slowlog-downloader/releases

Usage

$ ./rds-slowlog-downloader --help
usage: rds-slowlog-downloader [<flags>]

Flags:
  --help                       Show context-sensitive help (also try --help-long and --help-man).
  --access-key=ACCESS-KEY      AWS access key ID
  --secret-key=SECRET-KEY      AWS secret access key
  --arn=ARN                    AWS Assume role ARN
  --token=TOKEN                AWS access token
  --profile=PROFILE            AWS CLI profile
  --credentials=CREDENTIALS    AWS CLI Credential file
  --region=REGION              AWS region
  --aws-config=AWS-CONFIG      AWS CLI Config file
  --instance-ids=INSTANCE-IDS  RDS instance IDs (comma separated)
  --config-file="/tmp/rds-slowlog-downloader.conf"
                               Config gile
  --output=/tmp/instance_id.slowquery.log
                               Output to slowlog
  --version                    Show application version.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmpPosition

func CmpPosition(p1, p2 Positions) bool

func CreateMarker

func CreateMarker(m string) string

func NewAWSSession

func NewAWSSession(accessKey, secretKey, arn, token, region string) (*session.Session, error)

func NewRDSClient

func NewRDSClient(sess *session.Session, out string) rdsClient

func SplitDBInstances

func SplitDBInstances(instances string) []string

func WriteConfig

func WriteConfig(filename string, data interface{}) error

Types

type Position

type Position struct {
	PrevLogfile string `json:"prev_logfile"`
	LastWritten int64  `json:"last_written"`
	Size        int64  `json:"size"`
	Marker      string `json:"marker"`
}

type Positions

type Positions map[string]Position

func LoadConfig

func LoadConfig(filename string) (Positions, error)

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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