Home  >  Article  >  Operation and Maintenance  >  How to query all status information of one or more disks

How to query all status information of one or more disks

坏嘻嘻
坏嘻嘻Original
2018-09-26 14:50:243092browse

This article introduces how to query all status information of one or more disks, and focuses on the specific steps. The content of this article is compact, and I hope you can gain something from it.

DescribeDisksFullStatus

Description

All status information of the disk includes disk life cycle (Status), disk health status (HealthStatus ) and disk event type (EventType).

Since the release time of disk-related events, the planned execution time of the event and the actual execution time of the event are the same, if you specify a period of time [EventTime.Start, EventTime.End], you can query the events that occurred during this period all historical events. Currently, you can query historical events up to the last week.

Request parameters

How to query all status information of one or more disks

##Return parameters

How to query all status information of one or more disks

Data type DiskFullStatusTypeHow to query all status information of one or more disks

Data type DiskEventType How to query all status information of one or more disks

Example

Request example

https://ecs.aliyuncs.com/?Action=DescribeDisksFullStatus
&RegionId=cn-hangzhou
&<公共请求参数>

Normal return example

XML format

<DescribeDisksFullStatusResponse>
    <DiskFullStatusSet>
        <DiskFullStatusType>
            <DiskEventSet>
                <DiskEventType>
                    <EventId>e-event1</EventId>
                    <EventType>
                        <Code>7</Code>
                        <Name>Stalled</Name>
                    </EventType>
                    <EventTime>2018-05-08T02:43:10Z</EventTime>
                </DiskEventType>
            </DiskEventSet>
            <DiskId>d-disk1</DiskId>
            <InstanceId>i-instance1</InstanceId>
            <HealthStatus>
                <Code>128</Code>
                <Name>Impaired</Name>
            </HealthStatus>
            <Status>
                <Code>129</Code>
                <Name>Available</Name>
            </Status>
        </DiskFullStatusType>
        <DiskFullStatusType>
            <DiskEventSet>
                <DiskEventType>
                    <EventId>e-event2</EventId>
                    <EventType>
                        <Code>1</Code>
                        <Name>Degraded</Name>
                    </EventType>
                    <EventTime>2018-05-06T02:43:10Z</EventTime>
                    <EventEndTime>2018-05-06T02:48:52Z</EventEndTime>
                </DiskEventType>
            </DiskEventSet>
            <DiskId>d-disk2</DiskId>
            <InstanceId>i-instance2</InstanceId>
            <HealthStatus>
                <Code>64</Code>
                <Name>Warning</Name>
            </HealthStatus>
            <Status>
                <Code>0</Code>
                <Name>Ok</Name>
            </Status>
        </DiskFullStatusType>
    </DiskFullStatusSet>
    <PageNumber>1</PageNumber>
    <PageSize>10</PageSize>
    <RequestId>1A8B4B27-8B2D-XXXX-XXXX-0F64DBE4C211</RequestId>
    <TotalCount>2</TotalCount>
</DescribeDisksFullStatusResponse>

JSON format

{
    "DiskFullStatusSet": {
        "DiskFullStatusType": [
            {
                "DiskEventSet": {
                    "DiskEventType": [
                        {
                            "EventId": "e-event1",
                            "EventType": {
                                "Code": "7",
                                "Name": "Stalled"
                            },
                            "EventTime": "2018-05-08T02:43:10Z"
                        }
                    ]
                },
                "DiskId": "d-disk1",
                "InstanceId": "i-instance1",
                "HealthStatus": {
                    "Code": 128,
                    "Name": "Impaired"
                },
                "Status": {
                    "Code": 129,
                    "Name": "Available"
                }
            },
            {
                "DiskEventSet": {
                    "DiskEventType": [
                        {
                            "EventId": "e-event2",
                            "EventType": {
                                "Code": "1",
                                "Name": "Degraded"
                            },
                            "EventTime": "2018-05-06T02:43:10Z",
                            "EventEndTime": "2018-05-06T02:48:52Z"
                        }
                    ]
                },
                "DiskId": "d-disk2",
                "InstanceId": "i-instance2",
                "HealthStatus": {
                    "Code": 0,
                    "Name": "Ok"
                },
                "Status": {
                    "Code": 129,
                    "Name": "Available"
                }
            }
        ]
    },
    "PageNumber": 1,
    "PageSize": 10,
    "RequestId": "1A8B4B27-8B2D-XXXX-XXXX-0F64DBE4C211",
    "TotalCount": 2
}

Exception return example

XML format

<Error>
    <RequestId>C38E0D94-C18B-44F3-8C05-6E35BE334086</RequestId>
    <HostId>ecs.aliyuncs.com</HostId>
    <Code>MissingParameter</Code>
    <Message>The input parameter that is mandatory for processing this request is not supplied.</Message>
</Error>

JSON format

{
    "RequestId": "1A8B4B27-8B2D-XXXX-XXXX-0F64DBE4C211",
    "HostId": "ecs.aliyuncs.com"
    "Code": "MissingParameter"
    "Message": "The input parameter that is mandatory for processing this request is not supplied."
}

Error code

The following are error codes unique to this interface. For more error codes, please visit the API Error Center.

How to query all status information of one or more disks

The above is the detailed content of How to query all status information of one or more disks. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn