logs

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbErrorlogOpts

type DbErrorlogOpts struct {
	// Specifies the ID of the queried DB instance.
	InstanceId string `json:"-"`
	// Specifies the start time in the "yyyy-mm-ddThh:mm:ssZ" format.
	// T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.
	StartDate string `q:"start_date" required:"true"`
	// Specifies the end time in the "yyyy-mm-ddThh:mm:ssZ" format.
	// T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.
	// You can only query error logs generated within a month.
	EndDate string `q:"end_date" required:"true"`
	// Specifies the page offset, such as 1, 2, 3, or 4. The parameter value is 1 by default if it is not specified.
	Offset string `q:"offset"`
	// Specifies the number of records on a page. Its value range is from 1 to 100. The parameter value is 10 by default if it is not specified.
	Limit string `q:"limit"`
	// Specifies the log level. The default value is ALL. Valid value:
	//
	// ALL
	// INFO
	// LOG
	// WARNING
	// ERROR
	// FATAL
	// PANIC
	// NOTE
	Level string `q:"level"`
}

type DbSlowLogOpts

type DbSlowLogOpts struct {
	// Specifies the ID of the queried DB instance.
	InstanceId string `json:"-"`
	// Specifies the start date in the "yyyy-mm-ddThh:mm:ssZ" format.
	// T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.
	StartDate string `q:"start_date" required:"true"`
	// Specifies the end time in the "yyyy-mm-ddThh:mm:ssZ" format.
	// T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. You can only query slow logs generated within a month.
	EndDate string `q:"end_date" required:"true"`
	// Specifies the page offset, such as 1, 2, 3, or 4. The parameter value is 1 by default if it is not specified.
	Offset string `q:"offset"`
	// Specifies the number of records on a page. Its value range is from 1 to 100. The parameter value is 10 by default if it is not specified.
	Limit string `q:"limit"`
	// Specifies the statement type. If it is left blank, all statement types are queried. Valid value:
	//
	// INSERT
	// UPDATE
	// SELECT
	// DELETE
	// CREATE
	Level string `q:"level"`
}

type ErrorLogResp

type ErrorLogResp struct {
	// Indicates detailed information.
	ErrorLogList []Errorlog `json:"error_log_list"`
	// Indicates the total number of records.
	TotalRecord int `json:"total_record"`
}

func ListErrorLog

func ListErrorLog(client *golangsdk.ServiceClient, opts DbErrorlogOpts) (*ErrorLogResp, error)

type Errorlog

type Errorlog struct {
	// Indicates the time in the UTC format.
	Time string `json:"time"`
	// Indicates the log level.
	Level string `json:"level"`
	// Indicates the log content.
	Content string `json:"content"`
}

type SlowLogResp

type SlowLogResp struct {
	// Indicates detailed information.
	Slowloglist []Slowloglist `json:"slow_log_list"`
	// Indicates the total number of records.
	TotalRecord int `json:"total_record"`
}

func ListSlowLog

func ListSlowLog(client *golangsdk.ServiceClient, opts DbSlowLogOpts) (*SlowLogResp, error)

type Slowloglist

type Slowloglist struct {
	// Indicates the number of executions.
	Count string `json:"count"`
	// Indicates the execution time.
	Time string `json:"time"`
	// Indicates the lock wait time.
	// This parameter is not present in the response for PostgreSQL DB engine.
	LockTime string `json:"lock_time"`
	// Indicates the number of sent rows.
	// This parameter is not present in the response for PostgreSQL DB engine.
	RowsSent string `json:"rows_sent"`
	// Indicates the number of scanned rows.
	// This parameter is not present in the response for PostgreSQL DB engine.
	RowsExamined string `json:"rows_examined"`
	// Indicates the database which the slow log belongs to.
	Database string `json:"database"`
	// Indicates the account.
	Users string `json:"users"`
	// Indicates the execution syntax.
	QuerySample string `json:"query_sample"`
	// Indicates the statement type.
	Type string `json:"type"`
	// Indicates the time in the UTC format.
	StartTime string `json:"start_time"`
	// Indicates the IP address.
	ClientIp string `json:"client_ip"`
}

Jump to

Keyboard shortcuts

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