查看数据库日志文件

最近更新时间:2018-12-20 17:39:40

DescribeDBLogFiles 查看数据库日志文件

查看指定实例的SlowLog,ErrorLog及Binlog

请求参数

英文名称 中文名称 类型 是否必须 备注
Action 调用接口名称 String 取固定值:DescribeDBLogFiles
Version API版本号 String 取固定值:2016-07-01
DBInstanceIdentifier 实例Id String
DBLogType 日志类型 String 大小写敏感,取值范围:SlowLog\/ErrorLog\/Binlog
Marker 偏移量 Integer
MaxRecords 每页结果中包含的最大条数 Integer 取值范围为[10.200],默认为50

返回值

RequestId

请求ID

  • 类型:String

Marker

下次开始获取记录开始偏移量

  • 类型:String

MaxRecords

每页结果中包含的最大条数 *类型:Integer

TotalCount

日志文件详情列表

  • 类型:Integer

DescribeDBLogFiles.N

记录总数

  • 类型:List

DescribeDBLogFiles.N.LogFileName

日志文件下载URL

  • 类型:String

DescribeDBLogFiles.N.Date

日志日期(天)

  • 类型:String

DescribeDBLogFiles.N.Size

日志大小

  • 类型:Long

DescribeDBLogFiles.N.Url

日志下载url,为NULL时,表示RDS没有提供下载链接URL

  • 类型:String

请求示例

http://krds.api.ksyun.com/?Action=DescribeDBLogFiles&Version=2016-07-01&DBInstanceIdentifier=bb2d111a-af44-41ee-b10d-754f23bc59e1&DBLogType=Binlog

示例返回

  • 列表返回
    {
    "Data": {
        "DescribeDBLogFiles": [
            {
                "LogFileName": "http://ks3-cn-beijing.ksyun.com/krds-beijing6-vpc/rds/openstack/lxc_data/9cffad0baac44985b790995f31de23c0/binlogs/v3/71e2bd82-423d-41ae-a9e6-2131a447d780/20180320_112405_8ee3ac8a-116c-45e9-9007-d1c62165dc7b/binlog.000004?AccessKeyId=bCPubcaLG5jstVnENKm%2F&Expires=1521518648&Signature=wbn38Z9b6KnRgmcn8b7XBKG526E%3D",
                "Size": 0.14,
                "RawSize": 0.14,
                "Date": "2018-03-20T11:21:21+0800",
                "StartTime": "2018-03-20T11:21:21+0800",
                "EndTime": "2018-03-20T11:21:27+0800"
            },
            {
                "LogFileName": "http://ks3-cn-beijing.ksyun.com/krds-beijing6-vpc/rds/openstack/lxc_data/9cffad0baac44985b790995f31de23c0/binlogs/v3/71e2bd82-423d-41ae-a9e6-2131a447d780/20180320_112405_8ee3ac8a-116c-45e9-9007-d1c62165dc7b/binlog.000003?AccessKeyId=bCPubcaLG5jstVnENKm%2F&Expires=1521518648&Signature=3BpXZJ%2B0d49em7Lc6seviLoZO3E%3D",
                "Size": 5.17,
                "RawSize": 5.17,
                "Date": "2018-03-20T11:21:01+0800",
                "StartTime": "2018-03-20T11:21:01+0800",
                "EndTime": "2018-03-20T11:21:21+0800"
            },
            {
                "LogFileName": "http://ks3-cn-beijing.ksyun.com/krds-beijing6-vpc/rds/openstack/lxc_data/9cffad0baac44985b790995f31de23c0/binlogs/v3/71e2bd82-423d-41ae-a9e6-2131a447d780/20180320_112404_8ee3ac8a-116c-45e9-9007-d1c62165dc7b/binlog.000002?AccessKeyId=bCPubcaLG5jstVnENKm%2F&Expires=1521518648&Signature=KxErIikTeWUvbzXBFlSb7XKDkjg%3D",
                "Size": 0.14,
                "RawSize": 0.14,
                "Date": "2018-03-20T11:20:54+0800",
                "StartTime": "2018-03-20T11:20:54+0800",
                "EndTime": "2018-03-20T11:21:01+0800"
            },
            {
                "LogFileName": "http://ks3-cn-beijing.ksyun.com/krds-beijing6-vpc/rds/openstack/lxc_data/9cffad0baac44985b790995f31de23c0/binlogs/v3/71e2bd82-423d-41ae-a9e6-2131a447d780/20180320_112404_8ee3ac8a-116c-45e9-9007-d1c62165dc7b/binlog.000001?AccessKeyId=bCPubcaLG5jstVnENKm%2F&Expires=1521518648&Signature=B340quXS2bNZYWo2GQtx1%2BHD4ZY%3D",
                "Size": 136.96,
                "RawSize": 136.96,
                "Date": "2018-03-20T11:06:34+0800",
                "StartTime": "2018-03-20T11:06:34+0800",
                "EndTime": "2018-03-20T11:20:54+0800"
            }
        ],
        "TotalCount": 4,
        "MaxRecords": 200
    },
    "RequestId": "ed03a54a-8ce0-4556-9d60-2b538bd664e9"
    }

金山云,开启您的云计算之旅

注册有礼